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

Unified Diff: chrome/browser/history/history_browsertest.cc

Issue 24733003: Update defaults for InstantExtended. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test exclusion. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/history_browsertest.cc
diff --git a/chrome/browser/history/history_browsertest.cc b/chrome/browser/history/history_browsertest.cc
index be46bc3d3e3939f3540d3c6c84bc9099515b1992..38964feac58d5040f83db6a1db099e503464388b 100644
--- a/chrome/browser/history/history_browsertest.cc
+++ b/chrome/browser/history/history_browsertest.cc
@@ -22,6 +22,7 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_browser_thread.h"
@@ -62,6 +63,15 @@ class WaitForHistoryTask : public history::HistoryDBTask {
class HistoryBrowserTest : public InProcessBrowserTest {
protected:
+ virtual void SetUpOnMainThread() OVERRIDE {
+ InProcessBrowserTest::SetUpOnMainThread();
+ // Wait for the InstantNTP prerendered contents to load.
+ content::WindowedNotificationObserver observer(
sky 2013/10/07 20:30:59 Why do some tests need to do this?
samarth 2013/10/11 22:26:04 It's because the prerendering of the Instant NTP c
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
+ observer.Wait();
+ }
+
virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
command_line->AppendSwitch(switches::kEnableFileCookies);
}
@@ -311,7 +321,9 @@ IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, InvalidURLNoHistory) {
// New tab page should not show up in history.
IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, NewTabNoHistory) {
- ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUINewTabURL));
+ ui_test_utils::NavigateToURLWithDisposition(
+ browser(), GURL(chrome::kChromeUINewTabURL), CURRENT_TAB,
+ ui_test_utils::BROWSER_TEST_NONE);
ExpectEmptyHistory();
}

Powered by Google App Engine
This is Rietveld 408576698