2014-02-14 22:36:43 -08: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-19 18:12:15 -07:00
|
|
|
dictionary TestInterfaceJSUnionableDictionary {
|
|
|
|
object objectMember;
|
|
|
|
any anyMember;
|
|
|
|
};
|
|
|
|
|
2014-02-14 22:36:43 -08:00
|
|
|
[JSImplementation="@mozilla.org/dom/test-interface-js;1",
|
|
|
|
Pref="dom.expose_test_interfaces",
|
2014-08-19 18:12:15 -07:00
|
|
|
Constructor(optional any anyArg, optional object objectArg, optional TestInterfaceJSDictionary dictionaryArg)]
|
2014-02-14 22:36:43 -08:00
|
|
|
interface TestInterfaceJS {
|
|
|
|
readonly attribute any anyArg;
|
|
|
|
readonly attribute object objectArg;
|
2014-08-19 18:12:15 -07:00
|
|
|
[Cached, Pure] readonly attribute TestInterfaceJSDictionary dictionaryArg;
|
2014-02-14 22:36:43 -08:00
|
|
|
attribute any anyAttr;
|
|
|
|
attribute object objectAttr;
|
2014-08-19 18:12:15 -07:00
|
|
|
[Cached, Pure] attribute TestInterfaceJSDictionary dictionaryAttr;
|
2014-02-14 22:36:43 -08:00
|
|
|
any pingPongAny(any arg);
|
2014-08-19 18:12:15 -07: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-14 22:36:44 -08:00
|
|
|
|
|
|
|
// For testing bug 968335.
|
|
|
|
DOMString getCallerPrincipal();
|
2014-08-01 13:23:48 -07:00
|
|
|
|
2014-11-20 03:58:00 -08:00
|
|
|
DOMString convertSVS(USVString svs);
|
2014-08-19 08:41:26 -07: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-21 13:56:11 -07:00
|
|
|
|
|
|
|
[Cached, Pure]
|
|
|
|
readonly attribute short cachedAttr;
|
|
|
|
void setCachedAttr(short n);
|
|
|
|
void clearCachedAttrCache();
|
2014-09-30 18:26:28 -07: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-02 14:08:33 -08:00
|
|
|
|
|
|
|
// Tests for exception-throwing behavior
|
|
|
|
[Throws]
|
|
|
|
void testThrowDOMError();
|
|
|
|
|
|
|
|
[Throws]
|
|
|
|
void testThrowDOMException();
|
2015-01-15 14:39:02 -08:00
|
|
|
|
|
|
|
// Tests for promise-rejection behavior
|
|
|
|
Promise<void> testPromiseWithThrowingChromePromiseInit();
|
|
|
|
Promise<void> testPromiseWithThrowingContentPromiseInit(PromiseInit func);
|
|
|
|
Promise<void> testPromiseWithThrowingChromeThenFunction();
|
|
|
|
Promise<void> testPromiseWithThrowingContentThenFunction(AnyCallback func);
|
|
|
|
Promise<void> testPromiseWithThrowingChromeThenable();
|
|
|
|
Promise<void> testPromiseWithThrowingContentThenable(object thenable);
|
2014-02-14 22:36:43 -08:00
|
|
|
};
|