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 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1348 content::WebContents* overlay = instant()->GetOverlayContents(); | 1348 content::WebContents* overlay = instant()->GetOverlayContents(); |
1349 EXPECT_TRUE(UpdateSearchState(overlay)); | 1349 EXPECT_TRUE(UpdateSearchState(overlay)); |
1350 EXPECT_EQ(0, on_native_suggestions_calls_); | 1350 EXPECT_EQ(0, on_native_suggestions_calls_); |
1351 | 1351 |
1352 SetOmniboxTextAndWaitForOverlayToShow("railroad"); | 1352 SetOmniboxTextAndWaitForOverlayToShow("railroad"); |
1353 | 1353 |
1354 EXPECT_EQ(overlay, instant()->GetOverlayContents()); | 1354 EXPECT_EQ(overlay, instant()->GetOverlayContents()); |
1355 EXPECT_TRUE(UpdateSearchState(overlay)); | 1355 EXPECT_TRUE(UpdateSearchState(overlay)); |
1356 EXPECT_EQ(1, on_native_suggestions_calls_); | 1356 EXPECT_EQ(1, on_native_suggestions_calls_); |
1357 } | 1357 } |
| 1358 |
| 1359 // Test that the local NTP doesn't end up with the local overlay's URL. |
| 1360 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, LocalNTPIsNotLocalOverlay) { |
| 1361 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); |
| 1362 |
| 1363 EXPECT_EQ(instant_url(), instant()->ntp_->contents()->GetURL()); |
| 1364 |
| 1365 // The second argument says to use only the local overlay. |
| 1366 instant()->SetInstantEnabled(false, true); |
| 1367 |
| 1368 EXPECT_EQ(GURL(chrome::kChromeSearchLocalNtpUrl), |
| 1369 instant()->ntp_->contents()->GetURL()); |
| 1370 } |
OLD | NEW |