зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1507660 [wpt PR 14084] - [UserTimingL3] Fix meature, mark API feature detection, a=testonly
Automatic update from web-platform-tests[UserTimingL3] Fix meature, mark API feature detection UserTimingL3 uses returned value for feature detection. If measure and mark API returns null, the APIs are L2 API; If the APIs return an entry, the APIs are L3 API. However, in the current implementation, when L3 API is enabled, the APIs do not always return the created entry. This CL is to fix this bug, and add layout tests to verify it. Change-Id: I9854f0abd0d64a3334701e09d6ce0fc245fcca3e Reviewed-on: https://chromium-review.googlesource.com/c/1338225 Commit-Queue: Liquan (Max) Gǔ <maxlg@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#608552} -- wpt-commits: a4efb68eb4bb30453a6c958ad58f8c2540dc967e wpt-pr: 14084
This commit is contained in:
Родитель
5868d019fa
Коммит
21929ae63d
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE HTML>
|
||||
<meta charset=utf-8>
|
||||
<title>User Timing: L2 APIs return null</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<p>User Timing: L2 APIs return null</p>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function (t) {
|
||||
self.performance.clearMeasures();
|
||||
const measure = self.performance.measure("measure1");
|
||||
assert_equals(measure, null);
|
||||
t.done();
|
||||
}, "L2: performance.measure(name) should return null.");
|
||||
|
||||
async_test(function (t) {
|
||||
self.performance.clearMeasures();
|
||||
self.performance.mark("1");
|
||||
const measure = self.performance.measure("measure2", 1);
|
||||
assert_equals(measure, null);
|
||||
t.done();
|
||||
}, "L2: performance.measure(name, param1) should return null.");
|
||||
|
||||
async_test(function (t) {
|
||||
self.performance.clearMeasures();
|
||||
self.performance.mark("1");
|
||||
self.performance.mark("2");
|
||||
const measure = self.performance.measure("measure3", 1, 2);
|
||||
assert_equals(measure, null);
|
||||
t.done();
|
||||
}, "L2: performance.measure(name, param1, param2) should return null.");
|
||||
|
||||
async_test(function (t) {
|
||||
self.performance.clearMarks();
|
||||
const mark = self.performance.mark("mark1");
|
||||
assert_equals(mark, null);
|
||||
t.done();
|
||||
}, "L2: performance.mark(name) should return null.");
|
||||
|
||||
async_test(function (t) {
|
||||
self.performance.clearMarks();
|
||||
const mark = self.performance.mark("mark2", { startTime: 34 });
|
||||
assert_equals(mark, null);
|
||||
t.done();
|
||||
}, "L2: performance.mark(name, param) should return null.");
|
||||
</script>
|
Загрузка…
Ссылка в новой задаче