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

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

Issue 9416031: Prerendered pages are swapped in at browser::Navigate time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Limit to origin process Created 8 years, 9 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) 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 "chrome/test/base/ui_test_utils.h" 5 #include "chrome/test/base/ui_test_utils.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 for (std::vector<Browser*>::const_iterator iter = BrowserList::begin(); 417 for (std::vector<Browser*>::const_iterator iter = BrowserList::begin();
418 iter != BrowserList::end(); 418 iter != BrowserList::end();
419 ++iter) { 419 ++iter) {
420 initial_browsers.insert(*iter); 420 initial_browsers.insert(*iter);
421 } 421 }
422 422
423 WindowedNotificationObserver tab_added_observer( 423 WindowedNotificationObserver tab_added_observer(
424 content::NOTIFICATION_TAB_ADDED, 424 content::NOTIFICATION_TAB_ADDED,
425 content::NotificationService::AllSources()); 425 content::NotificationService::AllSources());
426 426
427 browser->OpenURL(OpenURLParams( 427 browser->OpenURLFromTab(browser->GetSelectedWebContents(), OpenURLParams(
dominich 2012/02/29 18:32:01 It's unclear how this change is related to the pre
cbentzel 2012/02/29 19:22:36 Ah - another great catch. This was related to the
428 url, Referrer(), disposition, content::PAGE_TRANSITION_TYPED, false)); 428 url, Referrer(), disposition, content::PAGE_TRANSITION_TYPED, false));
429 if (browser_test_flags & BROWSER_TEST_WAIT_FOR_BROWSER) 429 if (browser_test_flags & BROWSER_TEST_WAIT_FOR_BROWSER)
430 browser = WaitForBrowserNotInSet(initial_browsers); 430 browser = WaitForBrowserNotInSet(initial_browsers);
431 if (browser_test_flags & BROWSER_TEST_WAIT_FOR_TAB) 431 if (browser_test_flags & BROWSER_TEST_WAIT_FOR_TAB)
432 tab_added_observer.Wait(); 432 tab_added_observer.Wait();
433 if (!(browser_test_flags & BROWSER_TEST_WAIT_FOR_NAVIGATION)) { 433 if (!(browser_test_flags & BROWSER_TEST_WAIT_FOR_NAVIGATION)) {
434 // Some other flag caused the wait prior to this. 434 // Some other flag caused the wait prior to this.
435 return; 435 return;
436 } 436 }
437 WebContents* web_contents = NULL; 437 WebContents* web_contents = NULL;
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 return taker.TakeRenderWidgetSnapshot(rwh, page_size, page_size, bitmap); 1103 return taker.TakeRenderWidgetSnapshot(rwh, page_size, page_size, bitmap);
1104 } 1104 }
1105 1105
1106 bool TakeEntirePageSnapshot(RenderViewHost* rvh, SkBitmap* bitmap) { 1106 bool TakeEntirePageSnapshot(RenderViewHost* rvh, SkBitmap* bitmap) {
1107 DCHECK(bitmap); 1107 DCHECK(bitmap);
1108 SnapshotTaker taker; 1108 SnapshotTaker taker;
1109 return taker.TakeEntirePageSnapshot(rvh, bitmap); 1109 return taker.TakeEntirePageSnapshot(rvh, bitmap);
1110 } 1110 }
1111 1111
1112 } // namespace ui_test_utils 1112 } // namespace ui_test_utils
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698