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

Side by Side Diff: chrome/test/base/ui_test_utils.cc

Issue 8212006: base::Bind: Cleanup in automation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fixes 1. Created 9 years, 2 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
OLDNEW
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 "chrome/test/base/ui_test_utils.h" 5 #include "chrome/test/base/ui_test_utils.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 bool control, 597 bool control,
598 bool shift, 598 bool shift,
599 bool alt, 599 bool alt,
600 bool command) { 600 bool command) {
601 gfx::NativeWindow window = NULL; 601 gfx::NativeWindow window = NULL;
602 if (!GetNativeWindow(browser, &window)) 602 if (!GetNativeWindow(browser, &window))
603 return false; 603 return false;
604 604
605 if (!ui_controls::SendKeyPressNotifyWhenDone( 605 if (!ui_controls::SendKeyPressNotifyWhenDone(
606 window, key, control, shift, alt, command, 606 window, key, control, shift, alt, command,
607 new MessageLoop::QuitTask())) { 607 base::Closure())) {
608 LOG(ERROR) << "ui_controls::SendKeyPressNotifyWhenDone failed"; 608 LOG(ERROR) << "ui_controls::SendKeyPressNotifyWhenDone failed";
609 return false; 609 return false;
610 } 610 }
611 // Run the message loop. It'll stop running when either the key was received 611 // Run the message loop. It'll stop running when either the key was received
612 // or the test timed out (in which case testing::Test::HasFatalFailure should 612 // or the test timed out (in which case testing::Test::HasFatalFailure should
613 // be set). 613 // be set).
614 RunMessageLoop(); 614 RunMessageLoop();
615 return !testing::Test::HasFatalFailure(); 615 return !testing::Test::HasFatalFailure();
616 } 616 }
617 617
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 return taker.TakeRenderWidgetSnapshot(rwh, page_size, page_size, bitmap); 987 return taker.TakeRenderWidgetSnapshot(rwh, page_size, page_size, bitmap);
988 } 988 }
989 989
990 bool TakeEntirePageSnapshot(RenderViewHost* rvh, SkBitmap* bitmap) { 990 bool TakeEntirePageSnapshot(RenderViewHost* rvh, SkBitmap* bitmap) {
991 DCHECK(bitmap); 991 DCHECK(bitmap);
992 SnapshotTaker taker; 992 SnapshotTaker taker;
993 return taker.TakeEntirePageSnapshot(rvh, bitmap); 993 return taker.TakeEntirePageSnapshot(rvh, bitmap);
994 } 994 }
995 995
996 } // namespace ui_test_utils 996 } // namespace ui_test_utils
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698