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. |
| 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_path.h" | 6 #include "base/file_path.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 305 #endif | 305 #endif |
| 306 | 306 |
| 307 IN_PROC_BROWSER_TEST_F(GpuPixelBrowserTest, MAYBE_WebGLTeapot) { | 307 IN_PROC_BROWSER_TEST_F(GpuPixelBrowserTest, MAYBE_WebGLTeapot) { |
| 308 // If test baseline needs to be updated after a given revision, update the | 308 // If test baseline needs to be updated after a given revision, update the |
| 309 // revision number in SetRefImageNoOlderThan(#revision). | 309 // revision number in SetRefImageNoOlderThan(#revision). |
| 310 SetRefImageRevisionNoOlderThan(116356); | 310 SetRefImageRevisionNoOlderThan(116356); |
| 311 | 311 |
| 312 gfx::Size container_size(500, 500); | 312 gfx::Size container_size(500, 500); |
| 313 ResizeTabContainer(browser(), container_size); | 313 ResizeTabContainer(browser(), container_size); |
| 314 | 314 |
| 315 browser()->window()->Activate(); | |
|
sky
2012/01/11 22:29:25
Use ui_test_utils::SHowAndFocusNativeWindow and AS
| |
| 316 | |
| 315 ui_test_utils::DOMMessageQueue message_queue; | 317 ui_test_utils::DOMMessageQueue message_queue; |
| 316 ui_test_utils::NavigateToURL( | 318 ui_test_utils::NavigateToURL( |
| 317 browser(), | 319 browser(), |
| 318 net::FilePathToFileURL(test_data_dir_.AppendASCII("webgl_teapot"). | 320 net::FilePathToFileURL(test_data_dir_.AppendASCII("webgl_teapot"). |
| 319 AppendASCII("teapot.html"))); | 321 AppendASCII("teapot.html"))); |
| 320 | 322 |
| 321 // Wait for message from teapot page indicating the GL calls have been issued. | 323 // Wait for message from teapot page indicating the GL calls have been issued. |
| 322 ASSERT_TRUE(message_queue.WaitForMessage(NULL)); | 324 ASSERT_TRUE(message_queue.WaitForMessage(NULL)); |
| 323 | 325 |
| 324 std::vector<unsigned char> screenshot_png; | 326 std::vector<unsigned char> screenshot_png; |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 339 | 341 |
| 340 SkBitmap bitmap; | 342 SkBitmap bitmap; |
| 341 success = gfx::PNGCodec::Decode( | 343 success = gfx::PNGCodec::Decode( |
| 342 reinterpret_cast<unsigned char*>(&*screenshot_png.begin()), | 344 reinterpret_cast<unsigned char*>(&*screenshot_png.begin()), |
| 343 screenshot_png.size(), | 345 screenshot_png.size(), |
| 344 &bitmap); | 346 &bitmap); |
| 345 | 347 |
| 346 ASSERT_TRUE(success); | 348 ASSERT_TRUE(success); |
| 347 ASSERT_TRUE(CompareImages(bitmap)); | 349 ASSERT_TRUE(CompareImages(bitmap)); |
| 348 } | 350 } |
| OLD | NEW |