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..a6645b76a2f0a76b3629844ae234591cee2bfe8c 100644 |
| --- a/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-state.html |
| +++ b/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-state.html |
| @@ -1,28 +1,24 @@ |
| -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| +<!DOCTYPE html> |
| <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) { |
| + var pc = null; |
| + function stateChanged() { |
| + assert_equals(pc.signalingState, 'closed'); |
| + test.done(); |
| + } |
| + var pc = new webkitRTCPeerConnection({iceServers: []}, null); |
|
jsbell
2016/09/06 20:02:07
The `var` here is not required.
|
| + assert_equals(pc.signalingState, 'stable'); |
| + pc.onsignalingstatechange = test.step_func(stateChanged); |
| + pc.close(); |
| +}, 'Tests the RTCPeerConnection states.'); |
| -function stateChanged() |
| -{ |
| - testPassed("stateChanged was called"); |
| - shouldBeEqualToString('pc.signalingState', 'closed'); |
| - finishJSTest(); |
| -} |
| - |
| -shouldNotThrow('pc = new webkitRTCPeerConnection({iceServers:[]}, null);'); |
| -shouldBeEqualToString('pc.signalingState', 'stable'); |
| -pc.onsignalingstatechange = stateChanged; |
| -pc.close(); |
| - |
| -window.jsTestIsAsync = true; |
| -window.successfullyParsed = true; |
| </script> |
| </body> |
| </html> |