| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/process/launch.h" | 10 #include "base/process/launch.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } | 46 } |
| 47 | 47 |
| 48 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 48 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 49 // This test expects real device handling and requires a real webcam / audio | 49 // This test expects real device handling and requires a real webcam / audio |
| 50 // device; it will not work with fake devices. | 50 // device; it will not work with fake devices. |
| 51 EXPECT_FALSE(command_line->HasSwitch( | 51 EXPECT_FALSE(command_line->HasSwitch( |
| 52 switches::kUseFakeDeviceForMediaStream)); | 52 switches::kUseFakeDeviceForMediaStream)); |
| 53 EXPECT_FALSE(command_line->HasSwitch( | 53 EXPECT_FALSE(command_line->HasSwitch( |
| 54 switches::kUseFakeUIForMediaStream)); | 54 switches::kUseFakeUIForMediaStream)); |
| 55 | 55 |
| 56 // The video playback will not work without a GPU, so force its use here. | |
| 57 command_line->AppendSwitch(switches::kUseGpuInTests); | |
| 58 | |
| 59 // Flag used by TestWebAudioMediaStream to force garbage collection. | 56 // Flag used by TestWebAudioMediaStream to force garbage collection. |
| 60 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc"); | 57 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc"); |
| 61 } | 58 } |
| 62 | 59 |
| 63 void EstablishCall(content::WebContents* from_tab, | 60 void EstablishCall(content::WebContents* from_tab, |
| 64 content::WebContents* to_tab) { | 61 content::WebContents* to_tab) { |
| 65 ConnectToPeerConnectionServer("peer 1", from_tab); | 62 ConnectToPeerConnectionServer("peer 1", from_tab); |
| 66 ConnectToPeerConnectionServer("peer 2", to_tab); | 63 ConnectToPeerConnectionServer("peer 2", to_tab); |
| 67 | 64 |
| 68 EXPECT_EQ("ok-peerconnection-created", | 65 EXPECT_EQ("ok-peerconnection-created", |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 279 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 283 GURL url(embedded_test_server()->GetURL("/webrtc/webaudio_crash.html")); | 280 GURL url(embedded_test_server()->GetURL("/webrtc/webaudio_crash.html")); |
| 284 ui_test_utils::NavigateToURL(browser(), url); | 281 ui_test_utils::NavigateToURL(browser(), url); |
| 285 content::WebContents* tab = | 282 content::WebContents* tab = |
| 286 browser()->tab_strip_model()->GetActiveWebContents(); | 283 browser()->tab_strip_model()->GetActiveWebContents(); |
| 287 // A sleep is necessary to be able to detect the crash. | 284 // A sleep is necessary to be able to detect the crash. |
| 288 SleepInJavascript(tab, 1000); | 285 SleepInJavascript(tab, 1000); |
| 289 | 286 |
| 290 ASSERT_FALSE(tab->IsCrashed()); | 287 ASSERT_FALSE(tab->IsCrashed()); |
| 291 } | 288 } |
| OLD | NEW |