Debian Codegraph @

rhino/testsrc/tests/e4x/XML/regress-324688.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-324688.js';
8
9 var summary = 'No Syntax Error when trailing space and XML.ignoreWhitespace ' +
10 'true';
11 var BUGNUMBER = 324688;
12 var actual = 'No Error';
13 var expect = 'No Error';
14 START(summary);
15
16 function init()
17 {
18 if (typeof Components != 'undefined')
19 {
20 try
21 {
22 netscape.security.PrivilegeManager.
23 enablePrivilege('UniversalXPConnect');
24
25 var TestObject = {
26 observe: function () {
27 try
28 {
29 printBugNumber(BUGNUMBER);
30 printStatus (summary);
31 printStatus('Browser only: requires UniversalXPConnect');
32
33 printStatus("XML.ignoreWhitespace=" +
34 XML.ignoreWhitespace);
35 var x = new XML("<a></a> ");
36 }
37 catch(ex2)
38 {
39 actual = ex2 + '';
40 }
41 print('expect = ' + expect);
42 print('actual = ' + actual);
43 TEST(1, expect, actual);
44 END();
45 gDelayTestDriverEnd = false;
46 jsTestDriverEnd();
47 }
48 };
49
50 var t = Components.classes["@mozilla.org/timer;1"].
51 createInstance(Components.interfaces.nsITimer);
52 t.init(TestObject, 100, t.TYPE_ONE_SHOT);
53 }
54 catch(ex)
55 {
56 printStatus('Requires UniversalXPConnect');
57 }
58 }
59 }
60
61 if (typeof window != 'undefined')
62 {
63 // delay test driver end
64 gDelayTestDriverEnd = true;
65
66 window.addEventListener("load", init, false);
67 }
68 else
69 {
70 TEST(1, expect, actual);
71 END();
72 }
73