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

Unified 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 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..d7fb3f5ff8a5581f61ff57cf88a940d9cd77c3b3 100644
--- a/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-state.html
+++ b/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-state.html
@@ -1,28 +1,23 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<!DOCTYPE html>
<html>
<head>
-<script src="../../resources/js-test.js"></script>
+<title>RTCPeerConnection signalingState</title>
+<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 = new webkitRTCPeerConnection({iceServers: []}, null);
+ assert_equals(pc.signalingState, 'stable');
+ pc.onsignalingstatechange = test.step_func(() => {
+ assert_equals(pc.signalingState, 'closed');
+ test.done();
+ });
+ pc.close();
+}, 'Tests the RTCPeerConnection "stable" and "closed" signalingState strings.');
-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>
« 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