зеркало из https://github.com/mozilla/gecko-dev.git
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
This commit is contained in:
Родитель
ddc740a12f
Коммит
75b2b23ab8
|
@ -18,7 +18,7 @@ body {
|
|||
<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);
|
||||
|
|
|
@ -23,7 +23,7 @@ body {
|
|||
<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;
|
||||
|
|
|
@ -18,7 +18,7 @@ body {
|
|||
<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);
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
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';
|
||||
|
|
|
@ -12,7 +12,7 @@ body {
|
|||
<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
|
||||
|
|
|
@ -12,7 +12,7 @@ body {
|
|||
<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';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<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.");
|
||||
|
|
|
@ -17,7 +17,7 @@ body {
|
|||
<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);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
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);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<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);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<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;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<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);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<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=';
|
||||
|
|
|
@ -26,7 +26,7 @@ body {
|
|||
|
||||
<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];
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<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);
|
||||
|
|
|
@ -16,7 +16,7 @@ body {
|
|||
<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);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<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.
|
||||
|
|
|
@ -14,7 +14,7 @@ body {
|
|||
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);
|
||||
|
|
|
@ -11,7 +11,7 @@ body {
|
|||
<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');
|
||||
|
|
|
@ -13,7 +13,7 @@ body {
|
|||
<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;
|
||||
|
|
|
@ -21,7 +21,7 @@ body {
|
|||
<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);
|
||||
|
|
|
@ -21,7 +21,7 @@ body {
|
|||
<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);
|
||||
|
|
|
@ -20,7 +20,7 @@ body {
|
|||
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);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</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.
|
||||
|
|
|
@ -18,7 +18,7 @@ body {
|
|||
<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;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<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';
|
||||
|
|
|
@ -18,7 +18,7 @@ body {
|
|||
<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);
|
||||
|
|
|
@ -12,7 +12,7 @@ body {
|
|||
<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!");
|
||||
|
|
|
@ -14,7 +14,7 @@ body {
|
|||
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);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<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(
|
||||
|
|
|
@ -22,7 +22,7 @@ body {
|
|||
<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 => {
|
||||
|
|
|
@ -12,7 +12,7 @@ body {
|
|||
<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!');
|
||||
|
|
|
@ -12,7 +12,7 @@ body {
|
|||
<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!');
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<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);
|
||||
|
|
|
@ -15,7 +15,7 @@ p {
|
|||
<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(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<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);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
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(
|
||||
|
|
|
@ -14,7 +14,7 @@ body {
|
|||
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);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<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;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<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) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<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
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<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 = () => {
|
||||
|
|
|
@ -21,7 +21,7 @@ h3 {
|
|||
<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;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<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);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
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;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
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'));
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
}
|
||||
|
||||
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 => {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<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) {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<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',
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
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);
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
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.
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
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();
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
<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) {
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
}
|
||||
|
||||
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(
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<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];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
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;
|
||||
|
|
|
@ -19,7 +19,7 @@ const Containers = [
|
|||
];
|
||||
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 => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
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();
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<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();
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<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();
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<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();
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<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();
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<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');
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<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();
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<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');
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<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.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<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();
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
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();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
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");
|
||||
|
@ -21,8 +21,8 @@ function syncWait(waitDuration) {
|
|||
|
||||
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();
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<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");
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
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;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<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.
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<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');
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<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');
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<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');
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<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.
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<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');
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<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'
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<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() {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<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();
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<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() {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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");
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<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() {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<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.
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<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() {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<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";
|
||||
|
|
|
@ -21,7 +21,7 @@ window.onload = function() {
|
|||
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) {
|
||||
|
|
|
@ -36,7 +36,7 @@ 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);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<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) {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче