REGRESSION (r240644): Layout Test inspector/page/overrideSetting-ICECandidateFilterin...
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Apr 2019 19:46:34 +0000 (19:46 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Apr 2019 19:46:34 +0000 (19:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194437
<rdar://problem/48008005>

Reviewed by Joseph Pecoraro.

* inspector/page/overrideSetting-ICECandidateFilteringEnabled.html:
* inspector/page/overrideSetting-ICECandidateFilteringEnabled-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244280 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/inspector/page/overrideSetting-ICECandidateFilteringEnabled-expected.txt
LayoutTests/inspector/page/overrideSetting-ICECandidateFilteringEnabled.html

index b640b84..c599a1a 100644 (file)
@@ -1,3 +1,14 @@
+2019-04-15  Devin Rousso  <drousso@apple.com>
+
+        REGRESSION (r240644): Layout Test inspector/page/overrideSetting-ICECandidateFilteringEnabled.html is a flaky timeout
+        https://bugs.webkit.org/show_bug.cgi?id=194437
+        <rdar://problem/48008005>
+
+        Reviewed by Joseph Pecoraro.
+
+        * inspector/page/overrideSetting-ICECandidateFilteringEnabled.html:
+        * inspector/page/overrideSetting-ICECandidateFilteringEnabled-expected.txt:
+
 2019-04-15  Said Abou-Hallawa  <said@apple.com>
 
         ASSERT fires when removing a disallowed clone from the shadow tree without reseting its corresponding element
index 329114e..ddefa70 100644 (file)
@@ -3,13 +3,13 @@ Tests for the Page.overrideSetting command.
 
 == Running test suite: Page.overrideSetting
 -- Running test case: Page.overrideSetting.ICECandidateFilteringEnabled
-PASS: created offer
-PASS: Should not be able to establish a connection when filtering ice candidates.
 Overriding ICECandidateFilteringEnabled to false...
+Creating data channel...
 PASS: created offer
 PASS: received ICE candidate.
 PASS: Should be able to establish a connection when filtering ice candidates.
 Removing ICECandidateFilteringEnabled override...
+Creating data channel...
 PASS: created offer
 PASS: Should not be able to establish a connection when filtering ice candidates.
 
index b18993f..4e1bc20 100644 (file)
@@ -12,7 +12,7 @@ function createDataChannel() {
 
     let dc = null;
 
-    let pc = new RTCPeerConnection();
+    let pc = new RTCPeerConnection;
     pc.onicecandidate = (event) => {
         if (event.candidate) {
             if (!receivedCandidate)
@@ -21,16 +21,14 @@ function createDataChannel() {
             return;
         }
 
+        TestPage.dispatchEventToFrontend("DataChannel", {success: !!receivedCandidate});
+
         delete pc.onicecandidate;
         pc.close();
         dc.close();
-
-        if (receivedCandidate) {
-            TestPage.dispatchEventToFrontend("DataChannel", {success: true});
-        } else
-            TestPage.dispatchEventToFrontend("DataChannel", {success: false});
     };
 
+    TestPage.addResult("Creating data channel...");
     dc = pc.createDataChannel("sendDataChannel");
 
     pc.createOffer()
@@ -45,18 +43,14 @@ function createDataChannel() {
 
 function test()
 {
+    InspectorTest.debug();
+
     let suite = InspectorTest.createAsyncSuite("Page.overrideSetting");
 
     suite.addTestCase({
         name: "Page.overrideSetting.ICECandidateFilteringEnabled",
         description: "Test that changing whether ice candidate filtering is enabled has an effect.",
         async test() {
-            let [defaultResult] = await Promise.all([
-                InspectorTest.awaitEvent("DataChannel"),
-                InspectorTest.evaluateInPage(`createDataChannel()`),
-            ]);
-            InspectorTest.expectFalse(defaultResult.data.success, "Should not be able to establish a connection when filtering ice candidates.");
-
             InspectorTest.log("Overriding ICECandidateFilteringEnabled to false...");
             await PageAgent.overrideSetting(PageAgent.Setting.ICECandidateFilteringEnabled, false);
 
@@ -64,7 +58,7 @@ function test()
                 InspectorTest.awaitEvent("DataChannel"),
                 InspectorTest.evaluateInPage(`createDataChannel()`),
             ])
-            InspectorTest.expectFalse(defaultResult.data.success, "Should be able to establish a connection when filtering ice candidates.");
+            InspectorTest.expectThat(overriddenResult.data.success, "Should be able to establish a connection when filtering ice candidates.");
 
             InspectorTest.log("Removing ICECandidateFilteringEnabled override...");
             await PageAgent.overrideSetting(PageAgent.Setting.ICECandidateFilteringEnabled);
@@ -73,7 +67,7 @@ function test()
                 InspectorTest.awaitEvent("DataChannel"),
                 InspectorTest.evaluateInPage(`createDataChannel()`),
             ])
-            InspectorTest.expectFalse(defaultResult.data.success, "Should not be able to establish a connection when filtering ice candidates.");
+            InspectorTest.expectFalse(originalResult.data.success, "Should not be able to establish a connection when filtering ice candidates.");
         },
     });