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

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

Issue 11414223: Move the test functions that deal with focus to interactive_ui_tets_utils.h and into the interactiv… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years 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
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 size_t ref_pixel_count) { 160 size_t ref_pixel_count) {
161 if (ref_img_option_ == kReferenceImageLocal) { 161 if (ref_img_option_ == kReferenceImageLocal) {
162 ref_img_revision_no_older_than_ = ref_img_update_revision; 162 ref_img_revision_no_older_than_ = ref_img_update_revision;
163 ObtainLocalRefImageRevision(); 163 ObtainLocalRefImageRevision();
164 } 164 }
165 165
166 #if defined(OS_WIN) 166 #if defined(OS_WIN)
167 ASSERT_TRUE(tracing::BeginTracing("-test_*")); 167 ASSERT_TRUE(tracing::BeginTracing("-test_*"));
168 #endif 168 #endif
169 169
170 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); 170 browser()->window()->Activate();
jam 2012/11/29 07:06:43 this was how it was originally written in the code
171 171
172 content::DOMMessageQueue message_queue; 172 content::DOMMessageQueue message_queue;
173 ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL(url)); 173 ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL(url));
174 174
175 // Wait for notification that page is loaded. 175 // Wait for notification that page is loaded.
176 ASSERT_TRUE(message_queue.WaitForMessage(NULL)); 176 ASSERT_TRUE(message_queue.WaitForMessage(NULL));
177 message_queue.ClearQueue(); 177 message_queue.ClearQueue();
178 178
179 gfx::Rect new_bounds = GetNewTabContainerBounds(tab_container_size); 179 gfx::Rect new_bounds = GetNewTabContainerBounds(tab_container_size);
180 180
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 {160, 100, 0, 0, 0} 591 {160, 100, 0, 0, 0}
592 }; 592 };
593 const size_t ref_pixel_count = sizeof(ref_pixels) / sizeof(ReferencePixel); 593 const size_t ref_pixel_count = sizeof(ref_pixels) / sizeof(ReferencePixel);
594 594
595 gfx::Size container_size(400, 300); 595 gfx::Size container_size(400, 300);
596 FilePath url = 596 FilePath url =
597 test_data_dir().AppendASCII("pixel_canvas2d.html"); 597 test_data_dir().AppendASCII("pixel_canvas2d.html");
598 RunPixelTest(container_size, url, ref_img_revision_update, 598 RunPixelTest(container_size, url, ref_img_revision_update,
599 ref_pixels, ref_pixel_count); 599 ref_pixels, ref_pixel_count);
600 } 600 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698