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

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: Use anonymous function; add title. 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 <title>RTCPeerConnection signalingState</title>
5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script>
5 </head> 7 </head>
6 <body> 8 <body>
7 <script> 9 <script>
8 description("Tests the RTCPeerConnection states.");
9 10
10 var pc = null; 11 async_test(function(test) {
12 var pc = new webkitRTCPeerConnection({iceServers: []}, null);
13 assert_equals(pc.signalingState, 'stable');
14 pc.onsignalingstatechange = test.step_func(() => {
15 assert_equals(pc.signalingState, 'closed');
16 test.done();
17 });
18 pc.close();
19 }, 'Tests the RTCPeerConnection "stable" and "closed" signalingState strings.');
11 20
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> 21 </script>
27 </body> 22 </body>
28 </html> 23 </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