summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/idl
diff options
context:
space:
mode:
Diffstat (limited to 'js/xpconnect/tests/idl')
-rw-r--r--js/xpconnect/tests/idl/xpctest_esmreturncode.idl45
-rw-r--r--js/xpconnect/tests/idl/xpctest_utils.idl23
2 files changed, 23 insertions, 45 deletions
diff --git a/js/xpconnect/tests/idl/xpctest_esmreturncode.idl b/js/xpconnect/tests/idl/xpctest_esmreturncode.idl
deleted file mode 100644
index ac17feda3f..0000000000
--- a/js/xpconnect/tests/idl/xpctest_esmreturncode.idl
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * 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/. */
-
-/**
- * Test the use of Components.returnCode with system ESM
- *
- * This ("parent") interface defines a method that in-turn calls another
- * ("child") interface implemented in JS, and returns the nsresult from that
- * child interface. The child interface manages the return code by way of
- * Components.returnCode.
- */
-
-#include "nsISupports.idl"
-
-
-[scriptable, uuid(494f9336-ad06-46ad-bbb4-b0010e27e12d)]
-interface nsIXPCTestESMReturnCodeParent : nsISupports {
- // Calls the "child" interface with the specified behavior flag. Returns
- // the NSRESULT from the child interface.
- nsresult callChild(in long childBehavior);
-};
-
-[scriptable, uuid(dee07408-75d8-4968-a37c-fe0d48ccd1ac)]
-interface nsIXPCTestESMReturnCodeChild : nsISupports {
- void doIt(in long behavior);
-
- // Flags to control that the child does.
- // child will throw a JS exception
- const long CHILD_SHOULD_THROW = 0;
-
- // child will just return normally
- const long CHILD_SHOULD_RETURN_SUCCESS = 1;
-
- // child will return after setting Components.returnCode to NS_ERROR_FAILURE
- const long CHILD_SHOULD_RETURN_RESULTCODE = 2;
-
- // child will set Components.returnCode to NS_ERROR_UNEXPECTED, then create
- // a new component that sets Components.returnCode to NS_ERROR_FAILURE.
- // Our caller should see the NS_ERROR_UNEXPECTED we set rather than the
- // value set later by the "inner" child.
- const long CHILD_SHOULD_NEST_RESULTCODES = 3;
-};
diff --git a/js/xpconnect/tests/idl/xpctest_utils.idl b/js/xpconnect/tests/idl/xpctest_utils.idl
index e59814272b..db135fcbe1 100644
--- a/js/xpconnect/tests/idl/xpctest_utils.idl
+++ b/js/xpconnect/tests/idl/xpctest_utils.idl
@@ -17,3 +17,26 @@ interface nsIXPCTestFunctionInterface : nsISupports {
interface nsIXPCTestUtils : nsISupports {
nsIXPCTestFunctionInterface doubleWrapFunction(in nsIXPCTestFunctionInterface f);
};
+
+/*
+ * Test that non-[scriptable] interfaces and [noscript] members are not
+ * generated for TypeScript bindings.
+ */
+
+[uuid(ddf64cfb-668a-4571-a900-0fe2babb6249)]
+interface nsIXPCTestNotScriptable : nsISupports {
+ // Empty.
+};
+
+[scriptable, uuid(1bbfe703-c67d-4995-b061-564c8a1c39d7)]
+interface nsIXPCTestNoScriptMembers : nsISupports {
+ [noscript]
+ attribute long noscriptProp;
+
+ attribute long exposedProp;
+
+ [noscript]
+ void noscriptMethod(in long arg);
+
+ void exposedMethod(in long arg);
+};