| OLD | NEW |
| 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 for (std::vector<Browser*>::const_iterator iter = BrowserList::begin(); | 347 for (std::vector<Browser*>::const_iterator iter = BrowserList::begin(); |
| 348 iter != BrowserList::end(); | 348 iter != BrowserList::end(); |
| 349 ++iter) { | 349 ++iter) { |
| 350 initial_browsers.insert(*iter); | 350 initial_browsers.insert(*iter); |
| 351 } | 351 } |
| 352 | 352 |
| 353 WindowedNotificationObserver tab_added_observer( | 353 WindowedNotificationObserver tab_added_observer( |
| 354 content::NOTIFICATION_TAB_ADDED, | 354 content::NOTIFICATION_TAB_ADDED, |
| 355 NotificationService::AllSources()); | 355 NotificationService::AllSources()); |
| 356 | 356 |
| 357 browser->OpenURL(url, GURL(), disposition, PageTransition::TYPED); | 357 browser->OpenURL(url, GURL(), disposition, content::PAGE_TRANSITION_TYPED); |
| 358 if (browser_test_flags & BROWSER_TEST_WAIT_FOR_BROWSER) | 358 if (browser_test_flags & BROWSER_TEST_WAIT_FOR_BROWSER) |
| 359 browser = WaitForBrowserNotInSet(initial_browsers); | 359 browser = WaitForBrowserNotInSet(initial_browsers); |
| 360 if (browser_test_flags & BROWSER_TEST_WAIT_FOR_TAB) | 360 if (browser_test_flags & BROWSER_TEST_WAIT_FOR_TAB) |
| 361 tab_added_observer.Wait(); | 361 tab_added_observer.Wait(); |
| 362 if (!(browser_test_flags & BROWSER_TEST_WAIT_FOR_NAVIGATION)) { | 362 if (!(browser_test_flags & BROWSER_TEST_WAIT_FOR_NAVIGATION)) { |
| 363 // Some other flag caused the wait prior to this. | 363 // Some other flag caused the wait prior to this. |
| 364 return; | 364 return; |
| 365 } | 365 } |
| 366 TabContents* tab_contents = NULL; | 366 TabContents* tab_contents = NULL; |
| 367 if (disposition == NEW_BACKGROUND_TAB) { | 367 if (disposition == NEW_BACKGROUND_TAB) { |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |