| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "app/app_switches.h" | 8 #include "app/app_switches.h" |
| 9 #include "app/gfx/gl/gl_implementation.h" | 9 #include "app/gfx/gl/gl_implementation.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 #if defined(OS_WIN) | 149 #if defined(OS_WIN) |
| 150 const char* os_label = "win"; | 150 const char* os_label = "win"; |
| 151 #elif defined(OS_MACOSX) | 151 #elif defined(OS_MACOSX) |
| 152 const char* os_label = "mac"; | 152 const char* os_label = "mac"; |
| 153 #elif defined(OS_LINUX) | 153 #elif defined(OS_LINUX) |
| 154 const char* os_label = "linux"; | 154 const char* os_label = "linux"; |
| 155 #else | 155 #else |
| 156 #error "Not implemented for this platform" | 156 #error "Not implemented for this platform" |
| 157 #endif | 157 #endif |
| 158 if (using_gpu_) { | 158 if (using_gpu_) { |
| 159 const GPUInfo& info = GpuProcessHostUIShim::Get()->gpu_info(); | 159 const GPUInfo& info = GpuProcessHostUIShim::GetInstance()->gpu_info(); |
| 160 if (info.progress() != GPUInfo::kComplete) { | 160 if (info.progress() != GPUInfo::kComplete) { |
| 161 LOG(ERROR) << "Could not get gpu info"; | 161 LOG(ERROR) << "Could not get gpu info"; |
| 162 return false; | 162 return false; |
| 163 } | 163 } |
| 164 img_name = StringPrintf("%s_%s_%x-%x.png", | 164 img_name = StringPrintf("%s_%s_%x-%x.png", |
| 165 img_name.c_str(), os_label, info.vendor_id(), info.device_id()); | 165 img_name.c_str(), os_label, info.vendor_id(), info.device_id()); |
| 166 } else { | 166 } else { |
| 167 img_name = StringPrintf("%s_%s_mesa.png", img_name.c_str(), os_label); | 167 img_name = StringPrintf("%s_%s_mesa.png", img_name.c_str(), os_label); |
| 168 } | 168 } |
| 169 | 169 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 ASSERT_TRUE(message_queue.WaitForMessage(NULL)); | 266 ASSERT_TRUE(message_queue.WaitForMessage(NULL)); |
| 267 | 267 |
| 268 SkBitmap bitmap; | 268 SkBitmap bitmap; |
| 269 gfx::Size container_size(500, 500); | 269 gfx::Size container_size(500, 500); |
| 270 ResizeTabContainer(browser(), container_size); | 270 ResizeTabContainer(browser(), container_size); |
| 271 ASSERT_TRUE(ui_test_utils::TakeRenderWidgetSnapshot( | 271 ASSERT_TRUE(ui_test_utils::TakeRenderWidgetSnapshot( |
| 272 browser()->GetSelectedTabContents()->render_view_host(), | 272 browser()->GetSelectedTabContents()->render_view_host(), |
| 273 container_size, &bitmap)); | 273 container_size, &bitmap)); |
| 274 ASSERT_TRUE(CompareImages(bitmap, "")); | 274 ASSERT_TRUE(CompareImages(bitmap, "")); |
| 275 } | 275 } |
| OLD | NEW |