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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-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-navigation-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-navigation-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-navigation-cross-origin.html
deleted file mode 100644
index 29b56d841f78592ce4bef11e34b6a7dfd73c4cdc..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-cross-origin.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE html>
-<meta name=timeout content=long>
-<title>Correct behaviour of scroll restoration mode is 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 blank1
- // 2. load blank2
- // 3. go back to blank1
- async_test(function(t) {
- var iframe = document.querySelector('iframe');
- var baseURL = location.href.substring(0, location.href.lastIndexOf('/'));
-
- var steps = [
- function() {
- iframe.src = 'resources/blank1.html';
- },
- function() {
- assert_equals(iframe.contentWindow.location.href, baseURL + '/resources/blank1.html', 'should be on first blank page');
- iframe.contentWindow.history.scrollRestoration = 'manual';
- assert_equals(iframe.contentWindow.history.scrollRestoration, 'manual');
- iframe.contentWindow.scrollTo(500, 500);
- assert_equals(iframe.contentWindow.scrollX, 500, 'scripted scrolling should take effect');
- assert_equals(iframe.contentWindow.scrollY, 500, 'scripted scrolling should take effect');
- setTimeout(next, 0);
- },
- function() {
- // navigate to new page
- iframe.src = 'resources/blank2.html';
- },
- function() {
- assert_equals(iframe.contentWindow.location.href, baseURL + '/resources/blank2.html', 'should be on second blank page');
- assert_equals(iframe.contentWindow.history.scrollRestoration, 'auto', 'new page loads should set scrollRestoration to "auto"');
- setTimeout(next, 0);
- }, function() {
- iframe.contentWindow.history.back();
- }, function() {
- // coming back scrollRestoration should be restored to 'manual' and respected
- assert_equals(iframe.contentWindow.location.href, baseURL + '/resources/blank1.html', 'should be back on first blank page');
- assert_equals(iframe.contentWindow.history.scrollRestoration, 'manual', 'navigating back should retain scrollRestoration value');
- assert_equals(iframe.contentWindow.scrollX, 0, 'horizontal scroll offset should not be restored');
- assert_equals(iframe.contentWindow.scrollY, 0, 'vertical scroll offset should not be restored');
- t.done();
- }
- ];
-
- var stepCount = 0;
- var next = t.step_func(function() {
- steps[stepCount++]();
- });
-
- iframe.onload = next;
- next();
- }, 'Navigating to new page should reset to "auto" and navigating back should restore and respect scroll restoration mode');
-
-</script>

Powered by Google App Engine
This is Rietveld 408576698