2018-09-13 23:04:55 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2014-02-15 10:36:43 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
2014-08-20 05:12:15 +04:00
|
|
|
dictionary TestInterfaceJSUnionableDictionary {
|
|
|
|
object objectMember;
|
|
|
|
any anyMember;
|
|
|
|
};
|
|
|
|
|
2014-02-15 10:36:43 +04:00
|
|
|
[JSImplementation="@mozilla.org/dom/test-interface-js;1",
|
|
|
|
Pref="dom.expose_test_interfaces",
|
2014-08-20 05:12:15 +04:00
|
|
|
Constructor(optional any anyArg, optional object objectArg, optional TestInterfaceJSDictionary dictionaryArg)]
|
2015-07-28 19:35:39 +03:00
|
|
|
interface TestInterfaceJS : EventTarget {
|
2014-02-15 10:36:43 +04:00
|
|
|
readonly attribute any anyArg;
|
|
|
|
readonly attribute object objectArg;
|
2018-07-06 21:43:12 +03:00
|
|
|
TestInterfaceJSDictionary getDictionaryArg();
|
2014-02-15 10:36:43 +04:00
|
|
|
attribute any anyAttr;
|
|
|
|
attribute object objectAttr;
|
2018-07-06 21:43:12 +03:00
|
|
|
TestInterfaceJSDictionary getDictionaryAttr();
|
|
|
|
void setDictionaryAttr(optional TestInterfaceJSDictionary dict);
|
2014-02-15 10:36:43 +04:00
|
|
|
any pingPongAny(any arg);
|
2014-08-20 05:12:15 +04:00
|
|
|
object pingPongObject(object obj);
|
|
|
|
any pingPongObjectOrString((object or DOMString) objOrString);
|
|
|
|
TestInterfaceJSDictionary pingPongDictionary(optional TestInterfaceJSDictionary dict);
|
|
|
|
long pingPongDictionaryOrLong(optional (TestInterfaceJSUnionableDictionary or long) dictOrLong);
|
2018-12-19 22:29:48 +03:00
|
|
|
DOMString pingPongRecord(record<DOMString, any> rec);
|
2014-08-20 05:12:15 +04:00
|
|
|
long objectSequenceLength(sequence<object> seq);
|
|
|
|
long anySequenceLength(sequence<any> seq);
|
2014-02-15 10:36:44 +04:00
|
|
|
|
|
|
|
// For testing bug 968335.
|
|
|
|
DOMString getCallerPrincipal();
|
2014-08-02 00:23:48 +04:00
|
|
|
|
2014-11-20 14:58:00 +03:00
|
|
|
DOMString convertSVS(USVString svs);
|
2014-08-19 19:41:26 +04:00
|
|
|
|
|
|
|
(TestInterfaceJS or long) pingPongUnion((TestInterfaceJS or long) something);
|
|
|
|
(DOMString or TestInterfaceJS?) pingPongUnionContainingNull((TestInterfaceJS? or DOMString) something);
|
|
|
|
(TestInterfaceJS or long)? pingPongNullableUnion((TestInterfaceJS or long)? something);
|
|
|
|
(Location or TestInterfaceJS) returnBadUnion();
|
2014-08-22 00:56:11 +04:00
|
|
|
|
2014-10-01 05:26:28 +04:00
|
|
|
// Test for sequence overloading and union behavior
|
|
|
|
void testSequenceOverload(sequence<DOMString> arg);
|
|
|
|
void testSequenceOverload(DOMString arg);
|
|
|
|
|
|
|
|
void testSequenceUnion((sequence<DOMString> or DOMString) arg);
|
2015-01-03 01:08:33 +03:00
|
|
|
|
|
|
|
// Tests for exception-throwing behavior
|
|
|
|
[Throws]
|
2015-06-16 23:44:10 +03:00
|
|
|
void testThrowError();
|
2015-01-03 01:08:33 +03:00
|
|
|
|
|
|
|
[Throws]
|
|
|
|
void testThrowDOMException();
|
2015-01-16 01:39:02 +03:00
|
|
|
|
2015-06-16 03:09:36 +03:00
|
|
|
[Throws]
|
|
|
|
void testThrowTypeError();
|
|
|
|
|
|
|
|
[Throws]
|
|
|
|
void testThrowCallbackError(Function callback);
|
|
|
|
|
|
|
|
[Throws]
|
|
|
|
void testThrowXraySelfHosted();
|
|
|
|
|
|
|
|
[Throws]
|
|
|
|
void testThrowSelfHosted();
|
|
|
|
|
2015-01-16 01:39:02 +03:00
|
|
|
// Tests for promise-rejection behavior
|
|
|
|
Promise<void> testPromiseWithThrowingChromePromiseInit();
|
2016-12-20 02:38:42 +03:00
|
|
|
Promise<void> testPromiseWithThrowingContentPromiseInit(Function func);
|
2015-01-16 01:39:02 +03:00
|
|
|
Promise<void> testPromiseWithDOMExceptionThrowingPromiseInit();
|
2015-01-16 01:39:02 +03:00
|
|
|
Promise<void> testPromiseWithThrowingChromeThenFunction();
|
|
|
|
Promise<void> testPromiseWithThrowingContentThenFunction(AnyCallback func);
|
2015-01-16 01:39:02 +03:00
|
|
|
Promise<void> testPromiseWithDOMExceptionThrowingThenFunction();
|
2015-01-16 01:39:02 +03:00
|
|
|
Promise<void> testPromiseWithThrowingChromeThenable();
|
|
|
|
Promise<void> testPromiseWithThrowingContentThenable(object thenable);
|
2015-01-16 01:39:02 +03:00
|
|
|
Promise<void> testPromiseWithDOMExceptionThrowingThenable();
|
2015-07-28 19:35:39 +03:00
|
|
|
|
|
|
|
// Event handler tests
|
|
|
|
attribute EventHandler onsomething;
|
2014-02-15 10:36:43 +04:00
|
|
|
};
|