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

Side by Side Diff: chrome/browser/ui/search/instant_extended_browsertest.cc

Issue 13162003: Instant: Don't use the local overlay's URL for the NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 8 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
« no previous file with comments | « chrome/browser/ui/search/instant_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/instant_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698