| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 50 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
| 51 test::PeerConnectionServerRunner::KillAllPeerConnectionServers(); | 51 test::PeerConnectionServerRunner::KillAllPeerConnectionServers(); |
| 52 DetectErrorsInJavaScript(); // Look for errors in our rather complex js. | 52 DetectErrorsInJavaScript(); // Look for errors in our rather complex js. |
| 53 } | 53 } |
| 54 | 54 |
| 55 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 55 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 56 // Ensure the infobar is enabled, since we expect that in this test. | 56 // Ensure the infobar is enabled, since we expect that in this test. |
| 57 EXPECT_FALSE(command_line->HasSwitch(switches::kUseFakeUIForMediaStream)); | 57 EXPECT_FALSE(command_line->HasSwitch(switches::kUseFakeUIForMediaStream)); |
| 58 | 58 |
| 59 // Play a suitable, somewhat realistic video file. | 59 // Play a suitable, somewhat realistic video file. |
| 60 base::FilePath input_video = test::GetReferenceVideosDir() | 60 base::FilePath input_video = test::GetReferenceFilesDir() |
| 61 .Append(test::kReferenceFileName360p) | 61 .Append(test::kReferenceFileName360p) |
| 62 .AddExtension(test::kY4mFileExtension); | 62 .AddExtension(test::kY4mFileExtension); |
| 63 command_line->AppendSwitchPath(switches::kUseFileForFakeVideoCapture, | 63 command_line->AppendSwitchPath(switches::kUseFileForFakeVideoCapture, |
| 64 input_video); | 64 input_video); |
| 65 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); | 65 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); |
| 66 | 66 |
| 67 // Flag used by TestWebAudioMediaStream to force garbage collection. | 67 // Flag used by TestWebAudioMediaStream to force garbage collection. |
| 68 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc"); | 68 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc"); |
| 69 | 69 |
| 70 bool enable_audio_track_processing = GetParam(); | 70 bool enable_audio_track_processing = GetParam(); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 GURL url(embedded_test_server()->GetURL("/webrtc/webaudio_crash.html")); | 281 GURL url(embedded_test_server()->GetURL("/webrtc/webaudio_crash.html")); |
| 282 ui_test_utils::NavigateToURL(browser(), url); | 282 ui_test_utils::NavigateToURL(browser(), url); |
| 283 content::WebContents* tab = | 283 content::WebContents* tab = |
| 284 browser()->tab_strip_model()->GetActiveWebContents(); | 284 browser()->tab_strip_model()->GetActiveWebContents(); |
| 285 | 285 |
| 286 // A sleep is necessary to be able to detect the crash. | 286 // A sleep is necessary to be able to detect the crash. |
| 287 test::SleepInJavascript(tab, 1000); | 287 test::SleepInJavascript(tab, 1000); |
| 288 | 288 |
| 289 ASSERT_FALSE(tab->IsCrashed()); | 289 ASSERT_FALSE(tab->IsCrashed()); |
| 290 } | 290 } |
| OLD | NEW |