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