https://github.com/web-platform-tests/wpt
Revision 5438f72ea0bc2abb3754b2b906a34d497bd8457c authored by Philip Jägenstedt on 23 November 2018, 09:17:43 UTC, committed by Philip Jägenstedt on 23 November 2018, 09:18:54 UTC
Possible but unlikely cause of https://github.com/web-platform-tests/wpt/issues/14207.

This reverts commit 3657828ff4243fcc2f3b3fa4e7bed34d646ad565.
1 parent bf2bef6
Raw File
Tip revision: 5438f72ea0bc2abb3754b2b906a34d497bd8457c authored by Philip Jägenstedt on 23 November 2018, 09:17:43 UTC
Revert "Find manifest for download by tags instead of commits"
Tip revision: 5438f72
idlharness.window.js
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js

'use strict';

// https://w3c.github.io/paint-timing/

idl_test(
  ['paint-timing'],
  ['performance-timeline'],
  (idl_array, t) => {
    idl_array.add_objects({
      PerformancePaintTiming: ['paintTiming'],
    });

    const awaitPaint = new Promise(resolve => {
      let observer = new PerformanceObserver(list => {
        self.paintTiming = list.getEntries()[0];
        resolve();
      });
      observer.observe({ entryTypes: ['paint'] });
    });
    const timeout = new Promise((_, reject) => {
      t.step_timeout(() => reject('Timed out waiting for paint event'), 3000);
    });
    return Promise.race([awaitPaint, timeout]);
  }
);
back to top