REGRESSION (r240644): Layout Test inspector/page/overrideSetting-ICECandidateFilterin...
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Feb 2019 22:54:38 +0000 (22:54 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Feb 2019 22:54:38 +0000 (22:54 +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:
Make sure to close the peer connection and data channel after each phase of the test.
Also add failure logging.

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

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

index 2538aef..c81c985 100644 (file)
@@ -1,5 +1,18 @@
 2019-02-28  Devin Rousso  <drousso@apple.com>
 
 2019-02-28  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:
+        Make sure to close the peer connection and data channel after each phase of the test.
+        Also add failure logging.
+
+2019-02-28  Devin Rousso  <drousso@apple.com>
+
         Web Inspector: Canvas: change tests to not print out dataURLs
         https://bugs.webkit.org/show_bug.cgi?id=195136
         <rdar://problem/48248697>
         Web Inspector: Canvas: change tests to not print out dataURLs
         https://bugs.webkit.org/show_bug.cgi?id=195136
         <rdar://problem/48248697>
index 3b8b06e..329114e 100644 (file)
@@ -3,9 +3,13 @@ Tests for the Page.overrideSetting command.
 
 == Running test suite: Page.overrideSetting
 -- Running test case: Page.overrideSetting.ICECandidateFilteringEnabled
 
 == 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...
 PASS: Should not be able to establish a connection when filtering ice candidates.
 Overriding ICECandidateFilteringEnabled to false...
+PASS: created offer
+PASS: received ICE candidate.
 PASS: Should be able to establish a connection when filtering ice candidates.
 Removing ICECandidateFilteringEnabled override...
 PASS: Should be able to establish a connection when filtering ice candidates.
 Removing ICECandidateFilteringEnabled override...
+PASS: created offer
 PASS: Should not be able to establish a connection when filtering ice candidates.
 
 PASS: Should not be able to establish a connection when filtering ice candidates.
 
index 33d7812..b18993f 100644 (file)
@@ -10,25 +10,36 @@ if (window.internals)
 function createDataChannel() {
     let receivedCandidate = false;
 
 function createDataChannel() {
     let receivedCandidate = false;
 
+    let dc = null;
+
     let pc = new RTCPeerConnection();
     let pc = new RTCPeerConnection();
-    pc.createDataChannel("sendDataChannel");
     pc.onicecandidate = (event) => {
         if (event.candidate) {
     pc.onicecandidate = (event) => {
         if (event.candidate) {
+            if (!receivedCandidate)
+                TestPage.addResult("PASS: received ICE candidate.");
             receivedCandidate = true;
             return;
         }
 
             receivedCandidate = true;
             return;
         }
 
+        delete pc.onicecandidate;
+        pc.close();
+        dc.close();
+
         if (receivedCandidate) {
         if (receivedCandidate) {
-            pc.createOffer().then((offer) => {
-                TestPage.dispatchEventToFrontend("DataChannel", {success: true});
-            });
+            TestPage.dispatchEventToFrontend("DataChannel", {success: true});
         } else
             TestPage.dispatchEventToFrontend("DataChannel", {success: false});
         } else
             TestPage.dispatchEventToFrontend("DataChannel", {success: false});
-
-        delete pc.onicecandidate;
     };
     };
-    pc.createOffer().then((offer) => {
-        pc.setLocalDescription(offer);
+
+    dc = pc.createDataChannel("sendDataChannel");
+
+    pc.createOffer()
+    .then((offer) => {
+        TestPage.addResult("PASS: created offer");
+        return pc.setLocalDescription(offer);
+    })
+    .catch((error) => {
+        TestPage.addResult("FAIL: " + error);
     });
 }
 
     });
 }