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

Unified Diff: third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-scroll-into-view.html

Issue 2165763002: Fix layout tests that would fail if ScrollAnchoring was promoted to experimental (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments Created 4 years, 5 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/fast/scrolling/fixed-position-scroll-into-view.html
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-scroll-into-view.html b/third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-scroll-into-view.html
index 2c26180dfddce484a701570f87a936a3d2f0cf7c..b5201eb852a69d742d0dd3410531c45754dc96a1 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-scroll-into-view.html
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-scroll-into-view.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<script src="../../resources/js-test.js"></script>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
<style>
.target {
position: fixed;
@@ -16,24 +17,17 @@
<div class="target" id="t2"></div>
</div>
<script>
-</script>
-
-<script>
-
-description("Tests that scrolling to a fixed position element does not scroll the viewport.");
-
-location.hash = "#t1";
-shouldBe("scrollY", "0");
-
-location.hash = "#t2";
-shouldBe("scrollY", "200");
+test(function(t) {
+ location.hash = "#t1";
+ assert_equals(window.scrollY, 0);
-location.hash = "#t1";
-shouldBe("scrollY", "200");
+ location.hash = "#t2";
+ assert_equals(window.scrollY, 200);
-location.hash = "#";
-shouldBe("scrollY", "0");
+ location.hash = "#t1";
+ assert_equals(window.scrollY, 200);
+ location.hash = "#";
+ assert_equals(window.scrollY, 0);
+}, 'Tests that scrolling to a fixed position element does not scroll the viewport.');
</script>
-</body>
-<html>

Powered by Google App Engine
This is Rietveld 408576698