Bug 1659608 [wpt PR 25063] - Move location.fragmentDirective to document, a=testonly
authorDavid Bokan <bokan@chromium.org>
Wed, 26 Aug 2020 08:48:37 +0000
changeset 546421 2e392dabab15e742be1281e71bda98f1d170b71b
parent 546420 eb844e2c4625f0c4689eabc3400a5d5dd77c5536
child 546422 7fb3f25b1256f3adf41f5ead0fb1739e58719353
push id37735
push userabutkovits@mozilla.com
push dateThu, 27 Aug 2020 21:29:40 +0000
treeherdermozilla-central@109f3a4de567 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1659608, 25063, 1057795, 2343634, 799740
milestone82.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
Bug 1659608 [wpt PR 25063] - Move location.fragmentDirective to document, a=testonly Automatic update from web-platform-tests Move location.fragmentDirective to document This CL moves the window.location.fragmentDirective object, used for feature detecting support for text fragments, to document.fragmentDirective. This is a web-facing change. Intent-to-ship thread: https://groups.google.com/a/chromium.org/d/msg/blink-dev/ygBV2vWIX-o/kbYwrJgDAgAJ Bug: 1057795 Change-Id: I1a7df51a1cde4c39a3595d7d83b118403db5cd5e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343634 Commit-Queue: David Bokan <bokan@chromium.org> Reviewed-by: Ken Buchanan <kenrb@chromium.org> Reviewed-by: Nick Burris <nburris@chromium.org> Reviewed-by: Yoav Weiss <yoavweiss@chromium.org> Cr-Commit-Position: refs/heads/master@{#799740} -- wpt-commits: f8632b0ebf552d519cc1d7ec63511948c7987f63 wpt-pr: 25063
testing/web-platform/tests/scroll-to-text-fragment/scroll-to-text-fragment-api.html
--- 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;