Debian Codegraph @

rhino/testsrc/tests/e4x/Regress/regress-327697.js

raw symbols SCIP
1 /* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 gTestfile = 'regress-327697.js';
8
9 var summary = "Make XPConnect refuse to wrap e4x";
10 var BUGNUMBER = 327697;
11 var actual = 'No Hang';
12 var expect = 'No Hang';
13
14 printBugNumber(BUGNUMBER);
15 START(summary);
16 printStatus('This test runs in the browser only');
17
18 function init()
19 {
20 try
21 {
22 var sel = document.getElementsByTagName("select")[0];
23 sel.add(document.createElement('foo'), <bar/>);
24 }
25 catch(ex)
26 {
27 printStatus(ex + '');
28 }
29 TEST(1, expect, actual);
30 END();
31 gDelayTestDriverEnd = false;
32 jsTestDriverEnd();
33 }
34
35 if (typeof window != 'undefined')
36 {
37 // delay test driver end
38 gDelayTestDriverEnd = true;
39
40 document.write('<select></select>');
41 window.addEventListener("load", init, false);
42 }
43 else
44 {
45 TEST(1, expect, actual);
46 END();
47 }
48