| <script src="/js-test-resources/js-test.js"></script> |
| description('Tests that an iframe restored from history does not report resource timing.'); |
| window.jsTestIsAsync = true; |
| internals.clearMemoryCache(); |
| if (!sessionStorage.didNav) { |
| sessionStorage.didNav = true; |
| window.addEventListener('message', (event) => { |
| location.href = 'resources/alert-then-back.html'; |
| document.getElementById('target-iframe').contentWindow.postMessage('navigate', '*'); |
| 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'); |
| <iframe id="target-iframe" src="http://localhost:8080/misc/resources/navigate-on-message.html"></iframe> |