OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="/js-test-resources/js-test.js"></script> | 2 <script src="/js-test-resources/js-test.js"></script> |
3 <iframe id="frame" src="resources/frame-initial-url.html"></iframe> | 3 <iframe id="frame" src="resources/frame-initial-url.html"></iframe> |
4 <script> | 4 <script> |
5 description('Tests that iframe restored from history does not report resource ti
ming.'); | 5 description('Tests that iframe restored from history does not report resource ti
ming.'); |
6 window.jsTestIsAsync = true; | 6 window.jsTestIsAsync = true; |
7 | 7 |
8 function runTest() { | 8 function runTest() { |
9 if (!sessionStorage.didNav) { | 9 if (!sessionStorage.didNav) { |
10 sessionStorage.didNav = true; | 10 sessionStorage.didNav = true; |
11 // Navigate a timeout to make sure we generate a history entry that we c
an go back to. | 11 // Navigate a timeout to make sure we generate a history entry that we c
an go back to. |
12 setTimeout(function() { | 12 setTimeout(function() { |
13 location.href = 'data:text/html,<script>alert("Going back.");history
.back();</' + 'script>'; | 13 location.href = 'resources/alert-then-back.html'; |
14 }, 0); | 14 }, 0); |
15 } else { | 15 } else { |
16 delete sessionStorage.didNav; | 16 delete sessionStorage.didNav; |
17 resources = performance.getEntriesByType('resource'); | 17 resources = performance.getEntriesByType('resource'); |
18 shouldBe('resources.length', '1'); | 18 shouldBe('resources.length', '1'); |
19 shouldBeEqualToString('resources[0].name', 'http://127.0.0.1:8000/js-tes
t-resources/js-test.js'); | 19 shouldBeEqualToString('resources[0].name', 'http://127.0.0.1:8000/js-tes
t-resources/js-test.js'); |
20 if (window.testRunner) | 20 if (window.testRunner) |
21 finishJSTest(); | 21 finishJSTest(); |
22 } | 22 } |
23 } | 23 } |
24 </script> | 24 </script> |
OLD | NEW |