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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location_reload.html

Issue 2482213003: Import WPT tests which require non-test HTML resources. (Closed)
Patch Set: Created 4 years, 1 month 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/wpt/html/browsers/history/the-location-interface/location_reload.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location_reload.html b/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location_reload.html
new file mode 100644
index 0000000000000000000000000000000000000000..eb2c21b38a307b6ac015f018a8192384455ac9fb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location_reload.html
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <title>location_reload</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+
+ <iframe></iframe>
+
+ <script>
+ var history_length;
+ async_test(function(t) {
+
+ var url = new URL("./location_reload-iframe.html", window.location).href;
+
+ window._pingCount = 0;
+ window._ping = t.step_func(function(innerURL) {
+ // Some browsers keep 'about:blank' in the session history
+ if (_pingCount == 0) {
+ history_length = history.length;
+ }
+ assert_equals(url, innerURL, "iframe url (" + _pingCount + ")");
+ assert_equals(history_length, history.length, "history length (" + _pingCount + ")");
+ _pingCount++;
+ if (_pingCount == 5) {
+ t.done();
+ }
+ });
+
+ var iframe = document.querySelector("iframe");
+ iframe.src = url;
+ history_length = history.length;
+ });
+ </script>
+
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698