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

Side by Side 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: 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 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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, InvalidURLNoHistory) { 304 IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, InvalidURLNoHistory) {
305 GURL non_existant = ui_test_utils::GetTestUrl( 305 GURL non_existant = ui_test_utils::GetTestUrl(
306 base::FilePath().AppendASCII("History"), 306 base::FilePath().AppendASCII("History"),
307 base::FilePath().AppendASCII("non_existant_file.html")); 307 base::FilePath().AppendASCII("non_existant_file.html"));
308 ui_test_utils::NavigateToURL(browser(), non_existant); 308 ui_test_utils::NavigateToURL(browser(), non_existant);
309 ExpectEmptyHistory(); 309 ExpectEmptyHistory();
310 } 310 }
311 311
312 // New tab page should not show up in history. 312 // New tab page should not show up in history.
313 IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, NewTabNoHistory) { 313 IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, NewTabNoHistory) {
314 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUINewTabURL)); 314 ui_test_utils::NavigateToURLWithDisposition(
315 browser(), GURL(chrome::kChromeUINewTabURL), CURRENT_TAB,
316 ui_test_utils::BROWSER_TEST_NONE);
315 ExpectEmptyHistory(); 317 ExpectEmptyHistory();
316 } 318 }
317 319
318 // Incognito browsing should not show up in history. 320 // Incognito browsing should not show up in history.
319 IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, IncognitoNoHistory) { 321 IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, IncognitoNoHistory) {
320 ui_test_utils::NavigateToURL(CreateIncognitoBrowser(), GetTestUrl()); 322 ui_test_utils::NavigateToURL(CreateIncognitoBrowser(), GetTestUrl());
321 ExpectEmptyHistory(); 323 ExpectEmptyHistory();
322 } 324 }
323 325
324 // Multiple navigations to the same url should have a single history. 326 // Multiple navigations to the same url should have a single history.
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 502
501 content::WebContents* active_web_contents = 503 content::WebContents* active_web_contents =
502 browser()->tab_strip_model()->GetActiveWebContents(); 504 browser()->tab_strip_model()->GetActiveWebContents();
503 ASSERT_EQ(web_contents, active_web_contents); 505 ASSERT_EQ(web_contents, active_web_contents);
504 ASSERT_EQ(history_url, active_web_contents->GetURL()); 506 ASSERT_EQ(history_url, active_web_contents->GetURL());
505 507
506 content::WebContents* second_tab = 508 content::WebContents* second_tab =
507 browser()->tab_strip_model()->GetWebContentsAt(1); 509 browser()->tab_strip_model()->GetWebContentsAt(1);
508 ASSERT_NE(history_url, second_tab->GetURL()); 510 ASSERT_NE(history_url, second_tab->GetURL());
509 } 511 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698