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 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 ExecuteJavascriptAndReturnResult( | 1474 ExecuteJavascriptAndReturnResult( |
1475 "failTestAfterTimeout('Got no unmute event', 1500);")); | 1475 "failTestAfterTimeout('Got no unmute event', 1500);")); |
1476 | 1476 |
1477 // Mute | 1477 // Mute |
1478 media::FakeAudioInputStream::SetGlobalMutedState(true); | 1478 media::FakeAudioInputStream::SetGlobalMutedState(true); |
1479 EXPECT_EQ("onmute: muted=true, readyState=live", | 1479 EXPECT_EQ("onmute: muted=true, readyState=live", |
1480 ExecuteJavascriptAndReturnResult( | 1480 ExecuteJavascriptAndReturnResult( |
1481 "failTestAfterTimeout('Got no mute event', 1500);")); | 1481 "failTestAfterTimeout('Got no mute event', 1500);")); |
1482 } | 1482 } |
1483 | 1483 |
| 1484 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, SrcObjectAddVideoTrack) { |
| 1485 ASSERT_TRUE(embedded_test_server()->Start()); |
| 1486 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); |
| 1487 NavigateToURL(shell(), url); |
| 1488 ExecuteJavascriptAndWaitForOk("srcObjectAddVideoTrack()"); |
| 1489 } |
| 1490 |
| 1491 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, |
| 1492 SrcObjectRemoveVideoTrack) { |
| 1493 ASSERT_TRUE(embedded_test_server()->Start()); |
| 1494 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); |
| 1495 NavigateToURL(shell(), url); |
| 1496 ExecuteJavascriptAndWaitForOk("srcObjectRemoveVideoTrack()"); |
| 1497 } |
| 1498 |
| 1499 // TODO(guidou): Add SrcObjectAddAudioTrack and SrcObjectRemoveAudioTrack tests |
| 1500 // when a straightforward mechanism to detect the presence/absence of audio in a |
| 1501 // media element with an assigned MediaStream becomes available. |
| 1502 |
| 1503 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, |
| 1504 SrcObjectReassignSameObject) { |
| 1505 ASSERT_TRUE(embedded_test_server()->Start()); |
| 1506 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); |
| 1507 NavigateToURL(shell(), url); |
| 1508 ExecuteJavascriptAndWaitForOk("srcObjectReassignSameObject()"); |
| 1509 } |
| 1510 |
1484 } // namespace content | 1511 } // namespace content |
OLD | NEW |