Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: chrome/test/gpu/gpu_pixel_browsertest.cc

Issue 9107014: Makes window focused for gpu pixel test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698