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
|
|
|
|
|
|
|
DOMString convertSVS(ScalarValueString 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);
|
2014-02-15 10:36:43 +04:00
|
|
|
};
|