Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1627)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/misc/resource-timing-iframe-restored-from-history.html

Issue 2741513002: [Merge M-57] Add a warning for the deprecation of content-initiated data URL navigations (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698