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

Side by Side Diff: content/browser/webrtc/webrtc_getusermedia_browsertest.cc

Issue 2969093002: Make rendering of MediaStreams reflect changes to its set of tracks. (Closed)
Patch Set: rebase Created 3 years, 4 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 | content/renderer/media/webmediaplayer_ms.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/feature_list.h" 8 #include "base/feature_list.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 ExecuteJavascriptAndReturnResult( 1497 ExecuteJavascriptAndReturnResult(
1498 "failTestAfterTimeout('Got no unmute event', 1500);")); 1498 "failTestAfterTimeout('Got no unmute event', 1500);"));
1499 1499
1500 // Mute 1500 // Mute
1501 media::FakeAudioInputStream::SetGlobalMutedState(true); 1501 media::FakeAudioInputStream::SetGlobalMutedState(true);
1502 EXPECT_EQ("onmute: muted=true, readyState=live", 1502 EXPECT_EQ("onmute: muted=true, readyState=live",
1503 ExecuteJavascriptAndReturnResult( 1503 ExecuteJavascriptAndReturnResult(
1504 "failTestAfterTimeout('Got no mute event', 1500);")); 1504 "failTestAfterTimeout('Got no mute event', 1500);"));
1505 } 1505 }
1506 1506
1507 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, SrcObjectAddVideoTrack) {
1508 ASSERT_TRUE(embedded_test_server()->Start());
1509 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
1510 NavigateToURL(shell(), url);
1511 ExecuteJavascriptAndWaitForOk("srcObjectAddVideoTrack()");
1512 }
1513
1514 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest,
1515 SrcObjectRemoveVideoTrack) {
1516 ASSERT_TRUE(embedded_test_server()->Start());
1517 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
1518 NavigateToURL(shell(), url);
1519 ExecuteJavascriptAndWaitForOk("srcObjectRemoveVideoTrack()");
1520 }
1521
1522 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest,
1523 SrcObjectRemoveFirstOfTwoVideoTracks) {
1524 ASSERT_TRUE(embedded_test_server()->Start());
1525 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
1526 NavigateToURL(shell(), url);
1527 ExecuteJavascriptAndWaitForOk("srcObjectRemoveFirstOfTwoVideoTracks()");
1528 }
1529
1530 // TODO(guidou): Add SrcObjectAddAudioTrack and SrcObjectRemoveAudioTrack tests
1531 // when a straightforward mechanism to detect the presence/absence of audio in a
1532 // media element with an assigned MediaStream becomes available.
1533
1534 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest,
1535 SrcObjectReassignSameObject) {
1536 ASSERT_TRUE(embedded_test_server()->Start());
1537 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
1538 NavigateToURL(shell(), url);
1539 ExecuteJavascriptAndWaitForOk("srcObjectReassignSameObject()");
1540 }
1541
1507 } // namespace content 1542 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/webmediaplayer_ms.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698