Changeset 206115 in webkit


Ignore:
Timestamp:
Sep 19, 2016 1:47:18 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: adopt Object.awaitEvent in LayoutTests/inspector/script-profiler
https://bugs.webkit.org/show_bug.cgi?id=162101

Patch by Devin Rousso <Devin Rousso> on 2016-09-19
Reviewed by Brian Burg.

Replace instances of singleFireEventListener with awaitEvent and use promise logic to make
tests more readable.

  • inspector/script-profiler/event-type-Other.html:
Location:
trunk/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r206114 r206115  
     12016-09-19  Devin Rousso  <dcrousso+webkit@gmail.com>
     2
     3        Web Inspector: adopt Object.awaitEvent in LayoutTests/inspector/script-profiler
     4        https://bugs.webkit.org/show_bug.cgi?id=162101
     5
     6        Reviewed by Brian Burg.
     7
     8        Replace instances of singleFireEventListener with awaitEvent and use promise logic to make
     9        tests more readable.
     10
     11        * inspector/script-profiler/event-type-Other.html:
     12
    1132016-09-19  Devin Rousso  <dcrousso+webkit@gmail.com>
    214
  • trunk/LayoutTests/inspector/script-profiler/event-type-Other.html

    r198648 r206115  
    3030        name: "TrackingSession",
    3131        description: "Start a tracking session that includes multiple web script evaluations classified as an Other event type.",
    32         test: function(resolve, reject) {
    33             InspectorProtocol.awaitEvent({event: "ScriptProfiler.trackingStart"}).then((messageObject) => {
     32        test(resolve, reject) {
     33            InspectorProtocol.awaitEvent({event: "ScriptProfiler.trackingStart"})
     34            .then((messageObject) => {
    3435                ProtocolTest.log("ScriptProfiler.trackingStart");
    3536            });
     
    4041            });
    4142
    42             InspectorProtocol.awaitEvent({event: "ScriptProfiler.trackingComplete"}).then((messageObject) => {
     43            InspectorProtocol.awaitEvent({event: "ScriptProfiler.trackingComplete"})
     44            .then((messageObject) => {
    4345                ProtocolTest.log("ScriptProfiler.trackingComplete");
    44                 resolve();
     46            })
     47            .then(resolve, reject);
     48
     49            ProtocolTest.awaitEvent("TestPageTimerEvaluated")
     50            .then((event) => {
     51                InspectorProtocol.sendCommand("ScriptProfiler.stopTracking", {});
    4552            });
    4653
     
    4956            ProtocolTest.evaluateInPage("triggerEventDispatchEvaluation()");
    5057            ProtocolTest.evaluateInPage("triggerTimerEvaluation()");
    51             ProtocolTest.singleFireEventListener("TestPageTimerEvaluated", (event) => {
    52                 InspectorProtocol.sendCommand("ScriptProfiler.stopTracking", {});
    53             });
    5458        }
    5559    });
Note: See TracChangeset for help on using the changeset viewer.