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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.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/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html
deleted file mode 100644
index 73ca60722dae3fa76d38a48c440f37ae1fbdde39..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!DOCTYPE html>
-<meta name=timeout content=long>
-<title>Precedence of scroll restoration mode over fragment scrolling in cross-origin history traversal</title>
-<style>
- iframe {
- height: 300px;
- width: 300px;
- }
-</style>
-
-<body>
- <iframe></iframe>
-</body>
-
-<script src="../../../../../../../resources/testharness.js"></script>
-<script src="../../../../../../../resources/testharnessreport.js"></script>
-<script type="text/javascript">
- 'use strict';
-
- // The test does the following navigation steps for iframe
- // 1. load page-with-fragment.html#fragment
- // 2. load blank1
- // 3. go back to page-with-fragment.html
- async_test(function(t) {
- var iframe = document.querySelector('iframe');
- var baseURL = location.href.substring(0, location.href.lastIndexOf('/'));
-
- var steps = [
- function() {
- iframe.src = 'resources/page-with-fragment.html#fragment';
- }, function() {
- assert_equals(iframe.contentWindow.location.href, baseURL + '/resources/page-with-fragment.html#fragment', 'should be on page-with-fragment page');
- // wait one animation frame to ensure layout is run and fragment scrolling is complete
- iframe.contentWindow.requestAnimationFrame(function() {
- assert_equals(iframe.contentWindow.scrollY, 800, 'should scroll to fragment');
-
- iframe.contentWindow.history.scrollRestoration = 'manual';
- assert_equals(iframe.contentWindow.history.scrollRestoration, 'manual');
- setTimeout(next, 0);
- });
- }, function() {
- // navigate to a new page from a different origin
- iframe.src = iframe.src.replace("http://", "http://www.").replace("page-with-fragment.html#fragment", "blank1.html");
- }, function() {
- // going back causes the iframe to traverse back
- history.back();
- }, function() {
- // coming back from history, scrollRestoration should be set to manual and respected
- assert_equals(iframe.contentWindow.location.href, baseURL + '/resources/page-with-fragment.html#fragment', 'should be back on page-with-fragment page');
- iframe.contentWindow.requestAnimationFrame(function() {
- assert_equals(iframe.contentWindow.history.scrollRestoration, 'manual', 'navigating back should retain scrollRestoration value');
- assert_equals(iframe.contentWindow.scrollX, 0, 'should not scroll to fragment');
- assert_equals(iframe.contentWindow.scrollY, 0, 'should not scroll to fragment');
- t.done();
- });
- }
- ];
-
- var stepCount = 0;
- var next = t.step_func(function() {
- steps[stepCount++]();
- });
-
- iframe.onload = next;
- next();
- }, 'Manual scroll restoration should take precedent over scrolling to fragment in cross origin navigation');
-</script>

Powered by Google App Engine
This is Rietveld 408576698