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

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

Issue 2408493002: Import wpt@357b83b809e3cbc7a1805e7c3ca108a7980d782f (Closed)
Patch Set: Added one more win7-specific baseline Created 4 years, 2 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/wpt/html/browsers/history/the-location-interface/location_hash.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location_hash.html b/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location_hash.html
index 91c3f8205d3b4eeddc216932c60c73e05aabd69f..74d2d01543086e841cdfd39c95a2f956a9dd1f32 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location_hash.html
+++ b/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location_hash.html
@@ -7,6 +7,8 @@
</head>
<body>
<div id="log"></div>
+ <iframe id="srcdoc-iframe"
+ srcdoc="<div style='height: 200vh'></div><div id='test'></div>"></iframe>
<script>
test(function () {
window.history.pushState(1, document.title, '#x=1');
@@ -15,6 +17,17 @@
assert_equals(hash, "#x=1", "hash");
}, "location hash");
+
+ var t = async_test("Setting location.hash on srcdoc iframe");
+ addEventListener("load", t.step_func_done(function() {
+ var frameWin = document.getElementById("srcdoc-iframe").contentWindow;
+ assert_equals(frameWin.location.href, "about:srcdoc");
+ assert_equals(frameWin.scrollY, 0, "Should not have scrolled yet");
+ frameWin.location.hash = "test";
+ assert_equals(frameWin.location.href, "about:srcdoc#test");
+ assert_true(frameWin.scrollY > frameWin.innerHeight,
+ "Should have scrolled by more than one viewport height");
+ }));
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698