4 https://bugzilla.mozilla.org/show_bug.cgi?id=634834
7 <title>Test for Bug
634834</title>
8 <script type=
"application/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <script type=
"application/javascript" src=
"/tests/SimpleTest/EventUtils.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=634834">Mozilla Bug
634834</a>
15 <script type='application/javascript;version=
1.7'
>
16 SimpleTest.waitForExplicitFinish();
18 function iframe_loaded() {
19 var loadedAfterPushstate = false;
20 $('iframe').onload = function() {
21 loadedAfterPushstate = true;
24 var obj = { name: 'name' };
25 obj.__defineGetter__('a', function() {
26 $('iframe').contentWindow.location = 'http://example.com';
28 // Wait until we've loaded example.com.
30 var r = new XMLHttpRequest();
31 r.open(
"GET", location.href, false);
32 r.overrideMimeType(
"text/plain");
35 } while (!loadedAfterPushstate);
39 $('iframe').contentWindow.history.pushState(obj, '');
40 ok(false, 'pushState should throw exception.');
43 ok(true, 'pushState threw an exception.');
50 <iframe id='iframe' src='file_bug634834.html' onload='iframe_loaded()'
></iframe>