diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/browsing-the-web')
-rw-r--r-- | testing/web-platform/tests/html/browsers/browsing-the-web/scroll-to-fragid/scroll-position-inline-nearest.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/browsing-the-web/scroll-to-fragid/scroll-position-inline-nearest.html b/testing/web-platform/tests/html/browsers/browsing-the-web/scroll-to-fragid/scroll-position-inline-nearest.html new file mode 100644 index 0000000000..4aab0aa5e5 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/browsing-the-web/scroll-to-fragid/scroll-position-inline-nearest.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html style="writing-mode: vertical-lr;"> +<head> +<meta charset="UTF-8"> +<title>Fragment Navigation: inline start position should not scroll out of content range</title> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#scroll-to-the-fragment-identifier"> +<link rel="author" href="mailto:mrobinson@igalia.com" title="Martin Robinson"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +</head> +<body> + <!-- When scrolling to this fragment the viewport inline position should not + change because, it is already fully enclosed by the viewport and page width. --> + <div id="test1" style="position: absolute; top: 5000px; left: 100px; height: 100px; width: 100px;"></div> +<script> + +var t = async_test("ScrollToFragment"); +t.step(() => { + location.hash = "test1"; + setTimeout(t.step_func(() => { + assert_true(window.scrollY > 0); + assert_true(window.scrollY < 5000); + assert_equals(window.scrollX, 0); + t.done(); + })); +}); + +</script> +</body> +</html> |