| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/files/file_util.h" | 6 #include "base/files/file_util.h" |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "base/threading/platform_thread.h" | 8 #include "base/threading/platform_thread.h" |
| 9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
| 10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 const char kUseLenientAudioChecking[] = "false"; | 26 const char kUseLenientAudioChecking[] = "false"; |
| 27 #endif | 27 #endif |
| 28 | 28 |
| 29 } // namespace | 29 } // namespace |
| 30 | 30 |
| 31 namespace content { | 31 namespace content { |
| 32 | 32 |
| 33 #if defined(OS_ANDROID) && defined(ADDRESS_SANITIZER) | 33 #if defined(OS_ANDROID) && defined(ADDRESS_SANITIZER) |
| 34 // Renderer crashes under Android ASAN: https://crbug.com/408496. | 34 // Renderer crashes under Android ASAN: https://crbug.com/408496. |
| 35 #define MAYBE_WebRtcBrowserTest DISABLED_WebRtcBrowserTest | 35 #define MAYBE_WebRtcBrowserTest DISABLED_WebRtcBrowserTest |
| 36 #elif defined(OS_WIN) | |
| 37 // Test is flaky on Win. http://crbug.com/470013. | |
| 38 #define MAYBE_WebRtcBrowserTest DISABLED_WebRtcBrowserTest | |
| 39 #else | 36 #else |
| 40 #define MAYBE_WebRtcBrowserTest WebRtcBrowserTest | 37 #define MAYBE_WebRtcBrowserTest WebRtcBrowserTest |
| 41 #endif | 38 #endif |
| 42 | 39 |
| 43 class MAYBE_WebRtcBrowserTest : public WebRtcContentBrowserTest { | 40 class MAYBE_WebRtcBrowserTest : public WebRtcContentBrowserTest { |
| 44 public: | 41 public: |
| 45 MAYBE_WebRtcBrowserTest() {} | 42 MAYBE_WebRtcBrowserTest() {} |
| 46 ~MAYBE_WebRtcBrowserTest() override {} | 43 ~MAYBE_WebRtcBrowserTest() override {} |
| 47 | 44 |
| 48 // Convenience function since most peerconnection-call.html tests just load | 45 // Convenience function since most peerconnection-call.html tests just load |
| 49 // the page, kick off some javascript and wait for the title to change to OK. | 46 // the page, kick off some javascript and wait for the title to change to OK. |
| 50 void MakeTypicalPeerConnectionCall(const std::string& javascript) { | 47 void MakeTypicalPeerConnectionCall(const std::string& javascript) { |
| 48 if (OnWinXp()) { |
| 49 // Test is flaky on Win XP. http://crbug.com/470013. |
| 50 return; |
| 51 } |
| 51 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 52 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 52 | 53 |
| 53 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); | 54 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); |
| 54 NavigateToURL(shell(), url); | 55 NavigateToURL(shell(), url); |
| 55 | 56 |
| 56 DisableOpusIfOnAndroid(); | 57 DisableOpusIfOnAndroid(); |
| 57 ExecuteJavascriptAndWaitForOk(javascript); | 58 ExecuteJavascriptAndWaitForOk(javascript); |
| 58 } | 59 } |
| 59 | 60 |
| 60 // Convenience method for making calls that detect if audio os playing (which | 61 // Convenience method for making calls that detect if audio os playing (which |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 | 443 |
| 443 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CallAndVerifyVideoMutingWorks) { | 444 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CallAndVerifyVideoMutingWorks) { |
| 444 MakeTypicalPeerConnectionCall("callAndEnsureVideoTrackMutingWorks();"); | 445 MakeTypicalPeerConnectionCall("callAndEnsureVideoTrackMutingWorks();"); |
| 445 } | 446 } |
| 446 | 447 |
| 447 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CreateOfferWithOfferOptions) { | 448 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CreateOfferWithOfferOptions) { |
| 448 MakeTypicalPeerConnectionCall("testCreateOfferOptions();"); | 449 MakeTypicalPeerConnectionCall("testCreateOfferOptions();"); |
| 449 } | 450 } |
| 450 | 451 |
| 451 } // namespace content | 452 } // namespace content |
| OLD | NEW |