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

Unified Diff: chrome/browser/ui/browser_browsertest.cc

Issue 24733003: Update defaults for InstantExtended. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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/ui/browser_browsertest.cc
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index c4f0a0eda571f15dcf02f685574425c31652d7c6..bbbf6bda3991ea2943b233881187bbafb8aa4f29 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -26,6 +26,8 @@
#include "chrome/browser/prefs/incognito_mode_prefs.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/browser/search/instant_service.h"
+#include "chrome/browser/search/instant_service_factory.h"
#include "chrome/browser/search/search.h"
#include "chrome/browser/sessions/session_backend.h"
#include "chrome/browser/sessions/session_service_factory.h"
@@ -940,7 +942,14 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, RenderIdleTime) {
base::FilePath(kTitle1File)));
content::RenderProcessHost::iterator it(
content::RenderProcessHost::AllHostsIterator());
+ const InstantService* instant_service =
+ InstantServiceFactory::GetForProfile(browser()->profile());
for (; !it.IsAtEnd(); it.Advance()) {
+ // Ignore renderers in the Instant process (that may have been prerendered).
+ if (instant_service && instant_service->IsInstantProcess(
+ it.GetCurrentValue()->GetID())) {
+ continue;
+ }
base::TimeDelta renderer_td =
it.GetCurrentValue()->GetChildProcessIdleTime();
base::TimeDelta browser_td = base::TimeTicks::Now() - start;
@@ -1011,7 +1020,8 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutInvalid) {
// Urls that should not have shortcuts.
GURL new_tab_url(chrome::kChromeUINewTabURL);
- ui_test_utils::NavigateToURL(browser(), new_tab_url);
+ ui_test_utils::NavigateToURLWithDisposition(
+ browser(), new_tab_url, CURRENT_TAB, ui_test_utils::BROWSER_TEST_NONE);
EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS));
GURL history_url(chrome::kChromeUIHistoryURL);
@@ -2423,7 +2433,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_GetSizeForNewRenderView) {
ASSERT_TRUE(https_test_server.Start());
// Start with NTP.
- ui_test_utils::NavigateToURL(browser(), GURL("chrome://newtab"));
+ ui_test_utils::NavigateToURL(browser(), GURL("chrome-internal://newtab"));
ASSERT_EQ(BookmarkBar::DETACHED, browser()->bookmark_bar_state());
WebContents* web_contents =
browser()->tab_strip_model()->GetActiveWebContents();
@@ -2480,7 +2490,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_GetSizeForNewRenderView) {
// Navigate from NTP to a non-NTP page, resizing WebContentsView while
// navigation entry is pending.
- ui_test_utils::NavigateToURL(browser(), GURL("chrome://newtab"));
+ ui_test_utils::NavigateToURL(browser(), GURL("chrome-internal://newtab"));
gfx::Size wcv_resize_insets(-34, -57);
observer.set_wcv_resize_insets(wcv_resize_insets);
ui_test_utils::NavigateToURL(browser(),

Powered by Google App Engine
This is Rietveld 408576698