OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 browser(), | 657 browser(), |
658 GURL(chrome::kChromeUINewTabURL), | 658 GURL(chrome::kChromeUINewTabURL), |
659 CURRENT_TAB, | 659 CURRENT_TAB, |
660 ui_test_utils::BROWSER_TEST_NONE); | 660 ui_test_utils::BROWSER_TEST_NONE); |
661 content::WebContents* active_tab = | 661 content::WebContents* active_tab = |
662 browser()->tab_strip_model()->GetActiveWebContents(); | 662 browser()->tab_strip_model()->GetActiveWebContents(); |
663 EXPECT_EQ(ntp_contents, active_tab); | 663 EXPECT_EQ(ntp_contents, active_tab); |
664 EXPECT_TRUE(chrome::IsInstantNTP(active_tab)); | 664 EXPECT_TRUE(chrome::IsInstantNTP(active_tab)); |
665 } | 665 } |
666 | 666 |
667 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, PreloadedNTPForWrongProvider) { | 667 // TODO(samarth): re-enable when fixing the infinite reload on shutdown. |
| 668 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, |
| 669 DISABLED_PreloadedNTPForWrongProvider) { |
668 // Setup Instant. | 670 // Setup Instant. |
669 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); | 671 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); |
670 FocusOmniboxAndWaitForInstantExtendedSupport(); | 672 FocusOmniboxAndWaitForInstantExtendedSupport(); |
671 | 673 |
672 // NTP contents should be preloaded. | 674 // NTP contents should be preloaded. |
673 ASSERT_NE(static_cast<InstantNTP*>(NULL), instant()->ntp()); | 675 ASSERT_NE(static_cast<InstantNTP*>(NULL), instant()->ntp()); |
674 content::WebContents* ntp_contents = instant()->ntp_->contents(); | 676 content::WebContents* ntp_contents = instant()->ntp_->contents(); |
675 EXPECT_TRUE(ntp_contents); | 677 EXPECT_TRUE(ntp_contents); |
676 GURL ntp_url = ntp_contents->GetURL(); | 678 GURL ntp_url = ntp_contents->GetURL(); |
677 | 679 |
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1734 SendEscape(); | 1736 SendEscape(); |
1735 EXPECT_TRUE(GetStringFromJS(contents, "chrome.embeddedSearch.searchBox.value", | 1737 EXPECT_TRUE(GetStringFromJS(contents, "chrome.embeddedSearch.searchBox.value", |
1736 &query)); | 1738 &query)); |
1737 EXPECT_EQ("", query); | 1739 EXPECT_EQ("", query); |
1738 EXPECT_EQ("", GetOmniboxText()); | 1740 EXPECT_EQ("", GetOmniboxText()); |
1739 | 1741 |
1740 EXPECT_TRUE(UpdateSearchState(contents)); | 1742 EXPECT_TRUE(UpdateSearchState(contents)); |
1741 EXPECT_LT(0, on_change_calls_); | 1743 EXPECT_LT(0, on_change_calls_); |
1742 EXPECT_EQ(0, submit_count_); | 1744 EXPECT_EQ(0, submit_count_); |
1743 } | 1745 } |
OLD | NEW |