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

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: Updated based on feedback 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>
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 var pc = null;
12 function stateChanged() {
13 assert_equals(pc.signalingState, 'closed');
14 test.done();
15 }
16 var pc = new webkitRTCPeerConnection({iceServers: []}, null);
jsbell 2016/09/06 20:02:07 The `var` here is not required.
17 assert_equals(pc.signalingState, 'stable');
18 pc.onsignalingstatechange = test.step_func(stateChanged);
19 pc.close();
20 }, 'Tests the RTCPeerConnection states.');
11 21
12 function stateChanged()
13 {
14 testPassed("stateChanged was called");
15 shouldBeEqualToString('pc.signalingState', 'closed');
16 finishJSTest();
17 }
18
19 shouldNotThrow('pc = new webkitRTCPeerConnection({iceServers:[]}, null);');
20 shouldBeEqualToString('pc.signalingState', 'stable');
21 pc.onsignalingstatechange = stateChanged;
22 pc.close();
23
24 window.jsTestIsAsync = true;
25 window.successfullyParsed = true;
26 </script> 22 </script>
27 </body> 23 </body>
28 </html> 24 </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