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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 | 81 |
82 } | 82 } |
83 | 83 |
84 namespace content { | 84 namespace content { |
85 | 85 |
86 class WebrtcBrowserTest: public ContentBrowserTest { | 86 class WebrtcBrowserTest: public ContentBrowserTest { |
87 public: | 87 public: |
88 WebrtcBrowserTest() {} | 88 WebrtcBrowserTest() {} |
89 virtual ~WebrtcBrowserTest() {} | 89 virtual ~WebrtcBrowserTest() {} |
90 | 90 |
91 virtual void SetUp() OVERRIDE { | |
92 // These tests require pixel output. | |
93 UseRealGLContexts(); | |
danakj
2014/01/10 17:55:42
I removed this from this CL as it's not needed (ye
| |
94 ContentBrowserTest::SetUp(); | |
95 } | |
96 | |
91 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 97 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
92 // We need fake devices in this test since we want to run on naked VMs. We | 98 // 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. | 99 // assume these switches are set by default in content_browsertests. |
94 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( | 100 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( |
95 switches::kUseFakeDeviceForMediaStream)); | 101 switches::kUseFakeDeviceForMediaStream)); |
96 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( | 102 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( |
97 switches::kUseFakeUIForMediaStream)); | 103 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 } | 104 } |
103 | 105 |
104 void DumpChromeTraceCallback( | 106 void DumpChromeTraceCallback( |
105 const scoped_refptr<base::RefCountedString>& events, | 107 const scoped_refptr<base::RefCountedString>& events, |
106 bool has_more_events) { | 108 bool has_more_events) { |
107 // Convert the dump output into a correct JSON List. | 109 // Convert the dump output into a correct JSON List. |
108 std::string contents = "[" + events->data() + "]"; | 110 std::string contents = "[" + events->data() + "]"; |
109 | 111 |
110 int error_code; | 112 int error_code; |
111 std::string error_message; | 113 std::string error_message; |
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
796 EXPECT_TRUE(base::PathExists(dump_file)); | 798 EXPECT_TRUE(base::PathExists(dump_file)); |
797 int64 file_size = 0; | 799 int64 file_size = 0; |
798 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); | 800 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); |
799 EXPECT_EQ(0, file_size); | 801 EXPECT_EQ(0, file_size); |
800 | 802 |
801 base::DeleteFile(dump_file, false); | 803 base::DeleteFile(dump_file, false); |
802 } | 804 } |
803 | 805 |
804 | 806 |
805 } // namespace content | 807 } // namespace content |
OLD | NEW |