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

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

Issue 7489019: Fix up various browser tests not to use WaitForNavigation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix nits Created 9 years, 4 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 | « chrome/test/base/ui_test_utils.h ('k') | 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) 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/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 #if defined(TOOLKIT_VIEWS) 51 #if defined(TOOLKIT_VIEWS)
52 #include "views/focus/accelerator_handler.h" 52 #include "views/focus/accelerator_handler.h"
53 #endif 53 #endif
54 54
55 namespace ui_test_utils { 55 namespace ui_test_utils {
56 56
57 namespace { 57 namespace {
58 58
59 // Used to block until a navigation completes. 59 // Used to block until a navigation completes.
60 // TODO(gbillock): this should be merged with TestNavigationObserver
60 class NavigationNotificationObserver : public NotificationObserver { 61 class NavigationNotificationObserver : public NotificationObserver {
61 public: 62 public:
62 NavigationNotificationObserver(const NotificationSource& source, 63 NavigationNotificationObserver(const NotificationSource& source,
63 int number_of_navigations) 64 int number_of_navigations)
64 : navigation_started_(false), 65 : navigation_started_(false),
65 navigations_completed_(0), 66 navigations_completed_(0),
66 number_of_navigations_(number_of_navigations), 67 number_of_navigations_(number_of_navigations),
67 running_(false), 68 running_(false),
68 done_(false) { 69 done_(false) {
69 registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, source); 70 registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, source);
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 return taker.TakeRenderWidgetSnapshot(rwh, page_size, page_size, bitmap); 1052 return taker.TakeRenderWidgetSnapshot(rwh, page_size, page_size, bitmap);
1052 } 1053 }
1053 1054
1054 bool TakeEntirePageSnapshot(RenderViewHost* rvh, SkBitmap* bitmap) { 1055 bool TakeEntirePageSnapshot(RenderViewHost* rvh, SkBitmap* bitmap) {
1055 DCHECK(bitmap); 1056 DCHECK(bitmap);
1056 SnapshotTaker taker; 1057 SnapshotTaker taker;
1057 return taker.TakeEntirePageSnapshot(rvh, bitmap); 1058 return taker.TakeEntirePageSnapshot(rvh, bitmap);
1058 } 1059 }
1059 1060
1060 } // namespace ui_test_utils 1061 } // namespace ui_test_utils
OLDNEW
« no previous file with comments | « chrome/test/base/ui_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698