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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« 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