Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-state.html

Issue 2305263002: Convert RTCPeerConnection-state.html to use testharness.js. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-state-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
5 </head> 6 </head>
6 <body> 7 <body>
7 <script> 8 <script>
8 description("Tests the RTCPeerConnection states.");
9 9
10 var pc = null; 10 async_test(function(test) {
11 11
12 function stateChanged() 12 var pc = null;
13 {
14 testPassed("stateChanged was called");
15 shouldBeEqualToString('pc.signalingState', 'closed');
16 finishJSTest();
17 }
18 13
19 shouldNotThrow('pc = new webkitRTCPeerConnection({iceServers:[]}, null);'); 14 function stateChanged() {
20 shouldBeEqualToString('pc.signalingState', 'stable'); 15 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
21 pc.onsignalingstatechange = stateChanged; 16 test.done();
22 pc.close(); 17 }
23 18
24 window.jsTestIsAsync = true; 19 test.step(function() {
jsbell 2016/09/06 16:26:35 test.step() is not needed here since this is alrea
25 window.successfullyParsed = true; 20 pc = new webkitRTCPeerConnection({iceServers: []}, null);
21 assert_equals(pc.signalingState, 'stable');
22 pc.onsignalingstatechange = stateChanged;
jsbell 2016/09/06 16:26:35 The timeout should go away if you replace this wit
23 pc.close();
24 });
25 }, 'Tests the RTCPeerConnection states.');
26
26 </script> 27 </script>
27 </body> 28 </body>
28 </html> 29 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-state-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698