2014-02-15 10:36:43 +04:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* 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)]
|
2014-02-15 10:36:43 +04:00
|
|
|
interface TestInterfaceJS {
|
|
|
|
readonly attribute any anyArg;
|
|
|
|
readonly attribute object objectArg;
|
2014-08-20 05:12:15 +04:00
|
|
|
[Cached, Pure] readonly attribute TestInterfaceJSDictionary dictionaryArg;
|
2014-02-15 10:36:43 +04:00
|
|
|
attribute any anyAttr;
|
|
|
|
attribute object objectAttr;
|
2014-08-20 05:12:15 +04:00
|
|
|
[Cached, Pure] attribute TestInterfaceJSDictionary dictionaryAttr;
|
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);
|
|
|
|
DOMString pingPongMap(MozMap<any> map);
|
|
|
|
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
|
|
|
|
|
|
|
[Cached, Pure]
|
|
|
|
readonly attribute short cachedAttr;
|
|
|
|
void setCachedAttr(short n);
|
|
|
|
void clearCachedAttrCache();
|
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();
|
|
|
|
Promise<void> testPromiseWithThrowingContentPromiseInit(PromiseInit 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();
|
2014-02-15 10:36:43 +04:00
|
|
|
};
|