Bug 1630624 [wpt PR 23004] - Remove assert_precondition usages in *-timing/, a=testonly
authorStephen McGruer <smcgruer@chromium.org>
Wed, 22 Apr 2020 04:15:13 +0000
changeset 525872 16f2316d48c75c3353f3d46d3a5589411a36e487
parent 525871 d2dbb4e513d2c920e412744bd957d86083588cdd
child 525873 0263cd7149cc4d54a9be24793d76666bc494349a
push id113946
push userwptsync@mozilla.com
push dateFri, 24 Apr 2020 13:18:47 +0000
treeherderautoland@2eff17c17783 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1630624, 23004
milestone77.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 1630624 [wpt PR 23004] - Remove assert_precondition usages in *-timing/, a=testonly Automatic update from web-platform-tests Replace assert_precondition with assert_implements in paint-timing/ assert_precondition is deprecated (see https://github.com/web-platform-tests/rfcs/blob/master/rfcs/assert_precondition_rename.md). Since PerformancePaintTiming is not an OPTIONAL part of the Paint Timing spec, these tests should use assert_implements. -- Replace assert_precondition with assert_implements in longtask-timing/ assert_precondition is deprecated (see https://github.com/web-platform-tests/rfcs/blob/master/rfcs/assert_precondition_rename.md). Since PerformanceLongTaskTiming is not an OPTIONAL part of the Long Tasks spec, these tests should use assert_implements. -- Replace assert_precondition with assert_implements in event-timing/ assert_precondition is deprecated (see https://github.com/web-platform-tests/rfcs/blob/master/rfcs/assert_precondition_rename.md). Since PerformanceElementTiming is not an OPTIONAL part of the Element Timing spec and EventCount is not an OPTIONAL part of the Event Timing spec, these tests should use assert_implements. -- Replace assert_precondition with assert_implements in element-timing/ assert_precondition is deprecated (see https://github.com/web-platform-tests/rfcs/blob/master/rfcs/assert_precondition_rename.md). Since PerformanceElementTiming is not an OPTIONAL part of the Element Timing spec, these tests should use assert_implements. -- wpt-commits: f3bf3bbd75dbab84e13406ddd86c6a7d00b39986, 4eee874b2c46f4ffff81112b8b3ff490e5092238, 67f7dd268503f106abdc8b38f617a4ba2f299f95, dcfc14df9aa42d2faa708598db34364ecd09b583 wpt-pr: 23004
testing/web-platform/tests/element-timing/background-image-data-uri.html
testing/web-platform/tests/element-timing/background-image-multiple-elements.html
testing/web-platform/tests/element-timing/background-image-stretched.html
testing/web-platform/tests/element-timing/buffer-before-onload.html
testing/web-platform/tests/element-timing/buffered-flag.html
testing/web-platform/tests/element-timing/cross-origin-element.sub.html
testing/web-platform/tests/element-timing/cross-origin-iframe-element.sub.html
testing/web-platform/tests/element-timing/css-generated-text.html
testing/web-platform/tests/element-timing/disconnect-image.html
testing/web-platform/tests/element-timing/element-only-when-fully-active.html
testing/web-platform/tests/element-timing/first-letter-background.html
testing/web-platform/tests/element-timing/fixed-id-identifier.html
testing/web-platform/tests/element-timing/image-TAO.sub.html
testing/web-platform/tests/element-timing/image-carousel.html
testing/web-platform/tests/element-timing/image-clipped-svg.html
testing/web-platform/tests/element-timing/image-data-uri.html
testing/web-platform/tests/element-timing/image-not-added.html
testing/web-platform/tests/element-timing/image-not-fully-visible.html
testing/web-platform/tests/element-timing/image-rect-iframe.html
testing/web-platform/tests/element-timing/image-src-change.html
testing/web-platform/tests/element-timing/image-with-css-scale.html
testing/web-platform/tests/element-timing/image-with-rotation.html
testing/web-platform/tests/element-timing/images-repeated-resource.html
testing/web-platform/tests/element-timing/invisible-images.html
testing/web-platform/tests/element-timing/multiple-background-images.html
testing/web-platform/tests/element-timing/multiple-redirects-TAO.html
testing/web-platform/tests/element-timing/observe-background-image.html
testing/web-platform/tests/element-timing/observe-child-element.html
testing/web-platform/tests/element-timing/observe-elementtiming.html
testing/web-platform/tests/element-timing/observe-empty-attribute.html
testing/web-platform/tests/element-timing/observe-multiple-images.html
testing/web-platform/tests/element-timing/observe-shadow-image.html
testing/web-platform/tests/element-timing/observe-shadow-text.html
testing/web-platform/tests/element-timing/observe-svg-image.html
testing/web-platform/tests/element-timing/observe-text.html
testing/web-platform/tests/element-timing/observe-video-poster.html
testing/web-platform/tests/element-timing/progressively-loaded-image.html
testing/web-platform/tests/element-timing/rectangular-image.html
testing/web-platform/tests/element-timing/redirects-tao-star.html
testing/web-platform/tests/element-timing/retrievability.html
testing/web-platform/tests/element-timing/same-origin-redirects.html
testing/web-platform/tests/element-timing/scroll-to-text.html
testing/web-platform/tests/element-timing/text-with-display-style.html
testing/web-platform/tests/element-timing/toJSON.html
testing/web-platform/tests/event-timing/buffered-flag.html
testing/web-platform/tests/event-timing/click-timing.html
testing/web-platform/tests/event-timing/crossiframe.html
testing/web-platform/tests/event-timing/event-click-counts.html
testing/web-platform/tests/event-timing/event-counts-zero.html
testing/web-platform/tests/event-timing/only-observe-firstInput.html
testing/web-platform/tests/event-timing/programmatic-click-not-observed.html
testing/web-platform/tests/event-timing/retrievability.html
testing/web-platform/tests/event-timing/retrieve-firstInput.html
testing/web-platform/tests/event-timing/timingconditions.html
testing/web-platform/tests/event-timing/toJSON.html
testing/web-platform/tests/longtask-timing/buffered-flag.window.js
testing/web-platform/tests/longtask-timing/containerTypes.html
testing/web-platform/tests/longtask-timing/long-microtask.window.js
testing/web-platform/tests/longtask-timing/longtask-attributes.html
testing/web-platform/tests/longtask-timing/longtask-in-childiframe-crossorigin.html
testing/web-platform/tests/longtask-timing/longtask-in-childiframe.html
testing/web-platform/tests/longtask-timing/longtask-in-externalscript.html
testing/web-platform/tests/longtask-timing/longtask-in-parentiframe.html
testing/web-platform/tests/longtask-timing/longtask-in-raf.html
testing/web-platform/tests/longtask-timing/longtask-in-sibling-iframe-crossorigin.html
testing/web-platform/tests/longtask-timing/longtask-in-sibling-iframe.html
testing/web-platform/tests/longtask-timing/longtask-tojson.html
testing/web-platform/tests/longtask-timing/shared-renderer/longtask-in-new-window.html
testing/web-platform/tests/longtask-timing/supported-longtask-types.window.js
testing/web-platform/tests/paint-timing/basetest.html
testing/web-platform/tests/paint-timing/buffered-flag.window.js
testing/web-platform/tests/paint-timing/child-painting-first-image.html
testing/web-platform/tests/paint-timing/fcp-only/fcp-canvas-context.html
testing/web-platform/tests/paint-timing/fcp-only/fcp-gradient.html
testing/web-platform/tests/paint-timing/fcp-only/fcp-text-input.html
testing/web-platform/tests/paint-timing/fcp-only/fcp-video-frame.html
testing/web-platform/tests/paint-timing/fcp-only/fcp-video-poster.html
testing/web-platform/tests/paint-timing/fcp-only/fcp-with-rtl.html
testing/web-platform/tests/paint-timing/first-contentful-bg-image.html
testing/web-platform/tests/paint-timing/first-contentful-canvas.html
testing/web-platform/tests/paint-timing/first-contentful-image.html
testing/web-platform/tests/paint-timing/first-contentful-paint.html
testing/web-platform/tests/paint-timing/first-contentful-svg.html
testing/web-platform/tests/paint-timing/first-image-child.html
testing/web-platform/tests/paint-timing/first-paint-bg-color.html
testing/web-platform/tests/paint-timing/first-paint-only.html
testing/web-platform/tests/paint-timing/paint-visited.html
testing/web-platform/tests/paint-timing/resources/utils.js
testing/web-platform/tests/paint-timing/sibling-painting-first-image.html
testing/web-platform/tests/paint-timing/supported-paint-type.window.js
--- a/testing/web-platform/tests/element-timing/background-image-data-uri.html
+++ b/testing/web-platform/tests/element-timing/background-image-data-uri.html
@@ -13,17 +13,17 @@ body {
 }
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   let beforeRender = performance.now();
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         // Only the first characters of the data URI are included in the entry.
         const uriPrefix = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKAQMAAAC3/F3+AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAA';
         checkElementWithoutResourceTiming(entry, uriPrefix, 'my_div', 'target',
             beforeRender, document.getElementById('target'));
--- a/testing/web-platform/tests/element-timing/background-image-multiple-elements.html
+++ b/testing/web-platform/tests/element-timing/background-image-multiple-elements.html
@@ -18,17 +18,17 @@ body {
   height: 100px;
 }
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     let beforeRender = performance.now();
     let numObservedElements = 0;
     let observedDiv1 = false;
     let observedDiv2Img = false;
     let observedDiv2Txt = false;
     const pathname = window.location.origin + '/element-timing/resources/square100.png';
     const observer = new PerformanceObserver(
       t.step_func(function(entryList) {
--- a/testing/web-platform/tests/element-timing/background-image-stretched.html
+++ b/testing/web-platform/tests/element-timing/background-image-stretched.html
@@ -13,17 +13,17 @@ body {
 }
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   let beforeRender = performance.now();
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         const pathname = window.location.origin + '/element-timing/resources/square100.png';
         checkElement(entry, pathname, 'my_div', 'target', beforeRender,
             document.getElementById('target'));
         // The background image extends to occupy to full size of the div.
--- a/testing/web-platform/tests/element-timing/buffer-before-onload.html
+++ b/testing/web-platform/tests/element-timing/buffer-before-onload.html
@@ -8,17 +8,17 @@
 <body>
 <img src=resources/slow-image.py?name=square20.png&sleep=500>
 <script>
   /*
   In this test, a slow image is added to the frame to delay onload. The entry
   is available from the observer with the buffered flag set to true.
   */
   async_test(function(t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     beforeRender = performance.now();
     const img = document.createElement('img');
     img.src = 'resources/square20.jpg';
     img.setAttribute('elementtiming', 'my_image');
     img.setAttribute('id', 'my_id');
     document.body.appendChild(img);
 
     // this PerformanceObserver should be notified about the previously
--- a/testing/web-platform/tests/element-timing/buffered-flag.html
+++ b/testing/web-platform/tests/element-timing/buffered-flag.html
@@ -7,17 +7,17 @@ body {
   margin: 0;
 }
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   async_test(t => {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const beforeRender = performance.now();
     const img = document.createElement('img');
     // Initial observer used to know when entry has been dispatched
     new PerformanceObserver(() => {
       // Second observer should require buffered flag to receive the already-dispatched entry.
       new PerformanceObserver(t.step_func_done(entryList => {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
--- a/testing/web-platform/tests/element-timing/cross-origin-element.sub.html
+++ b/testing/web-platform/tests/element-timing/cross-origin-element.sub.html
@@ -7,17 +7,17 @@ body {
   margin: 0;
 }
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   async_test((t) => {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     let img;
     const pathname = 'http://{{domains[www]}}:{{ports[http][1]}}'
           + '/element-timing/resources/square100.png';
     const observer = new PerformanceObserver(
       t.step_func_done((entryList) => {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         checkElement(entry, pathname, 'my_image', 'the_id', 0, img);
--- a/testing/web-platform/tests/element-timing/cross-origin-iframe-element.sub.html
+++ b/testing/web-platform/tests/element-timing/cross-origin-iframe-element.sub.html
@@ -2,17 +2,17 @@
 <meta charset=utf-8>
 <title>Element Timing: do NOT observe elements from cross-origin iframes</title>
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   async_test((t) => {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done((entryList) => {
         assert_unreached("We should not observe a cross origin element.");
       })
     );
     observer.observe({entryTypes: ['element']});
     // We add the iframe during onload to be sure that the observer is registered
     // in time for it to observe the element timing.
--- a/testing/web-platform/tests/element-timing/css-generated-text.html
+++ b/testing/web-platform/tests/element-timing/css-generated-text.html
@@ -12,17 +12,17 @@ body {
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <p elementtiming='my_text' id='text_id'></p>
 <script>
   async_test(function (t) {
     const beforeRender = performance.now();
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         checkTextElement(entry, 'my_text', 'text_id', beforeRender, document.getElementById('text_id'));
         assert_equals(entry.intersectionRect.left, 20, 'left should be 20.');
         assert_equals(entry.intersectionRect.top, 20, 'top should be 20.');
         // Try a lower bound of height=10, width=80 for the generated text.
--- a/testing/web-platform/tests/element-timing/disconnect-image.html
+++ b/testing/web-platform/tests/element-timing/disconnect-image.html
@@ -4,17 +4,17 @@
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   let beforeRender;
   let img;
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         const pathname = window.location.origin + '/element-timing/resources/square100.png';
         // This method will check that entry.element is |img|.
         checkElement(entry, pathname, 'my_image', 'my_id', beforeRender, img);
 
--- a/testing/web-platform/tests/element-timing/element-only-when-fully-active.html
+++ b/testing/web-platform/tests/element-timing/element-only-when-fully-active.html
@@ -3,17 +3,17 @@
 <title>ElementTiming: element is only exposed for fully active documents.</title>
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <iframe src="resources/iframe-stores-entry.html" id="ifr"></iframe>
 <script>
   let t = async_test('Only expose element attribute for fully active documents');
   t.step(() => {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
   });
   window.triggerTest = t.step_func_done(elementEntry => {
     assert_not_equals(elementEntry.element, null);
     const iframe = document.getElementById('ifr');
     iframe.remove();
     assert_equals(elementEntry.element, null);
   });
 </script>
--- a/testing/web-platform/tests/element-timing/first-letter-background.html
+++ b/testing/web-platform/tests/element-timing/first-letter-background.html
@@ -11,17 +11,17 @@
 }
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   let beforeRender = performance.now();
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const div = document.getElementById('target');
     let textObserved = false;
     let imageObserved = false;
     function calculateSize(entry) {
       const ir = entry.intersectionRect;
       return (ir.right - ir.left) * (ir.bottom - ir.top);
     }
     const observer = new PerformanceObserver(
--- a/testing/web-platform/tests/element-timing/fixed-id-identifier.html
+++ b/testing/web-platform/tests/element-timing/fixed-id-identifier.html
@@ -3,17 +3,17 @@
 <title>Element Timing: entry does not change its id or identifier value</title>
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <p elementtiming='my_identifier' id='my_id'>Text</p>
 <script>
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         assert_equals(entry.id, 'my_id');
         assert_equals(entry.identifier, 'my_identifier');
         const element = document.getElementById('my_id');
         element.id = 'other_id';
--- a/testing/web-platform/tests/element-timing/image-TAO.sub.html
+++ b/testing/web-platform/tests/element-timing/image-TAO.sub.html
@@ -2,17 +2,17 @@
 <meta charset=utf-8>
 <title>Element Timing: observe cross origin images with various Timing-Allow-Origin headers</title>
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   async_test(t => {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const beforeRender = performance.now();
     const remote_img = 'http://{{domains[www]}}:{{ports[http][1]}}/element-timing/resources/TAOImage.py?'
         + 'origin=' + window.location.origin +'&tao=';
     const valid_tao = ['wildcard', 'origin', 'multi', 'multi_wildcard', 'match_origin', 'match_wildcard'];
     function addImage(tao) {
       const img = document.createElement('img');
       img.src = remote_img + tao;
       img.setAttribute('elementtiming', tao);
--- a/testing/web-platform/tests/element-timing/image-carousel.html
+++ b/testing/web-platform/tests/element-timing/image-carousel.html
@@ -21,17 +21,17 @@ body {
   </div>
   <div class='carousel-image'>
     <img src="resources/square100.png" elementtiming='image1' id='image1'>
   </div>
 </div>
 
 <script>
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const beforeRenderTimes = [];
     let entry_count = 0;
     const entry_count_per_element = [0, 0];
     const pathname0 = window.location.origin + '/element-timing/resources/circle.svg';
     const pathname1 = window.location.origin + '/element-timing/resources/square100.png';
     const observer = new PerformanceObserver(t.step_func(list => {
       list.getEntries().forEach(entry => {
         if (entry_count % 2 == 0) {
--- a/testing/web-platform/tests/element-timing/image-clipped-svg.html
+++ b/testing/web-platform/tests/element-timing/image-clipped-svg.html
@@ -2,17 +2,17 @@
 <meta charset=utf-8>
 <title>Element Timing: observe image inside SVG with small dimensions</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
 let beforeRender;
 async_test(function (t) {
-  assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+  assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
   const observer = new PerformanceObserver(
     t.step_func_done(function(entryList) {
       assert_equals(entryList.getEntries().length, 1);
       const entry = entryList.getEntries()[0];
       const pathname = window.location.origin + '/element-timing/resources/circle.svg';
       checkElement(entry, pathname, 'my_svg', 'SVG', beforeRender,
           document.getElementById('SVG'));
       // Image size is 200x200 but SVG size is 100x100 so it is clipped.
--- a/testing/web-platform/tests/element-timing/image-data-uri.html
+++ b/testing/web-platform/tests/element-timing/image-data-uri.html
@@ -11,17 +11,17 @@ body {
 }
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   let beforeRender = performance.now();
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         // Only the first characters of the data URI are included in the entry.
         const uriPrefix = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKAQMAAAC3/F3+AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAA';
         checkElementWithoutResourceTiming(entry, uriPrefix, 'my_img', 'inline_wee',
             beforeRender, document.getElementById('inline_wee'));
--- a/testing/web-platform/tests/element-timing/image-not-added.html
+++ b/testing/web-platform/tests/element-timing/image-not-added.html
@@ -1,16 +1,16 @@
 <!DOCTYPE HTML>
 <meta charset=utf-8>
 <title>Element Timing: do not observe a disconnected image</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script>
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done(() => {
         // The image should not have caused an entry, so fail test.
         assert_unreached('Should not have received an entry!');
       })
     );
     observer.observe({entryTypes: ['element']});
     // We add the image during onload to be sure that the observer is registered
--- a/testing/web-platform/tests/element-timing/image-not-fully-visible.html
+++ b/testing/web-platform/tests/element-timing/image-not-fully-visible.html
@@ -9,17 +9,17 @@ body {
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   let beforeRender;
   let img;
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         const pathname = window.location.origin + '/element-timing/resources/square20.png';
         checkElement(entry, pathname, 'not_fully_visible', '', beforeRender, img);
         // Image will not be fully visible. It should start from the top left part
         // of the document, excluding the margin, and then overflow.
--- a/testing/web-platform/tests/element-timing/image-rect-iframe.html
+++ b/testing/web-platform/tests/element-timing/image-rect-iframe.html
@@ -6,17 +6,17 @@
 body {
   margin: 50px;
 }
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script>
   async_test((t) => {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     on_event(window, 'message', e => {
       assert_equals(e.data.length, 1);
       assert_equals(e.data.entryType, 'element');
       const rect = e.data.rect;
       // rect should start at (0,0) even though main frame has a margin.
       assert_equals(rect.left, 0);
       assert_equals(rect.right, 100);
       assert_equals(rect.top, 0);
--- a/testing/web-platform/tests/element-timing/image-src-change.html
+++ b/testing/web-platform/tests/element-timing/image-src-change.html
@@ -8,17 +8,17 @@ body {
 }
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <img src='resources/square100.png' elementtiming='my_image' id='my_id'/>
 <script>
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     let beforeRender = performance.now();
     const img = document.getElementById('my_id');
     let firstCallback = true;
     const observer = new PerformanceObserver(
       t.step_func(entryList => {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         if (firstCallback) {
--- a/testing/web-platform/tests/element-timing/image-with-css-scale.html
+++ b/testing/web-platform/tests/element-timing/image-with-css-scale.html
@@ -16,17 +16,17 @@ body {
 </head>
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   const beforeRender = performance.now();
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         const pathname = window.location.origin + '/images/black-rectangle.png';
         checkElement(entry, pathname, 'rectangle', 'rect_id', beforeRender,
             document.getElementById('rect_id'));
         checkRect(entry, [0, 200, 25, 125]);
--- a/testing/web-platform/tests/element-timing/image-with-rotation.html
+++ b/testing/web-platform/tests/element-timing/image-with-rotation.html
@@ -16,17 +16,17 @@ body {
 </head>
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   const beforeRender = performance.now();
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         const pathname = window.location.origin + '/images/black-rectangle.png';
         checkElement(entry, pathname, 'rectangle', 'rect_id', beforeRender,
             document.getElementById('rect_id'));
         checkNaturalSize(entry, 100, 50);
--- a/testing/web-platform/tests/element-timing/images-repeated-resource.html
+++ b/testing/web-platform/tests/element-timing/images-repeated-resource.html
@@ -15,17 +15,17 @@ body {
   let numEntries = 0;
   let loadTime1;
   let loadTime2;
   let renderTime1;
   let renderTime2;
   let img;
   let img2;
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func(function(entryList) {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         const pathname = window.location.origin + '/element-timing/resources/square100.png';
         // Easier to check the |element| attribute here since element ID is the same for both images.
         checkElement(entry, pathname, entry.identifier, 'image_id', beforeRender, null);
         checkNaturalSize(entry, 100, 100);
--- a/testing/web-platform/tests/element-timing/invisible-images.html
+++ b/testing/web-platform/tests/element-timing/invisible-images.html
@@ -11,17 +11,17 @@
     visibility: hidden;
   }
   #displayNone {
     display: none;
   }
 </style>
 <script>
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done((entries) => {
         // The image should not have caused an entry, so fail test.
         assert_unreached('Should not have received an entry! Received one with identifier '
             + entries.getEntries()[0].identifier);
       })
     );
     observer.observe({entryTypes: ['element']});
--- a/testing/web-platform/tests/element-timing/multiple-background-images.html
+++ b/testing/web-platform/tests/element-timing/multiple-background-images.html
@@ -13,17 +13,17 @@ body {
 }
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   let beforeRender = performance.now();
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     let numObservedElements = 0;
     let observedCircle = false;
     let observedSquare = false;
     const pathPrefix = window.location.origin + '/element-timing/resources/';
     let div = document.getElementById('target');
     const observer = new PerformanceObserver(
       t.step_func(entryList => {
         entryList.getEntries().forEach(entry => {
--- a/testing/web-platform/tests/element-timing/multiple-redirects-TAO.html
+++ b/testing/web-platform/tests/element-timing/multiple-redirects-TAO.html
@@ -6,17 +6,17 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script src="/common/get-host-info.sub.js"></script>
 </head>
 <body>
 <script>
 async_test(t => {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     let destUrl = get_host_info().HTTP_REMOTE_ORIGIN
         + '/element-timing/resources/multiple-redirects.py?';
     destUrl += 'redirect_count=2';
     // The final resource has '*' in TAO header, so will not affect the result.
     destUrl += '&final_resource=/element-timing/resources/circle-tao.svg';
     destUrl += '&origin1=' + get_host_info().UNAUTHENTICATED_ORIGIN;
     destUrl += '&origin2=' + get_host_info().HTTP_REMOTE_ORIGIN;
     const taoCombinations = [
--- a/testing/web-platform/tests/element-timing/observe-background-image.html
+++ b/testing/web-platform/tests/element-timing/observe-background-image.html
@@ -13,17 +13,17 @@ body {
 }
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   let beforeRender = performance.now();
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         const pathname = window.location.origin + '/images/black-rectangle.png';
         checkElement(entry, pathname, 'my_div', 'target', beforeRender,
             document.getElementById('target'));
         checkRect(entry, [0, 100, 0, 50]);
--- a/testing/web-platform/tests/element-timing/observe-child-element.html
+++ b/testing/web-platform/tests/element-timing/observe-child-element.html
@@ -7,17 +7,17 @@ body {
   margin: 0;
 }
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   async_test((t) => {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done((entryList) => {
         assert_unreached("Should not have received an entry!");
       })
     );
     observer.observe({entryTypes: ['element']});
     // We add the iframe during onload to be sure that the observer is registered
     // in time for it to observe the element timing.
--- a/testing/web-platform/tests/element-timing/observe-elementtiming.html
+++ b/testing/web-platform/tests/element-timing/observe-elementtiming.html
@@ -9,17 +9,17 @@ body {
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   let beforeRender;
   let img;
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         const pathname = window.location.origin + '/element-timing/resources/square100.png';
         checkElement(entry, pathname, 'my_image', 'my_id', beforeRender, img);
         // Assume viewport has size at least 100, so the element is fully visible.
         checkRect(entry, [0, 100, 0, 100]);
--- a/testing/web-platform/tests/element-timing/observe-empty-attribute.html
+++ b/testing/web-platform/tests/element-timing/observe-empty-attribute.html
@@ -2,17 +2,17 @@
 <meta charset=utf-8>
 <title>Element Timing: observe with empty elementtiming attribute</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
 let beforeRender;
 async_test(function (t) {
-  assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+  assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
   let observedImage = false;
   let observedText = false;
   const observer = new PerformanceObserver(
     t.step_func(function(entryList) {
       entryList.getEntries().forEach(entry => {
         if (entry.name === 'image-paint') {
           assert_false(observedImage, 'Image should only be observed once.');
           const pathname = window.location.origin + '/element-timing/resources/square20.png';
--- a/testing/web-platform/tests/element-timing/observe-multiple-images.html
+++ b/testing/web-platform/tests/element-timing/observe-multiple-images.html
@@ -17,17 +17,17 @@ body {
 }
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   let beforeRender, image1Observed=0, image2Observed=0, image3Observed=0;
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func(function(entryList) {
         entryList.getEntries().forEach( entry => {
           if (entry.identifier === 'image1') {
             if (image1Observed) {
               assert_unreached("Observer received image1 more than once");
               t.done();
             }
--- a/testing/web-platform/tests/element-timing/observe-shadow-image.html
+++ b/testing/web-platform/tests/element-timing/observe-shadow-image.html
@@ -7,17 +7,17 @@ body {
 }
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <div id='target'></div>
 <script>
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_unreached('Should not observe elements in shadow trees!');
       })
     );
     observer.observe({entryTypes: ['element']});
     // We add the image during onload to be sure that the observer is registered
     // in time for it to observe the element timing.
--- a/testing/web-platform/tests/element-timing/observe-shadow-text.html
+++ b/testing/web-platform/tests/element-timing/observe-shadow-text.html
@@ -7,17 +7,17 @@ body {
 }
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <div id='target'></div>
 <script>
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_unreached('Should not observe text elements in shadow trees!');
       })
     );
     observer.observe({entryTypes: ['element']});
     // We add the text during onload to be sure that the observer is registered
     // in time for it to observe the element timing.
--- a/testing/web-platform/tests/element-timing/observe-svg-image.html
+++ b/testing/web-platform/tests/element-timing/observe-svg-image.html
@@ -2,17 +2,17 @@
 <meta charset=utf-8>
 <title>Element Timing: observe image inside SVG</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
 let beforeRender;
 async_test(function (t) {
-  assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+  assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
   const observer = new PerformanceObserver(
     t.step_func_done(function(entryList) {
       assert_equals(entryList.getEntries().length, 1);
       const entry = entryList.getEntries()[0];
       const pathname = window.location.origin + '/element-timing/resources/circle.svg';
       checkElement(entry, pathname, 'my_svg', 'svg_id', beforeRender,
           document.getElementById('svg_id'));
       // Assume viewport has size at least 200, so the element is fully visible.
--- a/testing/web-platform/tests/element-timing/observe-text.html
+++ b/testing/web-platform/tests/element-timing/observe-text.html
@@ -10,17 +10,17 @@ p {
   font-size: 12px;
 }
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   async_test((t) => {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     let paragraph;
     let beforeRender;
     const observer = new PerformanceObserver(
       t.step_func_done((entryList) => {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         checkTextElement(entry, 'my_text', 'text_id', beforeRender, paragraph);
         assert_equals(entry.intersectionRect.left, 20, 'left should be 20.');
--- a/testing/web-platform/tests/element-timing/observe-video-poster.html
+++ b/testing/web-platform/tests/element-timing/observe-video-poster.html
@@ -2,17 +2,17 @@
 <meta charset=utf-8>
 <title>Element Timing: observe video poster image</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
 let beforeRender;
 async_test(function (t) {
-  assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+  assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
   const observer = new PerformanceObserver(
     t.step_func_done(function(entryList) {
       assert_equals(entryList.getEntries().length, 1);
       const entry = entryList.getEntries()[0];
       const pathname = window.location.origin + '/element-timing/resources/circle.svg';
       checkElement(entry, pathname, 'my_poster', 'the_poster', beforeRender,
           document.getElementById('the_poster'));
       // Assume viewport has size at least 200, so the element is fully visible.
--- a/testing/web-platform/tests/element-timing/progressively-loaded-image.html
+++ b/testing/web-platform/tests/element-timing/progressively-loaded-image.html
@@ -9,17 +9,17 @@
 <script>
   let beforeRender;
   let img;
   // Number of characters to be read on the initial read, before sleeping.
   // Should be sufficient to do at least a first scan.
   let numInitial = 75;
   let sleep = 500;
   async_test(function(t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const img_src = 'resources/progressive-image.py?name=square20.jpg&numInitial='
       + numInitial + '&sleep=' + sleep;
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         const pathname = window.location.origin + '/element-timing/' + img_src;
         // Since the image is only fully loaded after the sleep, the render timestamp
--- a/testing/web-platform/tests/element-timing/rectangular-image.html
+++ b/testing/web-platform/tests/element-timing/rectangular-image.html
@@ -9,17 +9,17 @@ body {
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   let beforeRender;
   let img;
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         const pathname = window.location.origin + '/images/black-rectangle.png';
         checkElement(entry, pathname, 'my_image', 'rectangle', beforeRender, img);
         // Assume viewport has size at least 100, so the element is fully visible.
         checkRect(entry, [20, 120, 20, 70]);
--- a/testing/web-platform/tests/element-timing/redirects-tao-star.html
+++ b/testing/web-platform/tests/element-timing/redirects-tao-star.html
@@ -6,17 +6,17 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script src=/common/get-host-info.sub.js></script>
 </head>
 <body>
 <script>
 async_test(t => {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     let destUrl = get_host_info().HTTP_REMOTE_ORIGIN
             + '/resource-timing/resources/multi_redirect.py?';
     destUrl += 'page_origin=' +  get_host_info().HTTP_ORIGIN;
     destUrl += '&cross_origin=' + get_host_info().HTTP_REMOTE_ORIGIN;
     destUrl += '&final_resource=' + '/element-timing/resources/circle-tao.svg';
     destUrl += '&timing_allow=1';
     destUrl += '&tao_steps=';
     for (let taoSteps=0; taoSteps < 4; taoSteps++) {
--- a/testing/web-platform/tests/element-timing/retrievability.html
+++ b/testing/web-platform/tests/element-timing/retrievability.html
@@ -2,17 +2,17 @@
 <meta charset=utf-8>
 <title>Element Timing: 'element' entries are not accessible via performance timeline</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <script>
   let img;
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const beforeRender = performance.now();
     new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         assert_equals(entry.entryType, 'element');
         assert_equals(entry.name, 'image-paint');
 
--- a/testing/web-platform/tests/element-timing/same-origin-redirects.html
+++ b/testing/web-platform/tests/element-timing/same-origin-redirects.html
@@ -5,17 +5,17 @@
 <title>This test validates element timing information for same-origin redirect chain.</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 </head>
 <body>
 <script>
 async_test(t => {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     // First redirect
     let destUrl = '/common/redirect.py?location='
     // Second redirect
     destUrl += '/common/redirect.py?location='
     // Image without TAO headers.
     destUrl += '/element-timing/resources/square20.png';
     let beforeRender;
     new PerformanceObserver(t.step_func_done(entries => {
--- a/testing/web-platform/tests/element-timing/scroll-to-text.html
+++ b/testing/web-platform/tests/element-timing/scroll-to-text.html
@@ -10,17 +10,17 @@
 </style>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <div class='big'></div>
 <p elementtiming='observeMe'>Test text</p>
 <script>
   async_test((t) => {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(t.step_func_done(() => {}));
     observer.observe({type: 'element', buffered: true});
     window.onload = () => {
       // The div occupies the whole screen because it occupies 100% of the height.
       // We scroll to the end of the document so that the paragraph becomes visible.
       // A user agent could paint the text before or after scrolling, but either way
       // it must produce an entry for it.
       window.scrollTo(0,document.scrollingElement.scrollHeight);
--- a/testing/web-platform/tests/element-timing/text-with-display-style.html
+++ b/testing/web-platform/tests/element-timing/text-with-display-style.html
@@ -16,17 +16,17 @@ h3 {
   display: block;
 }
 </style>
 <h1 id='title1' elementtiming='h1'>I am h1</h1>
 <h2 id='title2' elementtiming='h2'>I am h2</h2>
 <h3 id='title3' elementtiming='h3'>I am h3</h3>
 <script>
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const beforeRender = performance.now();
     let observedFlex = false;
     let observedGrid = false;
     let observedBlock = false;
     const observer = new PerformanceObserver(
       t.step_func(function(entryList) {
         entryList.getEntries().forEach(entry => {
           if (entry.id === 'title1') {
--- a/testing/web-platform/tests/element-timing/toJSON.html
+++ b/testing/web-platform/tests/element-timing/toJSON.html
@@ -3,17 +3,17 @@
 <title>Element Timing: toJSON</title>
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/element-timing-helpers.js"></script>
 <img elementtiming='img' src="resources/square100.png"/>
 <script>
   async_test(function (t) {
-    assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
+    assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented");
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         assert_equals(entryList.getEntries().length, 1);
         const entry = entryList.getEntries()[0];
         assert_equals(typeof(entry.toJSON), 'function');
         const json = entry.toJSON();
         assert_equals(typeof(json), 'object');
         const keys = [
--- a/testing/web-platform/tests/event-timing/buffered-flag.html
+++ b/testing/web-platform/tests/event-timing/buffered-flag.html
@@ -7,17 +7,17 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/resources/testdriver.js></script>
 <script src=/resources/testdriver-vendor.js></script>
 <script src=resources/event-timing-test-utils.js></script>
 <script>
   let firstInputSeen = false;
   let eventSeen = false;
   async_test(t => {
-    assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.');
+    assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.');
     const validateEntry = t.step_func(entry => {
       if (entry.entryType === 'first-input')
         firstInputSeen = true;
       else if (entry.entryType === 'event')
         eventSeen = true;
       else
         assert_unreached('Should only observe Event Timing entries!');
     });
--- a/testing/web-platform/tests/event-timing/click-timing.html
+++ b/testing/web-platform/tests/event-timing/click-timing.html
@@ -16,17 +16,17 @@
      Long click 2
      Once two clicks have been received by observer, compare the timestamps.
   */
   let timeBeforeFirstClick;
   let timeAfterFirstClick;
   let timeAfterSecondClick;
   let observedEntries = [];
   async_test(function(t) {
-    assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.');
+    assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.');
     new PerformanceObserver(t.step_func(entryList => {
       observedEntries = observedEntries.concat(entryList.getEntries().filter(
         entry => entry.name === 'mousedown'));
       if (observedEntries.length < 2)
         return;
 
       assert_not_equals(timeBeforeFirstClick, undefined);
       assert_not_equals(timeAfterFirstClick, undefined);
--- a/testing/web-platform/tests/event-timing/crossiframe.html
+++ b/testing/web-platform/tests/event-timing/crossiframe.html
@@ -43,17 +43,17 @@
     assert_less_than(childFrameData.processingStart, childFrameData.clickDone,
         "The entry's processing start should be before than the child frame's clickDone.");
     assert_greater_than(childFrameData.startTime, childFrameData.clickTimeMin,
         "The entry's start time should be later than the child frame's \
         clickTimeMin.");
   }
 
   promise_test(async t => {
-    assert_precondition(window.PerformanceEventTiming, "Event Timing is not supported");
+    assert_implements(window.PerformanceEventTiming, "Event Timing is not supported");
     clickTimeMin = performance.now();
     let observedEntries = false;
     const observerPromise = new Promise(resolve => {
       new PerformanceObserver(t.step_func(entries => {
         assert_false(observedEntries,
             "Observer of main frames should only capture main-frame event-timing entries");
         validateEntries(entries.getEntriesByName('mousedown'));
         observedEntries = true;
--- a/testing/web-platform/tests/event-timing/event-click-counts.html
+++ b/testing/web-platform/tests/event-timing/event-click-counts.html
@@ -5,17 +5,17 @@
 <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>
 <div id='div'>Click me</div>
 <button id='button'>Click me</button>
 <script>
   promise_test( t => {
-    assert_precondition(window.EventCounts, "Event Counts isn't supported");
+    assert_implements(window.EventCounts, "Event Counts isn't supported");
     function testClicks(expectedCount, resolve) {
       const clickCount = performance.eventCounts.get('click');
       if (clickCount < expectedCount) {
         t.step_timeout(function() {
           testClicks(expectedCount, resolve);
         }, 5);
         return;
       }
--- a/testing/web-platform/tests/event-timing/event-counts-zero.html
+++ b/testing/web-platform/tests/event-timing/event-counts-zero.html
@@ -3,17 +3,17 @@
 <meta charset=utf-8 />
 <title>Event Timing: eventCounts.</title>
 <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(() => {
-    assert_precondition(window.EventCounts, "Event Counts isn't supported");
+    assert_implements(window.EventCounts, "Event Counts isn't supported");
     const eventTypes = [
         'auxclick',
         'click',
         'contextmenu',
         'dblclick',
         'mousedown',
         'mouseenter',
         'mouseleave',
--- a/testing/web-platform/tests/event-timing/only-observe-firstInput.html
+++ b/testing/web-platform/tests/event-timing/only-observe-firstInput.html
@@ -15,17 +15,17 @@
      PerformanceObserver for first-input is registered
      Click 1
      Click 2
      Wait
      Expected result:
      PerformanceObserver should observe one and only one entry.
   */
   async_test(function(t) {
-    assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.');
+    assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.');
     let hasObservedFirstInput = false;
     new PerformanceObserver(t.step_func((entryList) => {
         assert_false(hasObservedFirstInput);
         hasObservedFirstInput = true;
         const observedEntries = entryList.getEntries().filter(
             entry => entry.name === 'mousedown');
         assert_equals(observedEntries.length, 1);
         assert_equals(observedEntries[0].entryType, 'first-input');
--- a/testing/web-platform/tests/event-timing/programmatic-click-not-observed.html
+++ b/testing/web-platform/tests/event-timing/programmatic-click-not-observed.html
@@ -13,17 +13,17 @@
   let delayCalled = false;
   let beforeClick;
   function delay() {
     const end = performance.now() + 150;
     while(performance.now() < end) {}
     delayCalled = true;
   }
   async_test(function(t) {
-    assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.');
+    assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.');
     const observer = new PerformanceObserver(t.step_func_done((entryList) => {
       const entries = entryList.getEntries().filter(e => e.name === 'mousedown');
       // There must only be one click entry: from the clickAndBlockMain() call.
       assert_equals(entries.length, 1);
       const entry = entries[0];
       // This ensures that the entry is exposing timing from the second click, i.e.
       // the one from the clickAndBlockMain() call.
       assert_greater_than_equal(entry.processingStart, beforeClick);
--- a/testing/web-platform/tests/event-timing/retrievability.html
+++ b/testing/web-platform/tests/event-timing/retrievability.html
@@ -25,17 +25,17 @@
      Begin Busy Loop
      Click 1 arrives
      End Busy Loop
      (Dispatch and Process Click 1 - buffered)
      Onload Event Fires
      Validate entries
   */
   async_test(function(t) {
-    assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.');
+    assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.');
     new PerformanceObserver(t.step_func_done(() => {
       validateEntries();
       t.done();
     })).observe({entryTypes: ['event']});
     clickAndBlockMain('button');
   }, "Event Timing: make sure event-timing entries are not retrievable by performance.getEntries*.");
 
 </script>
--- a/testing/web-platform/tests/event-timing/retrieve-firstInput.html
+++ b/testing/web-platform/tests/event-timing/retrieve-firstInput.html
@@ -7,17 +7,17 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/resources/testdriver.js></script>
 <script src=/resources/testdriver-vendor.js></script>
 
 <script src=resources/event-timing-test-utils.js></script>
 
 <script>
   async_test(function(t) {
-    assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.');
+    assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.');
     function testEntries() {
       // First callback is not ensured to have the entry.
       if (performance.getEntriesByType('first-input').length === 0) {
         t.step_timeout(testEntries, 10);
         return;
       }
       assert_equals(performance.getEntriesByType('first-input').length, 1,
         "There should be a first-input entry in the performance timeline");
--- a/testing/web-platform/tests/event-timing/timingconditions.html
+++ b/testing/web-platform/tests/event-timing/timingconditions.html
@@ -30,17 +30,17 @@
   function trustedFocusAndBlockMain(id) {
     const target = document.getElementById(id);
     trustedFocusStart = performance.now();
     // Block mainthread in the callback,  as focus() is a sync call.
     target.focus();
   }
 
   async_test(function(t) {
-    assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.');
+    assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.');
     new PerformanceObserver(t.step_func_done(entryList => {
       const observerCallbackTime = performance.now();
       const entries = entryList.getEntries().filter(
           entry => entry.name === 'mousedown');
       assert_equals(entries.length, 1,
           "Should only observe one entry: " +
           JSON.stringify(entries) + ".");
       assert_equals(entries[0].name, 'mousedown',
--- a/testing/web-platform/tests/event-timing/toJSON.html
+++ b/testing/web-platform/tests/event-timing/toJSON.html
@@ -5,17 +5,17 @@
 <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 src=resources/event-timing-test-utils.js></script>
 <button id='button'>Generate a 'click' event</button>
 <script>
   async_test(function (t) {
-    assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.');
+    assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.');
     const observer = new PerformanceObserver(
       t.step_func_done(function(entryList) {
         const entry = entryList.getEntries()[0];
         assert_equals(typeof(entry.toJSON), 'function');
         const json = entry.toJSON();
         assert_equals(typeof(json), 'object');
         const keys = [
           // PerformanceEntry
--- a/testing/web-platform/tests/longtask-timing/buffered-flag.window.js
+++ b/testing/web-platform/tests/longtask-timing/buffered-flag.window.js
@@ -1,10 +1,10 @@
 async_test(t => {
-    assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
+    assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
     new PerformanceObserver(t.step_func((entryList, obs) => {
         const observer = new PerformanceObserver(t.step_func_done(list => {
             let longtaskObserved = false;
             list.getEntries().forEach(entry => {
                 if (entry.entryType === 'mark')
                     return;
                 assert_equals(entry.entryType, 'longtask');
                 assert_equals(entry.name, 'self');
--- a/testing/web-platform/tests/longtask-timing/containerTypes.html
+++ b/testing/web-platform/tests/longtask-timing/containerTypes.html
@@ -14,17 +14,17 @@ function Container(name, src) {
 const Containers = [
     new Container('iframe', 'src'),
     new Container('frame', 'src'),
     new Container('object', 'data'),
     new Container('embed', 'src'),
 ];
 Containers.forEach(container => {
   promise_test(async t => {
-    assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
+    assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
     const initialTime = performance.now();
     return new Promise(resolve => {
       const observer = new PerformanceObserver(t.step_func(entryList => {
         const entries = entryList.getEntries();
         assert_equals(entries.length, 1,
           'Exactly one entry is expected.');
         const longtask = entries[0];
         assert_equals(longtask.entryType, 'longtask');
--- a/testing/web-platform/tests/longtask-timing/long-microtask.window.js
+++ b/testing/web-platform/tests/longtask-timing/long-microtask.window.js
@@ -1,10 +1,10 @@
 async_test(function (t) {
-    assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
+    assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
     new PerformanceObserver(
         t.step_func_done(entryList => {
             const entries = entryList.getEntries();
             assert_equals(entries.length, 1,
                 'Exactly one entry is expected.');
             const longtask = entries[0];
             assert_equals(longtask.entryType, 'longtask');
             assert_equals(longtask.name, 'self');
--- a/testing/web-platform/tests/longtask-timing/longtask-attributes.html
+++ b/testing/web-platform/tests/longtask-timing/longtask-attributes.html
@@ -5,17 +5,17 @@
 
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 
 <h1>Long Task Attributes</h1>
 <div id="log"></div>
 <script>
   async_test(function (t) {
-    assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
+    assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
     const observer = new PerformanceObserver(
         t.step_func(function (entryList) {
             const entries = entryList.getEntries();
             assert_equals(entries.length, 1,
                 'Exactly one entry is expected.');
             const longtask = entries[0];
             assert_equals(longtask.entryType, 'longtask');
             assert_equals(longtask.name, 'self');
--- a/testing/web-platform/tests/longtask-timing/longtask-in-childiframe-crossorigin.html
+++ b/testing/web-platform/tests/longtask-timing/longtask-in-childiframe-crossorigin.html
@@ -5,17 +5,17 @@
 
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 
 <h1>Long Task in Nested Cross-Origin Child Iframe</h1>
 <div id="log"></div>
 <script>
   async_test(function (t) {
-    assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
+    assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
     const observer = new PerformanceObserver(
         t.step_func(function (entryList) {
             const entries = entryList.getEntries();
             assert_equals(entries.length, 1,
                 'Exactly one entry is expected.');
             const longtask = entries[0];
             assert_equals(longtask.entryType, 'longtask');
             if (longtask.name == 'self' ||
--- a/testing/web-platform/tests/longtask-timing/longtask-in-childiframe.html
+++ b/testing/web-platform/tests/longtask-timing/longtask-in-childiframe.html
@@ -6,17 +6,17 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 
 <h1>Long Task in Nested Child Iframe</h1>
 <div id="log"></div>
 <script>
   const initialTime = performance.now();
   async_test(function (t) {
-    assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
+    assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
     const observer = new PerformanceObserver(
         t.step_func(function (entryList) {
             const entries = entryList.getEntries();
             assert_equals(entries.length, 1,
                 'Exactly one entry is expected.');
             const longtask = entries[0];
             assert_equals(longtask.entryType, 'longtask');
             if (longtask.name == 'self' ||
--- a/testing/web-platform/tests/longtask-timing/longtask-in-externalscript.html
+++ b/testing/web-platform/tests/longtask-timing/longtask-in-externalscript.html
@@ -5,17 +5,17 @@
 
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 
 <h1>Long Task: External Script</h1>
 <div id="log"></div>
 <script>
   async_test(function (t) {
-    assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
+    assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
     const observer = new PerformanceObserver(
         t.step_func(function (entryList) {
             const entries = entryList.getEntries();
             assert_equals(entries.length, 1,
                 'Exactly one entry is expected.');
             const longtask = entries[0];
             assert_equals(longtask.entryType, 'longtask');
             assert_equals(longtask.name, 'self');
--- a/testing/web-platform/tests/longtask-timing/longtask-in-parentiframe.html
+++ b/testing/web-platform/tests/longtask-timing/longtask-in-parentiframe.html
@@ -3,17 +3,17 @@
 <title>LongTask Timing: long task in nested child iframe</title>
 <body>
 
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 
 <script>
   const t = async_test(t => {
-    assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
+    assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
     window.addEventListener('message', t.step_func(e => {
       assert_equals(e.data['entryType'], 'longtask');
       assert_equals(e.data['frame-attribution'], 'same-origin-ancestor');
       assert_equals(e.data['task-attribution'], 'unknown');
       assert_equals(e.data['containerType'], 'window');
       assert_equals(e.data['containerId'], '');
       assert_equals(e.data['containerName'], '');
       assert_equals(e.data['containerSrc'], '');
--- a/testing/web-platform/tests/longtask-timing/longtask-in-raf.html
+++ b/testing/web-platform/tests/longtask-timing/longtask-in-raf.html
@@ -5,17 +5,17 @@
 
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 
 <h1>Long Task: requestAnimationFrame</h1>
 <div id="log"></div>
 <script>
   async_test(function (t) {
-    assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
+    assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
     const observer = new PerformanceObserver(
         t.step_func(function (entryList) {
             const entries = entryList.getEntries();
             assert_equals(entries.length, 1,
                 'Exactly one entry is expected.');
             const longtask = entries[0];
             assert_equals(longtask.entryType, 'longtask');
             assert_equals(longtask.name, 'self');
--- a/testing/web-platform/tests/longtask-timing/longtask-in-sibling-iframe-crossorigin.html
+++ b/testing/web-platform/tests/longtask-timing/longtask-in-sibling-iframe-crossorigin.html
@@ -3,17 +3,17 @@
 <title>LongTask Timing: long task in cross-origin sibling iframe</title>
 <body>
 
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 
 <script>
   async_test(t => {
-    assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
+    assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
     window.addEventListener('message', t.step_func(e => {
       assert_equals(e.data['entryType'], 'longtask');
       assert_equals(e.data['frame-attribution'], 'cross-origin-unreachable');
       assert_equals(e.data['task-attribution'], 'unknown');
       assert_equals(e.data['containerType'], 'window');
       assert_equals(e.data['containerId'], '');
       assert_equals(e.data['containerName'], '');
       assert_equals(e.data['containerSrc'], '');
--- a/testing/web-platform/tests/longtask-timing/longtask-in-sibling-iframe.html
+++ b/testing/web-platform/tests/longtask-timing/longtask-in-sibling-iframe.html
@@ -3,17 +3,17 @@
 <title>LongTask Timing: long task in sibling iframe</title>
 <body>
 
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 
 <script>
   async_test(t => {
-    assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
+    assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
     window.addEventListener('message', t.step_func(e => {
       assert_equals(e.data['entryType'], 'longtask');
       // Ignore any long task that may be produced by the top-level frame.
       if (e.data['frame-attribution'] === 'same-origin-ancestor')
         return;
 
       assert_equals(e.data['frame-attribution'], 'same-origin');
       assert_equals(e.data['task-attribution'], 'unknown');
--- a/testing/web-platform/tests/longtask-timing/longtask-tojson.html
+++ b/testing/web-platform/tests/longtask-timing/longtask-tojson.html
@@ -2,17 +2,17 @@
 <html>
 <head>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 </head>
 <body>
 <script>
   async_test(function (t) {
-    assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
+    assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
     const observer = new PerformanceObserver(
       t.step_func(function (entryList) {
         const entries = entryList.getEntries();
         assert_greater_than_equal(entries.length, 1);
         const entry = entries[0];
         assert_equals(typeof(entry.toJSON), 'function');
         const entryJSON = entry.toJSON();
         assert_equals(typeof(entryJSON), 'object');
--- a/testing/web-platform/tests/longtask-timing/shared-renderer/longtask-in-new-window.html
+++ b/testing/web-platform/tests/longtask-timing/shared-renderer/longtask-in-new-window.html
@@ -6,17 +6,17 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 
 <script>
 /* This test should pass even when windows share a single renderer process.
   This window opens a new window which contains a longtask. We test that the
   longtask from the new window is not observed by the observer of this window. */
 async_test(t => {
-  assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
+  assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
   const observer = new PerformanceObserver(
       t.step_func(function (entryList) {
           const entries = entryList.getEntries();
           let markFound = false;
           for (let i = 0; i < entries.length; ++i) {
             const entry = entries[i];
             // We do not expect to observe longtasks but the work being made in this window may produce a longtask.
             assert_true(entry.entryType === 'longtask' ||
--- a/testing/web-platform/tests/longtask-timing/supported-longtask-types.window.js
+++ b/testing/web-platform/tests/longtask-timing/supported-longtask-types.window.js
@@ -1,10 +1,10 @@
 test(() => {
-  assert_precondition(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported');
+  assert_implements(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported');
   const types = PerformanceObserver.supportedEntryTypes;
   assert_true(types.includes("longtask"),
     "There should be 'longtask' in PerformanceObserver.supportedEntryTypes");
   assert_false(types.includes("taskattribution"),
     "There should NOT be 'taskattribution' in PerformanceObserver.supportedEntryTypes");
 }, "supportedEntryTypes contains 'longtask' but not 'taskattribution'.");
 
 function syncWait(waitDuration) {
@@ -16,18 +16,18 @@ function syncWait(waitDuration) {
   for (let i = 0; i < 10000; i++)
     unused += '' + Math.random();
 
   return syncWait(waitDuration - (performance.now() - startTime));
 }
 
 const entryType = "longtask";
 promise_test(async () => {
-  assert_precondition(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported');
-  assert_precondition(typeof PerformanceObserver.supportedEntryTypes.includes(entryType), `supportedEntryTypes does not include '${entryType}'`);
+  assert_implements(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported');
+  assert_implements(typeof PerformanceObserver.supportedEntryTypes.includes(entryType), `supportedEntryTypes does not include '${entryType}'`);
   await new Promise((resolve) => {
     new PerformanceObserver(function (list, observer) {
       observer.disconnect();
       resolve();
     }).observe({entryTypes: [entryType]});
 
     // Force the PerformanceEntry.
     syncWait(50);
--- a/testing/web-platform/tests/paint-timing/basetest.html
+++ b/testing/web-platform/tests/paint-timing/basetest.html
@@ -4,17 +4,17 @@
 </head>
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="main"></div>
 
 <script>
 async_test(function(t) {
-    assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+    assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
     t.step(function() {
         const bufferedEntries = performance.getEntriesByType('paint');
         assert_equals(bufferedEntries.length, 0, "No paint entries yet");
     });
     const div = document.createElement("div");
     div.style.width = "100px";
     div.style.height = "100px";
     div.style.backgroundColor = "red";
--- a/testing/web-platform/tests/paint-timing/buffered-flag.window.js
+++ b/testing/web-platform/tests/paint-timing/buffered-flag.window.js
@@ -1,10 +1,10 @@
 async_test(t => {
-  assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+  assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
   // First observer creates second in callback to ensure the entry has been dispatched by the time
   // the second observer begins observing.
   let entries_seen = 0;
   new PerformanceObserver(firstList => {
     entries_seen += firstList.getEntries().length;
     // Abort if we have not yet received both paint entries.
     if (entries_seen < 2)
       return;
--- a/testing/web-platform/tests/paint-timing/child-painting-first-image.html
+++ b/testing/web-platform/tests/paint-timing/child-painting-first-image.html
@@ -1,16 +1,16 @@
 <!DOCTYPE html>
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 
 <script>
 async_test(function (t) {
-    assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+    assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
     window.addEventListener('message', t.step_func(e => {
         assert_equals(e.data, '2 paint first-paint paint first-contentful-paint');
         // When only child frame paints, expect only first-paint.
         t.step_timeout( function() {
             const bufferedEntries = performance.getEntriesByType('paint');
             assert_equals(bufferedEntries.length, 1);
             assert_equals(bufferedEntries[0].entryType, 'paint');
             assert_equals(bufferedEntries[0].name, 'first-paint');
--- a/testing/web-platform/tests/paint-timing/fcp-only/fcp-canvas-context.html
+++ b/testing/web-platform/tests/paint-timing/fcp-only/fcp-canvas-context.html
@@ -4,17 +4,17 @@
 </head>
 <body>
 <script src="../resources/utils.js"></script>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <canvas id="canvas" width="50" height="50"></canvas>
 <script>
   promise_test(async t => {
-    assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+    assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
     await new Promise(r => window.addEventListener('load', r));
     await assertNoFirstContentfulPaint(t);
     const canvas = document.getElementById('canvas');
     const context = canvas.getContext('2d');
     context.fillRect(0, 0, 100, 100);
     await assertFirstContentfulPaint(t);
   }, 'Canvas should count as contentful when context is created');
 </script>
--- a/testing/web-platform/tests/paint-timing/fcp-only/fcp-gradient.html
+++ b/testing/web-platform/tests/paint-timing/fcp-only/fcp-gradient.html
@@ -11,16 +11,16 @@
 </head>
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="../resources/utils.js"></script>
 <div id="main"></div>
 <script>
   promise_test(async t => {
-      assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+      assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
       await new Promise(r => window.addEventListener('load', r));
       await assertNoFirstContentfulPaint(t);
   },  'Gradients should not count as contentful');
 </script>
 </body>
 
 </html>
--- a/testing/web-platform/tests/paint-timing/fcp-only/fcp-text-input.html
+++ b/testing/web-platform/tests/paint-timing/fcp-only/fcp-text-input.html
@@ -4,17 +4,17 @@
 </head>
 <body>
 <script src="../resources/utils.js"></script>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <input id="input" type="text" />
 <script>
   promise_test(async t => {
-      assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+      assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
       await new Promise(r => window.addEventListener('load', r));
       await assertNoFirstContentfulPaint(t);
       const input = document.getElementById('input');
       input.setAttribute('value', '  ');
       await assertNoFirstContentfulPaint(t);
       input.setAttribute('value', 'value');
       await assertFirstContentfulPaint(t);
   }, 'Text input should become contentful when its value is non-empty');
--- a/testing/web-platform/tests/paint-timing/fcp-only/fcp-video-frame.html
+++ b/testing/web-platform/tests/paint-timing/fcp-only/fcp-video-frame.html
@@ -4,17 +4,17 @@
 </head>
 <body>
 <script src="../resources/utils.js"></script>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <video id="video" autoplay></video>
 <script>
   promise_test(async t => {
-      assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+      assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
       await new Promise(r => window.addEventListener('load', r));
       await assertNoFirstContentfulPaint(t);
       // Set actual video content to trigger FCP.
       const video = document.getElementById('video');
       video.setAttribute('src', '/media/test.mp4');
       await new Promise(resolve => {
         video.oncanplay = resolve;
       });
--- a/testing/web-platform/tests/paint-timing/fcp-only/fcp-video-poster.html
+++ b/testing/web-platform/tests/paint-timing/fcp-only/fcp-video-poster.html
@@ -4,17 +4,17 @@
 </head>
 <body>
 <script src="../resources/utils.js"></script>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <video id="video" width="50" height="50"></video>
 <script>
   promise_test(async t => {
-    assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+    assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
     await new Promise(r => window.addEventListener('load', r));
     await assertNoFirstContentfulPaint(t);
     const video = document.getElementById('video');
     const src = '../resources/circles.png';
     const image = new Image();
     image.src = src;
     video.setAttribute('poster', src);
     await new Promise(resolve => {
--- a/testing/web-platform/tests/paint-timing/fcp-only/fcp-with-rtl.html
+++ b/testing/web-platform/tests/paint-timing/fcp-only/fcp-with-rtl.html
@@ -14,17 +14,17 @@
 </head>
 <body>
 <script src="../resources/utils.js"></script>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="text">TEXT</div>
 <script>
   promise_test(async t => {
-      assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+      assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
       await new Promise(r => window.addEventListener('load', r));
       await assertNoFirstContentfulPaint(t);
       document.body.style.direction = 'ltr'
       await assertFirstContentfulPaint(t);
   }, 'FCP should fire when coordinates are negative, if within document scrollable area');
 </script>
 </body>
 </html>
--- a/testing/web-platform/tests/paint-timing/first-contentful-bg-image.html
+++ b/testing/web-platform/tests/paint-timing/first-contentful-bg-image.html
@@ -6,17 +6,17 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="main"></div>
 </body>
 
 <footer>
 <script>
 async_test(function (t) {
-    assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+    assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
     const body = document.getElementsByTagName('body')[0];
     body.style.backgroundImage = 'url(resources/circles.png)';
     window.onload = function() {
         function testPaintEntries() {
             const bufferedEntries = performance.getEntriesByType('paint');
             if (bufferedEntries.length < 2) {
                 t.step_timeout(function() {
                     testPaintEntries();
--- a/testing/web-platform/tests/paint-timing/first-contentful-canvas.html
+++ b/testing/web-platform/tests/paint-timing/first-contentful-canvas.html
@@ -4,17 +4,17 @@
 </head>
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <canvas id="canvas" width="200" height="200" ></canvas>
 
 <script>
 async_test(function (t) {
-    assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+    assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
     const canvas = document.getElementById("canvas");
     const context = canvas.getContext("2d");
     context.beginPath();
     context.moveTo(0,0);
     context.lineTo(300,150);
     context.stroke();
     function testPaintEntries() {
         const bufferedEntries = performance.getEntriesByType('paint');
--- a/testing/web-platform/tests/paint-timing/first-contentful-image.html
+++ b/testing/web-platform/tests/paint-timing/first-contentful-image.html
@@ -4,17 +4,17 @@
 </head>
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="image"></div>
 
 <script>
 async_test(function (t) {
-    assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+    assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
     const img = document.createElement("IMG");
     img.src = "resources/circles.png";
     img.onload = function() {
         function testPaintEntries() {
             const bufferedEntries = performance.getEntriesByType('paint');
             if (bufferedEntries.length < 2) {
                 t.step_timeout(function() {
                     testPaintEntries();
--- a/testing/web-platform/tests/paint-timing/first-contentful-paint.html
+++ b/testing/web-platform/tests/paint-timing/first-contentful-paint.html
@@ -5,17 +5,17 @@
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="main"></div>
 <div id="image"></div>
 
 <script>
 async_test(function (t) {
-    assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+    assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
     const bufferedEntries = performance.getEntriesByType('paint');
     assert_equals(bufferedEntries.length, 0, "No paint entries yet");
     const div = document.createElement("div");
     div.style.width = "100px";
     div.style.height = "100px";
     div.style.backgroundColor = "red";
     div.style.color = "blue";
     document.getElementById("main").appendChild(div);
--- a/testing/web-platform/tests/paint-timing/first-contentful-svg.html
+++ b/testing/web-platform/tests/paint-timing/first-contentful-svg.html
@@ -4,17 +4,17 @@
 </head>
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="svg"></div>
 
 <script>
 async_test(function (t) {
-    assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+    assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
     const img = document.createElement("IMG");
     img.src = "resources/circle.svg";
     img.onload = function() {
         function testPaintEntries() {
             const bufferedEntries = performance.getEntriesByType('paint');
             if (bufferedEntries.length < 2) {
               t.step_timeout(function() {
                 testPaintEntries();
--- a/testing/web-platform/tests/paint-timing/first-image-child.html
+++ b/testing/web-platform/tests/paint-timing/first-image-child.html
@@ -5,17 +5,17 @@
 </head>
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <iframe src='resources/subframe-sending-paint.html' id='child-iframe'></iframe>
 <img src='resources/circles.png'/>
 <script>
 async_test(function (t) {
-    assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+    assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
 
     window.addEventListener('message', t.step_func(e => {
         // Child iframe should not have any paint-timing entries.
         assert_equals(e.data, '0');
         t.done();
     }));
     // Wait for onload to ensure img and iframe have loaded.
     window.addEventListener('load', function() {
--- a/testing/web-platform/tests/paint-timing/first-paint-bg-color.html
+++ b/testing/web-platform/tests/paint-timing/first-paint-bg-color.html
@@ -6,17 +6,17 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="main"></div>
 </body>
 
 <footer>
 <script>
 async_test(function (t) {
-    assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+    assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
     document.body.style.backgroundColor = "#AA0000";
 
     function testPaintEntries() {
       const bufferedEntries = performance.getEntriesByType('paint');
       if (bufferedEntries.length < 1) {
         t.step_timeout(function() {
           testPaintEntries();
         }, 20);
--- a/testing/web-platform/tests/paint-timing/first-paint-only.html
+++ b/testing/web-platform/tests/paint-timing/first-paint-only.html
@@ -4,17 +4,17 @@
 </head>
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="main"></div>
 
 <script>
 async_test(function (t) {
-    assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+    assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
     const div = document.createElement("div");
     div.style.width = "100px";
     div.style.height = "100px";
     div.style.backgroundColor = "red";
     div.style.color = "blue";
     document.getElementById("main").appendChild(div);
 
     function testPaintEntries() {
--- a/testing/web-platform/tests/paint-timing/paint-visited.html
+++ b/testing/web-platform/tests/paint-timing/paint-visited.html
@@ -16,17 +16,17 @@ sniff whether a link has been visited or
 window.onload = function() {
   /* Convenience helper to get the link into the browsing history.
     Using a relative path because some browsers only allow replaceState within the same domain. */
   current_url = window.location.href;
   history.replaceState({}, "", "./");
   history.replaceState({}, "", current_url);
 }
 async_test(function(t) {
-  assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+  assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
   function testPaintEntries() {
       const bufferedEntries = performance.getEntriesByType('paint');
       if (bufferedEntries.length < 2) {
           t.step_timeout(function() {
               testPaintEntries();
           }, 20);
           return;
       }
--- a/testing/web-platform/tests/paint-timing/resources/utils.js
+++ b/testing/web-platform/tests/paint-timing/resources/utils.js
@@ -31,17 +31,17 @@ async function assertFirstContentfulPain
     t.step(checkFCP);
   });
 }
 
 async function test_fcp(label) {
   const style = document.createElement('style');
   document.head.appendChild(style);
   await promise_test(async t => {
-    assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+    assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
     const main = document.getElementById('main');
     await new Promise(r => window.addEventListener('load', r));
     await assertNoFirstContentfulPaint(t);
     main.className = 'preFCP';
     await assertNoFirstContentfulPaint(t);
     main.className = 'contentful';
     await assertFirstContentfulPaint(t);
   }, label);
--- a/testing/web-platform/tests/paint-timing/sibling-painting-first-image.html
+++ b/testing/web-platform/tests/paint-timing/sibling-painting-first-image.html
@@ -1,17 +1,17 @@
 <!DOCTYPE html>
 <body>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
  <!-- This iframe will have a sibling that paints, we want to ensure it does not detect that paint. -->
 <iframe id="listening-iframe" src="resources/subframe-sending-paint.html"></iframe>
 <script>
 async_test(function (t) {
-    assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported.");
+    assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported.");
     let paintingIframeHasDispatchedEntries = false;
     window.addEventListener('message', t.step_func(e => {
         if (!paintingIframeHasDispatchedEntries) {
             // Check paint-timing entries from the painting iframe.
             assert_equals(e.data, '2 paint first-paint paint first-contentful-paint');
             paintingIframeHasDispatchedEntries = true;
             // Ask the listening iframe to send its paint-timing entries.
             document.getElementById('listening-iframe').
--- a/testing/web-platform/tests/paint-timing/supported-paint-type.window.js
+++ b/testing/web-platform/tests/paint-timing/supported-paint-type.window.js
@@ -1,18 +1,18 @@
 test(() => {
-  assert_precondition(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported');
+  assert_implements(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported');
   assert_true(PerformanceObserver.supportedEntryTypes.includes("paint"),
     "There should be an entry 'paint' in PerformanceObserver.supportedEntryTypes");
 }, "supportedEntryTypes contains 'paint'.");
 
 const entryType = 'paint';
 promise_test(async() => {
-  assert_precondition(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported');
-  assert_precondition(typeof PerformanceObserver.supportedEntryTypes.includes(entryType), `supportedEntryTypes does not include '${entryType}'`);
+  assert_implements(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported');
+  assert_implements(typeof PerformanceObserver.supportedEntryTypes.includes(entryType), `supportedEntryTypes does not include '${entryType}'`);
   await new Promise((resolve) => {
     new PerformanceObserver(function (list, observer) {
       observer.disconnect();
       resolve();
     }).observe({entryTypes: [entryType]});
 
     // Force the PerformanceEntry.
     // Use `self` for Workers.