web-sys: Remove a few more interfaces from gecko's test suite

This commit is contained in:
Nick Fitzgerald 2018-08-15 14:34:59 -07:00
parent 21063fd42f
commit ea137a951b
4 changed files with 0 additions and 238 deletions

View File

@ -1,59 +0,0 @@
/* -*- 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/.
*/
// A dumping ground for random testing functions
callback PromiseReturner = Promise<any>();
[Pref="dom.expose_test_interfaces",
Constructor]
interface TestFunctions {
[Throws]
static void throwUncatchableException();
// Simply returns its argument. Can be used to test Promise
// argument processing behavior.
static Promise<any> passThroughPromise(Promise<any> arg);
// Returns whatever Promise the given PromiseReturner returned.
[Throws]
static Promise<any> passThroughCallbackPromise(PromiseReturner callback);
// Some basic tests for string binding round-tripping behavior.
void setStringData(DOMString arg);
// Get the string data, using an nsAString argument on the C++ side.
// This will just use Assign/operator=, whatever that does.
DOMString getStringDataAsAString();
// Get the string data, but only "length" chars of it, using an
// nsAString argument on the C++ side. This will always copy on the
// C++ side.
DOMString getStringDataAsAString(unsigned long length);
// Get the string data, but only "length" chars of it, using a
// DOMString argument on the C++ side and trying to hand it
// stringbuffers. If length not passed, use our full length.
DOMString getStringDataAsDOMString(optional unsigned long length);
// Functions that just punch through to mozITestInterfaceJS.idl
[Throws]
void testThrowNsresult();
[Throws]
void testThrowNsresultFromNative();
// Throws an InvalidStateError to auto-create a rejected promise.
[Throws]
static Promise<any> throwToRejectPromise();
// Some attributes for the toJSON to work with.
readonly attribute long one;
[Func="mozilla::dom::TestFunctions::ObjectFromAboutBlank"]
readonly attribute long two;
// Testing for how default toJSON behaves.
[Default] object toJSON();
};

View File

@ -1,84 +0,0 @@
/* -*- 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/.
*/
dictionary TestInterfaceJSUnionableDictionary {
object objectMember;
any anyMember;
};
[JSImplementation="@mozilla.org/dom/test-interface-js;1",
Pref="dom.expose_test_interfaces",
Constructor(optional any anyArg, optional object objectArg, optional TestInterfaceJSDictionary dictionaryArg)]
interface TestInterfaceJS : EventTarget {
readonly attribute any anyArg;
readonly attribute object objectArg;
[Cached, Pure] readonly attribute TestInterfaceJSDictionary dictionaryArg;
attribute any anyAttr;
attribute object objectAttr;
[Cached, Pure] attribute TestInterfaceJSDictionary dictionaryAttr;
any pingPongAny(any arg);
object pingPongObject(object obj);
any pingPongObjectOrString((object or DOMString) objOrString);
TestInterfaceJSDictionary pingPongDictionary(optional TestInterfaceJSDictionary dict);
long pingPongDictionaryOrLong(optional (TestInterfaceJSUnionableDictionary or long) dictOrLong);
DOMString pingPongMap(record<DOMString, any> map);
long objectSequenceLength(sequence<object> seq);
long anySequenceLength(sequence<any> seq);
// For testing bug 968335.
DOMString getCallerPrincipal();
DOMString convertSVS(USVString svs);
(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();
[Cached, Pure]
readonly attribute short cachedAttr;
void setCachedAttr(short n);
void clearCachedAttrCache();
// Test for sequence overloading and union behavior
void testSequenceOverload(sequence<DOMString> arg);
void testSequenceOverload(DOMString arg);
void testSequenceUnion((sequence<DOMString> or DOMString) arg);
// Tests for exception-throwing behavior
[Throws]
void testThrowError();
[Throws]
void testThrowDOMException();
[Throws]
void testThrowTypeError();
[Throws]
void testThrowCallbackError(Function callback);
[Throws]
void testThrowXraySelfHosted();
[Throws]
void testThrowSelfHosted();
// Tests for promise-rejection behavior
Promise<void> testPromiseWithThrowingChromePromiseInit();
Promise<void> testPromiseWithThrowingContentPromiseInit(Function func);
Promise<void> testPromiseWithDOMExceptionThrowingPromiseInit();
Promise<void> testPromiseWithThrowingChromeThenFunction();
Promise<void> testPromiseWithThrowingContentThenFunction(AnyCallback func);
Promise<void> testPromiseWithDOMExceptionThrowingThenFunction();
Promise<void> testPromiseWithThrowingChromeThenable();
Promise<void> testPromiseWithThrowingContentThenable(object thenable);
Promise<void> testPromiseWithDOMExceptionThrowingThenable();
// Event handler tests
attribute EventHandler onsomething;
};

View File

@ -1,27 +0,0 @@
/* -*- 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/.
*/
//
// These dictionaries are in a separate WebIDL file to avoid circular include
// problems. One of the dictionary includes a union as a member, so that
// dictionary's header needs to include UnionTypes.h. But the API in
// TestInterfaceJS also declares a union of dictionaries, so _that_
// dictionary's header needs to be included _by_ UnionTypes.h. The solution
// is to separate those two dictionaries into separate header files.
//
dictionary TestInterfaceJSDictionary2 {
object innerObject;
};
dictionary TestInterfaceJSDictionary {
TestInterfaceJSDictionary2 innerDictionary;
object objectMember;
any anyMember;
(object or DOMString) objectOrStringMember;
sequence<any> anySequenceMember;
};

View File

@ -1,68 +0,0 @@
/* -*- 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/.
*/
[Constructor(),
Pref="dom.expose_test_interfaces"]
interface TestInterfaceMaplike {
maplike<DOMString, long>;
void setInternal(DOMString aKey, long aValue);
void clearInternal();
boolean deleteInternal(DOMString aKey);
boolean hasInternal(DOMString aKey);
};
[Constructor(),
Pref="dom.expose_test_interfaces"]
interface TestInterfaceMaplikeObject {
readonly maplike<DOMString, TestInterfaceMaplike>;
void setInternal(DOMString aKey);
void clearInternal();
boolean deleteInternal(DOMString aKey);
boolean hasInternal(DOMString aKey);
};
[Pref="dom.expose_test_interfaces",
JSImplementation="@mozilla.org/dom/test-interface-js-maplike;1",
Constructor()]
interface TestInterfaceJSMaplike {
readonly maplike<DOMString, long>;
void setInternal(DOMString aKey, long aValue);
void clearInternal();
boolean deleteInternal(DOMString aKey);
};
[Constructor(),
Pref="dom.expose_test_interfaces"]
interface TestInterfaceSetlike {
setlike<DOMString>;
};
[Constructor(),
Pref="dom.expose_test_interfaces"]
interface TestInterfaceSetlikeNode {
setlike<Node>;
};
[Constructor(),
Pref="dom.expose_test_interfaces"]
interface TestInterfaceIterableSingle {
iterable<long>;
getter long(unsigned long index);
readonly attribute unsigned long length;
};
[Constructor(),
Pref="dom.expose_test_interfaces"]
interface TestInterfaceIterableDouble {
iterable<DOMString, DOMString>;
};
[Constructor(),
Pref="dom.expose_test_interfaces"]
interface TestInterfaceIterableDoubleUnion {
iterable<DOMString, (DOMString or long)>;
};