mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Auto merge of #18372 - tigercosmos:userTimingApi, r=ferjm
TEST: fix and add case of po-observe.any.js <!-- Please describe your changes on the following line: --> 1. implementing step 3 from the [`PerformanceObserver.observe()`](https://w3c.github.io/performance-timeline/#dom-performanceobserver-observe()) method spec properly. 2. also add cases about step 1 & 2 work on the top of #18283 r? @ferjm --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #18285 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18372) <!-- Reviewable:end -->
This commit is contained in:
commit
6a09b1d21a
4 changed files with 2 additions and 14 deletions
|
@ -163,7 +163,7 @@ impl Performance {
|
||||||
observer.set_entries(obs_entries);
|
observer.set_entries(obs_entries);
|
||||||
}
|
}
|
||||||
let mut observers = self.observers.borrow_mut();
|
let mut observers = self.observers.borrow_mut();
|
||||||
match observers.iter().position(|o| &(*o.observer) == observer) {
|
match observers.iter().position(|o| *o.observer == *observer) {
|
||||||
// If the observer is already in the list, we only update the observed
|
// If the observer is already in the list, we only update the observed
|
||||||
// entry types.
|
// entry types.
|
||||||
Some(p) => observers[p].entry_types = entry_types,
|
Some(p) => observers[p].entry_types = entry_types,
|
||||||
|
|
|
@ -586441,7 +586441,7 @@
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"performance-timeline/po-observe.any.js": [
|
"performance-timeline/po-observe.any.js": [
|
||||||
"a15299a6128e4fcb62fa074eba2e0fc07e4e3fe8",
|
"78b32c64ddb9e6da80b57fb1f91576dd0f59b13a",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"performance-timeline/po-resource.html": [
|
"performance-timeline/po-resource.html": [
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
[po-observe.any.worker.html]
|
|
||||||
type: testharness
|
|
||||||
[replace observer if already present]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
||||||
[po-observe.any.html]
|
|
||||||
type: testharness
|
|
||||||
[replace observer if already present]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
async_test(function (t) {
|
async_test(function (t) {
|
||||||
var observer = new PerformanceObserver(
|
var observer = new PerformanceObserver(
|
||||||
t.step_func(function (entryList, obs) {
|
t.step_func(function (entryList, obs) {
|
||||||
assert_equals(observer, obs, "observer is second parameter");
|
|
||||||
checkEntries(entryList.getEntries(),
|
checkEntries(entryList.getEntries(),
|
||||||
[{ entryType: "measure", name: "measure1"}]);
|
[{ entryType: "measure", name: "measure1"}]);
|
||||||
observer.disconnect();
|
observer.disconnect();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue