author | David Bokan <bokan@chromium.org> |
Wed, 26 Aug 2020 08:48:37 +0000 | |
changeset 546421 | 2e392dabab15e742be1281e71bda98f1d170b71b |
parent 546420 | eb844e2c4625f0c4689eabc3400a5d5dd77c5536 |
child 546422 | 7fb3f25b1256f3adf41f5ead0fb1739e58719353 |
push id | 37735 |
push user | abutkovits@mozilla.com |
push date | Thu, 27 Aug 2020 21:29:40 +0000 |
treeherder | mozilla-central@109f3a4de567 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | testonly |
bugs | 1659608, 25063, 1057795, 2343634, 799740 |
milestone | 82.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
testing/web-platform/tests/scroll-to-text-fragment/scroll-to-text-fragment-api.html | file | annotate | diff | comparison | revisions |
--- a/testing/web-platform/tests/scroll-to-text-fragment/scroll-to-text-fragment-api.html +++ b/testing/web-platform/tests/scroll-to-text-fragment/scroll-to-text-fragment-api.html @@ -3,25 +3,25 @@ <meta charset=utf-8> <link rel="help" href="https://wicg.github.io/ScrollToTextFragment/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/resources/testdriver.js"></script> <script src="/resources/testdriver-vendor.js"></script> <script> test(t => { - assert_equals(typeof(window.location.fragmentDirective), 'object', 'window.location.fragmentDirective is defined'); -}, 'Scroll to text is feature detectable via window.location.fragmentDirective'); + assert_equals(typeof(document.fragmentDirective), 'object', 'document.fragmentDirective is defined'); +}, 'Scroll to text is feature detectable via document.fragmentDirective'); test(t =>{ - window.location.fragmentDirective = 'text=test'; - assert_equals(window.scrollY, 0, 'Setting window.location.fragmentDirective did not have an effect on scroll position'); - assert_equals(typeof(window.location.fragmentDirective), 'object', 'window.location.fragmentDirective is still an object type'); - assert_equals(Object.keys(window.location.fragmentDirective).length, 0, 'window.location.fragmentDirective has no properties'); -}, 'Setting window.location.fragmentDirective has no effect'); + document.fragmentDirective = 'text=test'; + assert_equals(window.scrollY, 0, 'Setting document.fragmentDirective did not have an effect on scroll position'); + assert_equals(typeof(document.fragmentDirective), 'object', 'document.fragmentDirective is still an object type'); + assert_equals(Object.keys(document.fragmentDirective).length, 0, 'document.fragmentDirective has no properties'); +}, 'Setting document.fragmentDirective has no effect'); </script> <style> body { height: 3200px; } #text { position: absolute; top: 3000px;