15c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)/*
281a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * Copyright (C) 2013 Google Inc. All rights reserved.
3521d96ec04ace82590870fb04353ec4f82bb150fTorne (Richard Coles) *
45c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Redistribution and use in source and binary forms, with or without
581a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * modification, are permitted provided that the following conditions are
681a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * met:
7521d96ec04ace82590870fb04353ec4f82bb150fTorne (Richard Coles) *
881a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) *     * Redistributions of source code must retain the above copyright
981a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * notice, this list of conditions and the following disclaimer.
1081a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) *     * Redistributions in binary form must reproduce the above
1181a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * copyright notice, this list of conditions and the following disclaimer
1281a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * in the documentation and/or other materials provided with the
1381a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * distribution.
1481a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) *     * Neither the name of Google Inc. nor the names of its
1581a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * contributors may be used to endorse or promote products derived from
1681a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * this software without specific prior written permission.
17521d96ec04ace82590870fb04353ec4f82bb150fTorne (Richard Coles) *
1881a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1981a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2081a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2181a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2281a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2381a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2481a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2581a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2681a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
275c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2881a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles) * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
295c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) */
305c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
3109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)// Test for length > 0, overloaded constructor.
3209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)// Need separate tests for constructors with length == 0 and length > 0,
3309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)// and for overloaded vs. non-overloaded, if length > 0.
3409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)// length == 0, non-overloaded just omits a block and is not worth another test.
3509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)//
3609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)// Also includes some [Default] arguments (instead of in
3709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)// TestInterfaceConstructor.idl), otherwise overload resolution check string is
3809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)// extremely long and triggers a lint warning (line length).
39591b958dee2cf159d33a0b931e6231072eaf38d5Ben Murdoch[
40d6cdb82654e8f3343a693ca752d5c4cee0324e17Torne (Richard Coles)    // 2 constructors with same type length, to test overload resolution
4109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    Constructor(DOMString stringArg),
42d6cdb82654e8f3343a693ca752d5c4cee0324e17Torne (Richard Coles)    Constructor(Dictionary dictionaryArg),
437242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci    Constructor(sequence<sequence<DOMString>> stringSequenceSequenceArg),
4409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    Constructor(
4509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)        TestInterfaceEmpty testInterfaceEmptyArg,
4609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)        long longArg,
4709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)        [Default=Undefined] optional DOMString defaultUndefinedOptionalStringArg,
485d92fedcae5e801a8b224de090094f2d9df0b54aTorne (Richard Coles)        optional DOMString defaultNullStringOptionalStringArg = null,
496f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdoch        [Default=Undefined] optional Dictionary defaultUndefinedOptionalDictionaryArg,
506f543c786fc42989f552b4daa774ca5ff32fa697Ben Murdoch        optional DOMString optionalStringArg),
5109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)] interface TestInterfaceConstructor2 {
52521d96ec04ace82590870fb04353ec4f82bb150fTorne (Richard Coles)};
53