Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
jam
2012/09/19 20:09:57
why is this file not in content now?
Zhenyao Mo
2012/09/19 22:46:19
It's in progress. See http://code.google.com/p/chr
jam
2012/09/20 01:09:09
that test should move with this, now that the data
| |
| 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/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "base/test/trace_event_analyzer.h" | 10 #include "base/test/trace_event_analyzer.h" |
| 11 #include "base/version.h" | 11 #include "base/version.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 } else { | 63 } else { |
| 64 gpu_enabled_ = true; | 64 gpu_enabled_ = true; |
| 65 } | 65 } |
| 66 command_line->AppendSwitch(switches::kDisablePopupBlocking); | 66 command_line->AppendSwitch(switches::kDisablePopupBlocking); |
| 67 ui::DisableTestCompositor(); | 67 ui::DisableTestCompositor(); |
| 68 command_line->AppendSwitchASCII(switches::kWindowSize, "400,300"); | 68 command_line->AppendSwitchASCII(switches::kWindowSize, "400,300"); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void SetupBlacklist(const std::string& json_blacklist) { | 71 void SetupBlacklist(const std::string& json_blacklist) { |
| 72 content::GPUInfo gpu_info; | 72 content::GPUInfo gpu_info; |
| 73 GpuDataManager::GetInstance()->Initialize( | 73 GpuDataManager::GetInstance()->Initialize(json_blacklist, gpu_info); |
| 74 "0", json_blacklist, gpu_info); | |
| 75 } | 74 } |
| 76 | 75 |
| 77 // If expected_reply is NULL, we don't check the reply content. | 76 // If expected_reply is NULL, we don't check the reply content. |
| 78 void RunTest(const FilePath& url, | 77 void RunTest(const FilePath& url, |
| 79 const char* expected_reply, | 78 const char* expected_reply, |
| 80 bool new_tab) { | 79 bool new_tab) { |
| 81 #if defined(OS_LINUX) && !defined(NDEBUG) | 80 #if defined(OS_LINUX) && !defined(NDEBUG) |
| 82 // Bypass tests on GPU Linux Debug bots. | 81 // Bypass tests on GPU Linux Debug bots. |
| 83 if (gpu_enabled_) | 82 if (gpu_enabled_) |
| 84 return; | 83 return; |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 505 base::StringPrintf( | 504 base::StringPrintf( |
| 506 "%d (resize offset %d): IOSurface width %d -> %d; Creates %d " | 505 "%d (resize offset %d): IOSurface width %d -> %d; Creates %d " |
| 507 "Expected %d", offset_i, offsets[offset_i], | 506 "Expected %d", offset_i, offsets[offset_i], |
| 508 old_width, new_width, num_creates, expected_creates); | 507 old_width, new_width, num_creates, expected_creates); |
| 509 } | 508 } |
| 510 } | 509 } |
| 511 } | 510 } |
| 512 #endif | 511 #endif |
| 513 | 512 |
| 514 } // namespace anonymous | 513 } // namespace anonymous |
| OLD | NEW |