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

Unified Diff: LayoutTests/http/tests/misc/resource-timing-iframe-restored-from-history.html

Issue 1257953003: Do not report Resource Timing for iframe navigations when restored from history (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/misc/resource-timing-iframe-restored-from-history-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d46e13bda816cf5e14483140eb1bc79f272ef4f3
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resource-timing-iframe-restored-from-history.html
@@ -0,0 +1,22 @@
+<!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;
+ shouldBe("performance.getEntriesByName('http://127.0.0.1:8000/misc/resources/frame-final-url.html').length", '0');
Mike West 2015/07/27 12:38:17 Can you verify that the correct entry is in the li
Kunihiko Sakamoto 2015/07/28 03:17:01 Done.
+ if (window.testRunner)
+ finishJSTest();
+ }
+}
+</script>
« no previous file with comments | « no previous file | LayoutTests/http/tests/misc/resource-timing-iframe-restored-from-history-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698