OLD | NEW |
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 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1508 ExecuteJavascriptAndReturnResult( | 1508 ExecuteJavascriptAndReturnResult( |
1509 "failTestAfterTimeout('Got no unmute event', 1500);")); | 1509 "failTestAfterTimeout('Got no unmute event', 1500);")); |
1510 | 1510 |
1511 // Mute | 1511 // Mute |
1512 media::FakeAudioInputStream::SetGlobalMutedState(true); | 1512 media::FakeAudioInputStream::SetGlobalMutedState(true); |
1513 EXPECT_EQ("onmute: muted=true, readyState=live", | 1513 EXPECT_EQ("onmute: muted=true, readyState=live", |
1514 ExecuteJavascriptAndReturnResult( | 1514 ExecuteJavascriptAndReturnResult( |
1515 "failTestAfterTimeout('Got no mute event', 1500);")); | 1515 "failTestAfterTimeout('Got no mute event', 1500);")); |
1516 } | 1516 } |
1517 | 1517 |
| 1518 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, SrcObjectAddVideoTrack) { |
| 1519 ASSERT_TRUE(embedded_test_server()->Start()); |
| 1520 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); |
| 1521 NavigateToURL(shell(), url); |
| 1522 ExecuteJavascriptAndWaitForOk("srcObjectAddVideoTrack()"); |
| 1523 } |
| 1524 |
| 1525 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, |
| 1526 SrcObjectRemoveVideoTrack) { |
| 1527 ASSERT_TRUE(embedded_test_server()->Start()); |
| 1528 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); |
| 1529 NavigateToURL(shell(), url); |
| 1530 ExecuteJavascriptAndWaitForOk("srcObjectRemoveVideoTrack()"); |
| 1531 } |
| 1532 |
| 1533 // TODO(guidou): Add SrcObjectAddAudioTrack and SrcObjectRemoveAudioTrack when |
| 1534 // a straightforward mechanism to detect the presence/absence of audio in a |
| 1535 // media element with an assigned MediaStream becomes available. |
| 1536 |
1518 } // namespace content | 1537 } // namespace content |
OLD | NEW |