| 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, | |
| 87 base::debug::TraceLog::RECORD_UNTIL_FULL); | 86 base::debug::TraceLog::RECORD_UNTIL_FULL); |
| 88 } | 87 } |
| 89 | 88 |
| 90 static void TraceDataCB( | 89 static void TraceDataCB( |
| 91 const base::Callback<void()>& callback, | 90 const base::Callback<void()>& callback, |
| 92 std::string* output, | 91 std::string* output, |
| 93 const scoped_refptr<base::RefCountedString>& json_events_str, | 92 const scoped_refptr<base::RefCountedString>& json_events_str, |
| 94 bool has_more_events) { | 93 bool has_more_events) { |
| 95 if (output->size() > 1) { | 94 if (output->size() > 1) { |
| 96 output->append(","); | 95 output->append(","); |
| (...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1385 #if defined(TOOLKIT_GTK) | 1384 #if defined(TOOLKIT_GTK) |
| 1386 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); | 1385 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); |
| 1387 #endif | 1386 #endif |
| 1388 gfx::GLSurface::InitializeOneOff(); | 1387 gfx::GLSurface::InitializeOneOff(); |
| 1389 gpu::ApplyGpuDriverBugWorkarounds(CommandLine::ForCurrentProcess()); | 1388 gpu::ApplyGpuDriverBugWorkarounds(CommandLine::ForCurrentProcess()); |
| 1390 | 1389 |
| 1391 content::UnitTestTestSuite runner(suite); | 1390 content::UnitTestTestSuite runner(suite); |
| 1392 base::MessageLoop message_loop; | 1391 base::MessageLoop message_loop; |
| 1393 return runner.Run(); | 1392 return runner.Run(); |
| 1394 } | 1393 } |
| OLD | NEW |