Bumping manifests a=b2g-bump
[gecko.git] / docshell / test / test_bug634834.html
blob88f068518f4f50d04249b0236ea00fe0c19d79cd
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=634834
5 -->
6 <head>
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"/>
11 </head>
12 <body>
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.
29 do {
30 var r = new XMLHttpRequest();
31 r.open("GET", location.href, false);
32 r.overrideMimeType("text/plain");
33 try { r.send(null); }
34 catch (e) {}
35 } while (!loadedAfterPushstate);
36 });
38 try {
39 $('iframe').contentWindow.history.pushState(obj, '');
40 ok(false, 'pushState should throw exception.');
42 catch(e) {
43 ok(true, 'pushState threw an exception.');
45 SimpleTest.finish();
48 </script>
50 <iframe id='iframe' src='file_bug634834.html' onload='iframe_loaded()'></iframe>
52 </body>
53 </html>