Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-328897.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 var gTestfile = 'regress-328897.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 328897;
9 var summary = 'JS_ReportPendingException should';
10
11 var actual = 'No Error';
12 var expect = 'No Error';
13
14 printBugNumber(BUGNUMBER);
15 printStatus (summary);
16
17 if (typeof window == 'undefined')
18 {
19 reportCompare(expect, actual, summary);
20 }
21 else
22 {
23 expect = /(Script error.|uncaught exception: Permission denied to get property UnnamedClass.classes)/;
24
25 window._onerror = window.onerror;
26 window.onerror = (function (msg, page, line) {
27 actual = msg;
28 gDelayTestDriverEnd = false;
29 jsTestDriverEnd();
30 reportMatch(expect, actual, summary);
31 });
32
33 gDelayTestDriverEnd = true;
34
35 window.location="javascript:Components.classes";
36 actual = 'No Error';
37 }
38
39 function onload()
40 {
41 if (actual == 'No Error')
42 {
43 gDelayTestDriverEnd = false;
44 jsTestDriverEnd();
45 reportCompare(expect, actual, summary);
46 }
47 }