Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-state.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-state.html b/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-state.html |
| index 0235b40d020c0173013ddb8a4aa23c49de672465..5b11778f8b2b53c7ce0fcae7d1ccc3ec0791f251 100644 |
| --- a/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-state.html |
| +++ b/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-state.html |
| @@ -1,28 +1,29 @@ |
| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| -<script src="../../resources/js-test.js"></script> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| </head> |
| <body> |
| <script> |
| -description("Tests the RTCPeerConnection states."); |
| -var pc = null; |
| +async_test(function(test) { |
| -function stateChanged() |
| -{ |
| - testPassed("stateChanged was called"); |
| - shouldBeEqualToString('pc.signalingState', 'closed'); |
| - finishJSTest(); |
| -} |
| + var pc = null; |
| -shouldNotThrow('pc = new webkitRTCPeerConnection({iceServers:[]}, null);'); |
| -shouldBeEqualToString('pc.signalingState', 'stable'); |
| -pc.onsignalingstatechange = stateChanged; |
| -pc.close(); |
| + function stateChanged() { |
| + assert_equals(pc.signalingState, 'closed'); |
|
qyearsley
2016/09/06 16:07:55
If I change this string to something else, the tes
jsbell
2016/09/06 16:26:35
In async tests you must wrap callback functions so
|
| + test.done(); |
| + } |
| + |
| + test.step(function() { |
|
jsbell
2016/09/06 16:26:35
test.step() is not needed here since this is alrea
|
| + pc = new webkitRTCPeerConnection({iceServers: []}, null); |
| + assert_equals(pc.signalingState, 'stable'); |
| + pc.onsignalingstatechange = stateChanged; |
|
jsbell
2016/09/06 16:26:35
The timeout should go away if you replace this wit
|
| + pc.close(); |
| + }); |
| +}, 'Tests the RTCPeerConnection states.'); |
| -window.jsTestIsAsync = true; |
| -window.successfullyParsed = true; |
| </script> |
| </body> |
| </html> |