Unreviewed, fix test failures after r243269.
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Mar 2019 23:34:29 +0000 (23:34 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Mar 2019 23:34:29 +0000 (23:34 +0000)
commit6fb6e56ad336a371a382f57e2b537ad00b939fd3
treedacbbd6d72bd6243c492f9afc9ceb0278ca4e5b5
parentb1235d66d82a6c64e36fc825b2227986a8b575b6
Unreviewed, fix test failures after r243269.

In debug builds, it's possible that the Web Inspector frontend is told to stop a timeline
recording before all of the recorded records have had a chance to be completed/processed.

As an example
```
    setTimeout(() => {
        <stop recording>
    });
```
it may happen that the "stop recording" event will be dispatched before the timeout has
finished executing, meaning that the event that contains the recorded data for that timeout
will be ignored by the frontend.

Rework the tests so that they don't dispatch the "stop recording" event until the expected
record is received by the frontend, rather than having the test code itself say when to stop.

* inspector/timeline/resources/timeline-event-utilities.js:
(savePageData): Added.
(TestPage.registerInitializer.InspectorTest.TimelineEvent.captureTimelineWithScript):
(finishRecording): Deleted.
* inspector/timeline/timeline-event-CancelAnimationFrame.html:
* inspector/timeline/timeline-event-CancelAnimationFrame-expected.txt:
* inspector/timeline/timeline-event-EventDispatch.html:
* inspector/timeline/timeline-event-EventDispatch-expected.txt:
* inspector/timeline/timeline-event-FireAnimationFrame.html:
* inspector/timeline/timeline-event-FireAnimationFrame-expected.txt:
* inspector/timeline/timeline-event-RequestAnimationFrame.html:
* inspector/timeline/timeline-event-RequestAnimationFrame-expected.txt:
* inspector/timeline/timeline-event-TimerFire.html:
* inspector/timeline/timeline-event-TimerFire-expected.txt:
* inspector/timeline/timeline-event-TimerInstall.html:
* inspector/timeline/timeline-event-TimerInstall-expected.txt:
* inspector/timeline/timeline-event-TimerRemove.html:
* inspector/timeline/timeline-event-TimerRemove-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/timeline/resources/timeline-event-utilities.js
LayoutTests/inspector/timeline/timeline-event-CancelAnimationFrame-expected.txt
LayoutTests/inspector/timeline/timeline-event-CancelAnimationFrame.html
LayoutTests/inspector/timeline/timeline-event-EventDispatch-expected.txt
LayoutTests/inspector/timeline/timeline-event-EventDispatch.html
LayoutTests/inspector/timeline/timeline-event-FireAnimationFrame-expected.txt
LayoutTests/inspector/timeline/timeline-event-FireAnimationFrame.html
LayoutTests/inspector/timeline/timeline-event-RequestAnimationFrame-expected.txt
LayoutTests/inspector/timeline/timeline-event-RequestAnimationFrame.html
LayoutTests/inspector/timeline/timeline-event-TimerFire-expected.txt
LayoutTests/inspector/timeline/timeline-event-TimerFire.html
LayoutTests/inspector/timeline/timeline-event-TimerInstall-expected.txt
LayoutTests/inspector/timeline/timeline-event-TimerInstall.html
LayoutTests/inspector/timeline/timeline-event-TimerRemove-expected.txt
LayoutTests/inspector/timeline/timeline-event-TimerRemove.html