From ea137a951b6d2e92c557ad1dd8628d52bb40b749 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Wed, 15 Aug 2018 14:34:59 -0700 Subject: [PATCH] web-sys: Remove a few more interfaces from gecko's test suite --- .../webidls/enabled/TestFunctions.webidl | 59 ------------- .../webidls/enabled/TestInterfaceJS.webidl | 84 ------------------- .../TestInterfaceJSDictionaries.webidl | 27 ------ ...stInterfaceJSMaplikeSetlikeIterable.webidl | 68 --------------- 4 files changed, 238 deletions(-) delete mode 100644 crates/web-sys/webidls/enabled/TestFunctions.webidl delete mode 100644 crates/web-sys/webidls/enabled/TestInterfaceJS.webidl delete mode 100644 crates/web-sys/webidls/enabled/TestInterfaceJSDictionaries.webidl delete mode 100644 crates/web-sys/webidls/enabled/TestInterfaceJSMaplikeSetlikeIterable.webidl diff --git a/crates/web-sys/webidls/enabled/TestFunctions.webidl b/crates/web-sys/webidls/enabled/TestFunctions.webidl deleted file mode 100644 index 9c72392c3..000000000 --- a/crates/web-sys/webidls/enabled/TestFunctions.webidl +++ /dev/null @@ -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(); - -[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 passThroughPromise(Promise arg); - - // Returns whatever Promise the given PromiseReturner returned. - [Throws] - static Promise 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 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(); -}; diff --git a/crates/web-sys/webidls/enabled/TestInterfaceJS.webidl b/crates/web-sys/webidls/enabled/TestInterfaceJS.webidl deleted file mode 100644 index 2757745f0..000000000 --- a/crates/web-sys/webidls/enabled/TestInterfaceJS.webidl +++ /dev/null @@ -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 map); - long objectSequenceLength(sequence seq); - long anySequenceLength(sequence 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 arg); - void testSequenceOverload(DOMString arg); - - void testSequenceUnion((sequence 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 testPromiseWithThrowingChromePromiseInit(); - Promise testPromiseWithThrowingContentPromiseInit(Function func); - Promise testPromiseWithDOMExceptionThrowingPromiseInit(); - Promise testPromiseWithThrowingChromeThenFunction(); - Promise testPromiseWithThrowingContentThenFunction(AnyCallback func); - Promise testPromiseWithDOMExceptionThrowingThenFunction(); - Promise testPromiseWithThrowingChromeThenable(); - Promise testPromiseWithThrowingContentThenable(object thenable); - Promise testPromiseWithDOMExceptionThrowingThenable(); - - // Event handler tests - attribute EventHandler onsomething; -}; diff --git a/crates/web-sys/webidls/enabled/TestInterfaceJSDictionaries.webidl b/crates/web-sys/webidls/enabled/TestInterfaceJSDictionaries.webidl deleted file mode 100644 index 366864a8d..000000000 --- a/crates/web-sys/webidls/enabled/TestInterfaceJSDictionaries.webidl +++ /dev/null @@ -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 anySequenceMember; -}; - diff --git a/crates/web-sys/webidls/enabled/TestInterfaceJSMaplikeSetlikeIterable.webidl b/crates/web-sys/webidls/enabled/TestInterfaceJSMaplikeSetlikeIterable.webidl deleted file mode 100644 index 9a953784c..000000000 --- a/crates/web-sys/webidls/enabled/TestInterfaceJSMaplikeSetlikeIterable.webidl +++ /dev/null @@ -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; - 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; - 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; - void setInternal(DOMString aKey, long aValue); - void clearInternal(); - boolean deleteInternal(DOMString aKey); -}; - -[Constructor(), - Pref="dom.expose_test_interfaces"] -interface TestInterfaceSetlike { - setlike; -}; - -[Constructor(), - Pref="dom.expose_test_interfaces"] -interface TestInterfaceSetlikeNode { - setlike; -}; - -[Constructor(), - Pref="dom.expose_test_interfaces"] -interface TestInterfaceIterableSingle { - iterable; - getter long(unsigned long index); - readonly attribute unsigned long length; -}; - -[Constructor(), - Pref="dom.expose_test_interfaces"] -interface TestInterfaceIterableDouble { - iterable; -}; - -[Constructor(), - Pref="dom.expose_test_interfaces"] -interface TestInterfaceIterableDoubleUnion { - iterable; -}; -