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 <stdio.h> | 5 #include <stdio.h> |
6 #include <cmath> | 6 #include <cmath> |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include <GLES2/gl2.h> | 10 #include <GLES2/gl2.h> |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 virtual void TearDown() { | 77 virtual void TearDown() { |
78 helper_scaling_.reset(NULL); | 78 helper_scaling_.reset(NULL); |
79 helper_.reset(NULL); | 79 helper_.reset(NULL); |
80 context_.reset(NULL); | 80 context_.reset(NULL); |
81 } | 81 } |
82 | 82 |
83 void StartTracing(const std::string& filter) { | 83 void StartTracing(const std::string& filter) { |
84 base::debug::TraceLog::GetInstance()->SetEnabled( | 84 base::debug::TraceLog::GetInstance()->SetEnabled( |
85 base::debug::CategoryFilter(filter), | 85 base::debug::CategoryFilter(filter), |
| 86 base::debug::TraceLog::RECORDING_MODE, |
86 base::debug::TraceLog::RECORD_UNTIL_FULL); | 87 base::debug::TraceLog::RECORD_UNTIL_FULL); |
87 } | 88 } |
88 | 89 |
89 static void TraceDataCB( | 90 static void TraceDataCB( |
90 const base::Callback<void()>& callback, | 91 const base::Callback<void()>& callback, |
91 std::string* output, | 92 std::string* output, |
92 const scoped_refptr<base::RefCountedString>& json_events_str, | 93 const scoped_refptr<base::RefCountedString>& json_events_str, |
93 bool has_more_events) { | 94 bool has_more_events) { |
94 if (output->size() > 1) { | 95 if (output->size() > 1) { |
95 output->append(","); | 96 output->append(","); |
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1384 #if defined(TOOLKIT_GTK) | 1385 #if defined(TOOLKIT_GTK) |
1385 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); | 1386 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); |
1386 #endif | 1387 #endif |
1387 gfx::GLSurface::InitializeOneOff(); | 1388 gfx::GLSurface::InitializeOneOff(); |
1388 gpu::ApplyGpuDriverBugWorkarounds(CommandLine::ForCurrentProcess()); | 1389 gpu::ApplyGpuDriverBugWorkarounds(CommandLine::ForCurrentProcess()); |
1389 | 1390 |
1390 content::UnitTestTestSuite runner(suite); | 1391 content::UnitTestTestSuite runner(suite); |
1391 base::MessageLoop message_loop; | 1392 base::MessageLoop message_loop; |
1392 return runner.Run(); | 1393 return runner.Run(); |
1393 } | 1394 } |
OLD | NEW |