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

Unified Diff: LayoutTests/fast/mediastream/RTCPeerConnection-stats.html

Issue 650063002: Move MediaStream and MediaStreamTrack implementation from modules/mediastream to core/mediastream. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased. Created 6 years, 2 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
Index: LayoutTests/fast/mediastream/RTCPeerConnection-stats.html
diff --git a/LayoutTests/fast/mediastream/RTCPeerConnection-stats.html b/LayoutTests/fast/mediastream/RTCPeerConnection-stats.html
deleted file mode 100644
index 1cc9089b24ea2f5d202094a8567b119f038ff879..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/mediastream/RTCPeerConnection-stats.html
+++ /dev/null
@@ -1,103 +0,0 @@
-
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../resources/js-test.js"></script>
-</head>
-<body>
-<script>
-description("Tests the RTCPeerConnection stats interface.");
-
-var pc = null;
-var result;
-var timestamp;
-var local;
-
-function getUserMedia(dictionary, callback) {
- try {
- navigator.webkitGetUserMedia(dictionary, callback, error);
- } catch (e) {
- testFailed('webkitGetUserMedia threw exception :' + e);
- finishJSTest();
- }
-}
-
-function error() {
- testFailed('Stream generation failed.');
- finishJSTest();
-}
-
-function verifyStats(status)
-{
- // Status must be a global variable to be used in test statements.
- status_g = status;
- result = status.result();
- shouldBeGreaterThanOrEqual('result.length', '2');
- // The "local" interface is deprecated. Keep test until interface deleted.
- local = result[0].local;
- timestamp = local.timestamp;
- // Windows XP sometimes gives time that appears to go backwards.
- // This hack will make the tests non-flaky if it never goes backwards
- // by more than 20 milliseconds.
- // Up to 10 milliseconds has been observed on XP, 2 milliseconds on Win7.
- fudgeForXP = 20;
- timediff = timestamp - startTime + fudgeForXP;
- shouldBeGreaterThanOrEqual('timediff', '0');
- shouldBeGreaterThanOrEqual('local.names().length', '1');
- shouldBeGreaterThanOrEqual('local.names().indexOf("type")', '0');
- shouldBe('local.stat("type")', '"audio"');
- // Newer interface.
- res = result[0];
- timediff = timestamp - startTime + fudgeForXP;
- shouldBeGreaterThanOrEqual('timediff', '0');
- shouldBeNonNull('res.id');
- shouldBeNonNull('res.type');
- shouldBeGreaterThanOrEqual('res.names().length', '1');
- shouldBeGreaterThanOrEqual('res.names().indexOf("type")', '0');
- shouldBe('res.stat("type")', '"audio"');
- // Named getter: Can access results by their ID values.
- shouldBeNonNull('status_g.namedItem(res.id)');
- shouldBeNonNull('status_g[res.id]');
-}
-
-function statsHandler1(status)
-{
- testPassed("statsHandler1 was called");
- shouldBeNonNull('status');
- result = status.result();
- shouldBe('result.length', '0');
- shouldNotThrow('getUserMedia({audio:true, video:true}, gotStream)');
-}
-
-function gotStream(s) {
- testPassed('Got a stream.');
- stream = s;
-
- pc.addStream(stream);
- shouldNotThrow('pc.getStats(statsHandler2)');
-}
-
-function statsHandler2(status)
-{
- testPassed("statsHandler2 was called");
- verifyStats(status);
- shouldNotThrow('pc.close()');
- shouldNotThrow('pc.getStats(statsHandler3)');
-}
-
-function statsHandler3(status)
-{
- testPassed("statsHandler3 was called");
- verifyStats(status);
- finishJSTest();
-}
-
-var startTime = new Date().getTime();
-shouldNotThrow('pc = new webkitRTCPeerConnection(null)');
-shouldNotThrow('pc.getStats(statsHandler1)');
-
-window.jsTestIsAsync = true;
-window.successfullyParsed = true;
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698