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 |
56 // Flag used by TestWebAudioMediaStream to force garbage collection. | 59 // Flag used by TestWebAudioMediaStream to force garbage collection. |
57 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc"); | 60 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc"); |
58 } | 61 } |
59 | 62 |
60 void EstablishCall(content::WebContents* from_tab, | 63 void EstablishCall(content::WebContents* from_tab, |
61 content::WebContents* to_tab) { | 64 content::WebContents* to_tab) { |
62 ConnectToPeerConnectionServer("peer 1", from_tab); | 65 ConnectToPeerConnectionServer("peer 1", from_tab); |
63 ConnectToPeerConnectionServer("peer 2", to_tab); | 66 ConnectToPeerConnectionServer("peer 2", to_tab); |
64 | 67 |
65 EXPECT_EQ("ok-peerconnection-created", | 68 EXPECT_EQ("ok-peerconnection-created", |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 282 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
280 GURL url(embedded_test_server()->GetURL("/webrtc/webaudio_crash.html")); | 283 GURL url(embedded_test_server()->GetURL("/webrtc/webaudio_crash.html")); |
281 ui_test_utils::NavigateToURL(browser(), url); | 284 ui_test_utils::NavigateToURL(browser(), url); |
282 content::WebContents* tab = | 285 content::WebContents* tab = |
283 browser()->tab_strip_model()->GetActiveWebContents(); | 286 browser()->tab_strip_model()->GetActiveWebContents(); |
284 // A sleep is necessary to be able to detect the crash. | 287 // A sleep is necessary to be able to detect the crash. |
285 SleepInJavascript(tab, 1000); | 288 SleepInJavascript(tab, 1000); |
286 | 289 |
287 ASSERT_FALSE(tab->IsCrashed()); | 290 ASSERT_FALSE(tab->IsCrashed()); |
288 } | 291 } |
OLD | NEW |