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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/browsers/history/the-history-interface/007.html

Issue 1984023002: Move web-platform-tests to wpt (part 1 of 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/browsers/history/the-history-interface/007.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/browsers/history/the-history-interface/007.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/browsers/history/the-history-interface/007.html
deleted file mode 100644
index 0c56bc38b6fe20b4ee605970f521707dc05e0c90..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/browsers/history/the-history-interface/007.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <title>Firing popstate after onload with pushed state</title>
- <meta name=timeout content=long>
- <script type="text/javascript" src="../../../../../../resources/testharness.js"></script>
- <script type="text/javascript" src="../../../../../../resources/testharnessreport.js"></script>
- </head>
- <body>
-
- <noscript><p>Enable JavaScript and reload</p></noscript>
- <div id="log">It looks like the browser stopped loading the page when encountering a .go(-1) command pointing to a pushed state. This will break the tests.</div>
- <script type="text/javascript">
-
-//spec (25 March 2011 draft) states that popstate must fire before onload if there is a pushed/replaced state that is navigated
-var popfired = false;
-setup({explicit_done:true});
-test(function () {
- assert_equals( history.state, null );
-}, 'history.state should initially be null');
-window.addEventListener('popstate',function (e) { popfired = e.state; },false);
-test(function () {
- history.pushState('state1','');
- history.pushState('state2','');
-}, 'history.pushState support is needed for this testcase');
-test(function () {
- assert_equals( history.state, 'state2' );
-}, 'history.state should reflect pushed state');
-if( history.pushState ) { history.go(-1); }
-window.onload = function () {
- test(function () {
- assert_true( !!popfired );
- }, 'popstate event should fire before onload fires');
- test(function () {
- assert_equals( popfired, 'state1' );
- }, 'the correct state should be restored when navigating during initial load');
- test(function () {
- assert_equals( history.state, 'state1' );
- }, 'history.state should reflect the navigated state onload');
- popfired = false;
- setTimeout(function () {
- test(function () {
- assert_false( !!popfired );
- }, 'popstate event should not fire after onload fires');
- test(function () {
- assert_equals( history.state, 'state1' );
- }, 'history.state should reflect the navigated state after onload');
- done();
- if( history.pushState ) { history.go(-1); } //go back to the start to avoid state recovery when reloading
- },100);
-};
-
- </script>
-
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698