Bumping manifests a=b2g-bump
[gecko.git] / docshell / test / test_bug530396.html
blobf9fb79b4b7e564228afd35e159e1a6056c5b7746
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=530396
5 -->
6 <head>
7 <title>Test for Bug 530396</title>
8 <script type="application/javascript" src="/MochiKit/packed.js"></script>
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
12 </head>
13 <body>
14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=530396">Mozilla Bug 530396</a>
16 <p>
18 <iframe id="testFrame" src="http://mochi.test:8888/tests/docshell/test/bug530396-subframe.html"></iframe>
20 <pre id="test">
21 <script class="testbody" type="text/javascript">
23 // NOTE: If we ever make subframes do bfcache stuff, this test will need to be
24 // modified accordingly! It assumes that subframes do NOT get bfcached.
25 var onloadCount = 0;
27 var step = 0;
29 var gTestFrame = document.getElementById('testFrame');
31 SimpleTest.waitForExplicitFinish();
32 SimpleTest.requestFlakyTimeout("untriaged");
33 addLoadEvent(doNextStep);
35 function doNextStep() {
36 ++step;
37 switch (step) {
38 case 1:
39 is(onloadCount, 1, "Loaded initial page");
40 sendMouseEvent({type: "click"}, "target2", gTestFrame.contentWindow);
41 window.setTimeout(doNextStep, 1000);
42 break;
44 case 2:
45 is(onloadCount, 1, "opener must be null");
46 sendMouseEvent({type: "click"}, "target1", gTestFrame.contentWindow);
47 break;
49 case 3:
50 is(onloadCount, 2, "don't send referrer with rel=referrer");
51 SimpleTest.finish();
52 break;
55 </script>
56 </pre>
57 </html>