| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 FilePath reference_img_dir_; | 267 FilePath reference_img_dir_; |
| 268 FilePath generated_img_dir_; | 268 FilePath generated_img_dir_; |
| 269 // The name of the test, with any special prefixes dropped. | 269 // The name of the test, with any special prefixes dropped. |
| 270 std::string test_name_; | 270 std::string test_name_; |
| 271 // Whether the gpu, or OSMesa is being used for rendering. | 271 // Whether the gpu, or OSMesa is being used for rendering. |
| 272 bool using_gpu_; | 272 bool using_gpu_; |
| 273 | 273 |
| 274 DISALLOW_COPY_AND_ASSIGN(GpuPixelBrowserTest); | 274 DISALLOW_COPY_AND_ASSIGN(GpuPixelBrowserTest); |
| 275 }; | 275 }; |
| 276 | 276 |
| 277 // Currently fails on linux due to a NOTIMPLEMENTED() statement. | 277 // Currently fails (and times out) on linux due to a NOTIMPLEMENTED() statement. |
| 278 // (http://crbug.com/89964) | 278 // (http://crbug.com/89964) |
| 279 #if defined(OS_LINUX) | 279 #if defined(OS_LINUX) |
| 280 #define MAYBE_WebGLTeapot FAILS_WebGLTeapot | 280 #define MAYBE_WebGLTeapot DISABLED_WebGLTeapot |
| 281 #else | 281 #else |
| 282 #define MAYBE_WebGLTeapot WebGLTeapot | 282 #define MAYBE_WebGLTeapot WebGLTeapot |
| 283 #endif | 283 #endif |
| 284 | 284 |
| 285 IN_PROC_BROWSER_TEST_F(GpuPixelBrowserTest, MAYBE_WebGLTeapot) { | 285 IN_PROC_BROWSER_TEST_F(GpuPixelBrowserTest, MAYBE_WebGLTeapot) { |
| 286 ui_test_utils::DOMMessageQueue message_queue; | 286 ui_test_utils::DOMMessageQueue message_queue; |
| 287 ui_test_utils::NavigateToURL( | 287 ui_test_utils::NavigateToURL( |
| 288 browser(), | 288 browser(), |
| 289 net::FilePathToFileURL(test_data_dir_.AppendASCII("webgl_teapot"). | 289 net::FilePathToFileURL(test_data_dir_.AppendASCII("webgl_teapot"). |
| 290 AppendASCII("teapot.html"))); | 290 AppendASCII("teapot.html"))); |
| 291 | 291 |
| 292 // Wait for message from teapot page indicating the GL calls have been issued. | 292 // Wait for message from teapot page indicating the GL calls have been issued. |
| 293 ASSERT_TRUE(message_queue.WaitForMessage(NULL)); | 293 ASSERT_TRUE(message_queue.WaitForMessage(NULL)); |
| 294 | 294 |
| 295 SkBitmap bitmap; | 295 SkBitmap bitmap; |
| 296 gfx::Size container_size(500, 500); | 296 gfx::Size container_size(500, 500); |
| 297 ResizeTabContainer(browser(), container_size); | 297 ResizeTabContainer(browser(), container_size); |
| 298 ASSERT_TRUE(ui_test_utils::TakeRenderWidgetSnapshot( | 298 ASSERT_TRUE(ui_test_utils::TakeRenderWidgetSnapshot( |
| 299 browser()->GetSelectedTabContents()->render_view_host(), | 299 browser()->GetSelectedTabContents()->render_view_host(), |
| 300 container_size, &bitmap)); | 300 container_size, &bitmap)); |
| 301 ASSERT_TRUE(CompareImages(bitmap, "")); | 301 ASSERT_TRUE(CompareImages(bitmap, "")); |
| 302 } | 302 } |
| OLD | NEW |