WebKit Bugzilla
Attachment 340243 Details for
Bug 185385
: REGRESSION: performance-api/performance-observer-entry-sort.html is flaky
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Adds assertions
bug-185385-20180511211306.patch (text/plain), 2.79 KB, created by
Ryosuke Niwa
on 2018-05-11 21:13:07 PDT
(
hide
)
Description:
Adds assertions
Filename:
MIME Type:
Creator:
Ryosuke Niwa
Created:
2018-05-11 21:13:07 PDT
Size:
2.79 KB
patch
obsolete
>Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 231729) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,14 @@ >+2018-05-11 Ryosuke Niwa <rniwa@webkit.org> >+ >+ REGRESSION: performance-api/performance-observer-entry-sort.html is flaky >+ https://bugs.webkit.org/show_bug.cgi?id=185385 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add diagnostic assertions to test the hypothesis that performance.now is drifting backwards. >+ >+ * performance-api/performance-observer-entry-sort.html: >+ > 2018-05-11 Nan Wang <n_wang@apple.com> > > AX: In role=dialog elements with aria-modal=true VoiceOver iOS/macOS can't manually focus or read dialog paragraph description text inside the modal. >Index: LayoutTests/performance-api/performance-observer-entry-sort.html >=================================================================== >--- LayoutTests/performance-api/performance-observer-entry-sort.html (revision 231729) >+++ LayoutTests/performance-api/performance-observer-entry-sort.html (working copy) >@@ -8,10 +8,19 @@ > description("Test PerformanceObserver mutating itself while in its callback."); > window.jsTestIsAsync = true; > >+function assert(assertion) >+{ >+ if (!assertion()) >+ console.log(`Assertion "${assertion}" failed`); >+} >+ > function wait() { >- let now = performance.now(); >- while (now === performance.now()) >- continue; >+ let start = performance.now(); >+ let now; >+ do { >+ now = performance.now(); >+ } while (start === now); >+ assert(() => now > start); > } > > let observer = new PerformanceObserver((list) => { >@@ -57,6 +66,12 @@ let observer = new PerformanceObserver(( > shouldBeEqualToString(`list.getEntries()[6].name`, "measure-matching-mark2-2"); > shouldBeEqualToString(`list.getEntries()[7].name`, "mark3"); > >+ const mark2 = list.getEntries().find((entry) => entry.name == 'mark2'); >+ const mark3 = list.getEntries().find((entry) => entry.name == 'mark3'); >+ assert(() => mark2.startTime <= mark2Time); >+ assert(() => mark3Time <= mark3.startTime); >+ assert(() => mark2.startTime < mark3.startTime); >+ > finishJSTest(); > }); > >@@ -66,10 +81,13 @@ performance.mark("mark1"); > performance.measure("measure1"); > wait(); // Ensure mark1 !== mark2 startTime by making sure performance.now advances. > performance.mark("mark2"); >+const mark2Time = performance.now(); > performance.measure("measure2"); > performance.measure("measure-matching-mark2-1", "mark2"); > wait(); // Ensure mark2 !== mark3 startTime by making sure performance.now advances. >+const mark3Time = performance.now(); > performance.mark("mark3"); >+assert(() => mark3Time > mark2Time); > performance.measure("measure3"); > performance.measure("measure-matching-mark2-2", "mark2"); > </script>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
saam
:
review+
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185385
: 340243 |
340247