4 https://bugzilla.mozilla.org/show_bug.cgi?id=1066432
8 <title>Test for Bug
1066432</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
11 <script type=
"application/javascript">
12 /* global TestInterfaceJS */
13 /** Test for Bug
1066432 **/
14 SimpleTest.waitForExplicitFinish();
15 SpecialPowers.pushPrefEnv({set: [[
"dom.expose_test_interfaces", true]]}, function() {
16 var testInterfaceJS = new TestInterfaceJS();
17 ok(testInterfaceJS,
"got a TestInterfaceJS object");
19 var nonIterableObject = {[Symbol.iterator]:
5};
22 testInterfaceJS.testSequenceOverload(nonIterableObject);
23 ok(false,
"Should have thrown in the overload case"); // see long comment above!
25 is(e.name,
"TypeError",
"Should get a TypeError for the overload case");
26 ok(e.message.includes(
"not iterable"),
27 "Should have a message about being non-iterable in the overload case");
31 testInterfaceJS.testSequenceUnion(nonIterableObject);
32 ok(false,
"Should have thrown in the union case");
34 is(e.name,
"TypeError",
"Should get a TypeError for the union case");
35 ok(e.message.includes(
"not iterable"),
36 "Should have a message about being non-iterable in the union case");
45 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1066432">Mozilla Bug
1066432</a>
47 <div id=
"content" style=
"display: none">