| 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/debug/trace_event_impl.h" | 6 #include "base/debug/trace_event_impl.h" |
| 7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 WebrtcBrowserTest() {} | 88 WebrtcBrowserTest() {} |
| 89 virtual ~WebrtcBrowserTest() {} | 89 virtual ~WebrtcBrowserTest() {} |
| 90 | 90 |
| 91 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 91 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 92 // We need fake devices in this test since we want to run on naked VMs. We | 92 // We need fake devices in this test since we want to run on naked VMs. We |
| 93 // assume these switches are set by default in content_browsertests. | 93 // assume these switches are set by default in content_browsertests. |
| 94 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( | 94 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( |
| 95 switches::kUseFakeDeviceForMediaStream)); | 95 switches::kUseFakeDeviceForMediaStream)); |
| 96 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( | 96 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( |
| 97 switches::kUseFakeUIForMediaStream)); | 97 switches::kUseFakeUIForMediaStream)); |
| 98 | |
| 99 // The video playback will not work without a GPU, so force its use here. | |
| 100 // This may not be available on all VMs though. | |
| 101 command_line->AppendSwitch(switches::kUseGpuInTests); | |
| 102 } | 98 } |
| 103 | 99 |
| 104 void DumpChromeTraceCallback( | 100 void DumpChromeTraceCallback( |
| 105 const scoped_refptr<base::RefCountedString>& events, | 101 const scoped_refptr<base::RefCountedString>& events, |
| 106 bool has_more_events) { | 102 bool has_more_events) { |
| 107 // Convert the dump output into a correct JSON List. | 103 // Convert the dump output into a correct JSON List. |
| 108 std::string contents = "[" + events->data() + "]"; | 104 std::string contents = "[" + events->data() + "]"; |
| 109 | 105 |
| 110 int error_code; | 106 int error_code; |
| 111 std::string error_message; | 107 std::string error_message; |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 EXPECT_TRUE(base::PathExists(dump_file)); | 792 EXPECT_TRUE(base::PathExists(dump_file)); |
| 797 int64 file_size = 0; | 793 int64 file_size = 0; |
| 798 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); | 794 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); |
| 799 EXPECT_EQ(0, file_size); | 795 EXPECT_EQ(0, file_size); |
| 800 | 796 |
| 801 base::DeleteFile(dump_file, false); | 797 base::DeleteFile(dump_file, false); |
| 802 } | 798 } |
| 803 | 799 |
| 804 | 800 |
| 805 } // namespace content | 801 } // namespace content |
| OLD | NEW |