4 https://bugzilla.mozilla.org/show_bug.cgi?id=1065185
8 <title>Test for Bug
1065185</title>
9 <script src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"chrome://global/skin"/>
11 <link rel=
"stylesheet" type=
"text/css" href=
"chrome://mochikit/content/tests/SimpleTest/test.css"/>
12 <script type=
"application/javascript">
14 /** Test for Bug
1065185 **/
15 SimpleTest.waitForExplicitFinish();
17 function doMonitor(rgxps) {
18 var messages = rgxps.map((x) =
> ({ errorMessage: x, isWarning: true }));
19 info(
"Expecting console messages: " + messages.toSource());
20 SimpleTest.monitorConsole(() =
> SimpleTest.executeSoon(() =
> window[
0].location.reload()), messages, /* forbidUnexpected = */ true);
22 function endMonitor() {
23 SimpleTest.executeSoon(SimpleTest.endMonitorConsole.bind(SimpleTest));
28 switch(gLoadCount++) {
30 doMonitor([/access to property
"a"/i]);
31 window[
0].wrappedJSObject.probe = { a:
2 };
32 is(window[
0].eval('probe.a'), undefined,
"Accessed exposed prop");
36 doMonitor([/access to property
"a"/i]);
37 window[
0].wrappedJSObject.probe = { a:
2 };
38 is(window[
0].eval('probe.a'), undefined,
"Non-exposed prop undefined");
39 is(window[
0].eval('probe.a'), undefined,
"Non-exposed prop undefined again");
46 ok(false,
"Unexpected load");
55 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1065185">Mozilla Bug
1065185</a>
57 <div id=
"content" style=
"display: none">
62 <iframe onload=
"loaded();" src=
"http://example.org/tests/js/xpconnect/tests/mochitest/file_empty.html" />