Bumping manifests a=b2g-bump
[gecko.git] / docshell / test / test_bug580069.html
blob70d3b4a3e689c0741c89249d61240c69ea1b0a24
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=580069
5 -->
6 <head>
7 <title>Test for Bug 580069</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=580069">Mozilla Bug 580069</a>
15 <iframe id='iframe' src='file_bug580069_1.html'></iframe>
17 <script type="application/javascript">
19 SimpleTest.waitForExplicitFinish();
21 var iframe = document.getElementById('iframe');
22 var iframeCw = iframe.contentWindow;
24 // Called when file_bug580069_1.html loads.
25 function page1Load() {
26 // This should cause us to load file 2.
27 dump('page1Load\n');
28 iframeCw.document.getElementById('form').submit();
31 // Called when file_bug580069_2.html loads.
32 var page2Loads = 0;
33 function page2Load(method) {
35 dump("iframe's location is: " + iframeCw.location + ", method is " + method + "\n");
37 if (page2Loads == 0) {
38 is(method, "POST", "Method for first load should be POST.");
39 iframeCw.history.replaceState('', '', '?replaced');
41 // This refresh shouldn't pop up the "are you sure you want to refresh a page
42 // with POST data?" dialog. If it does, this test will hang and fail, and
43 // we'll see 'Refreshing iframe...' at the end of the test log.
44 dump('Refreshing iframe...\n');
45 iframeCw.location.reload();
47 else if (page2Loads == 1) {
48 is(method, "GET", "Method for second load should be GET.");
49 is(iframeCw.location.search, "?replaced", "Wrong search on iframe after refresh.");
50 SimpleTest.finish();
52 else {
53 ok(false, "page2Load should only be called twice.");
56 page2Loads++;
58 </script>
60 </body>
61 </html>