| Index: LayoutTests/http/tests/misc/resource-timing-iframe-restored-from-history.html
|
| diff --git a/LayoutTests/http/tests/misc/resource-timing-iframe-restored-from-history.html b/LayoutTests/http/tests/misc/resource-timing-iframe-restored-from-history.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..694336cb96c89ed543016d071ecefc9d9faca481
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/misc/resource-timing-iframe-restored-from-history.html
|
| @@ -0,0 +1,24 @@
|
| +<!DOCTYPE html>
|
| +<script src="/js-test-resources/js-test.js"></script>
|
| +<iframe id="frame" src="resources/frame-initial-url.html"></iframe>
|
| +<script>
|
| +description('Tests that iframe restored from history does not report resource timing.');
|
| +window.jsTestIsAsync = true;
|
| +
|
| +function runTest() {
|
| + if (!sessionStorage.didNav) {
|
| + sessionStorage.didNav = true;
|
| + // Navigate a timeout to make sure we generate a history entry that we can go back to.
|
| + setTimeout(function() {
|
| + location.href = 'data:text/html,<script>alert("Going back.");history.back();</' + 'script>';
|
| + }, 0);
|
| + } else {
|
| + delete sessionStorage.didNav;
|
| + resources = performance.getEntriesByType('resource');
|
| + shouldBe('resources.length', '1');
|
| + shouldBeEqualToString('resources[0].name', 'http://127.0.0.1:8000/js-test-resources/js-test.js');
|
| + if (window.testRunner)
|
| + finishJSTest();
|
| + }
|
| +}
|
| +</script>
|
|
|