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

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

Issue 12498002: InstantExtended: Adding InstantRestrictedIDCache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing android compile error. Created 7 years, 9 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') | chrome/browser/ui/search/instant_page.h » ('j') | 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 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1251 stream << "apiHandle.setValue('" << kQueryString << "');"; 1251 stream << "apiHandle.setValue('" << kQueryString << "');";
1252 EXPECT_TRUE(ExecuteScript(stream.str())); 1252 EXPECT_TRUE(ExecuteScript(stream.str()));
1253 1253
1254 std::string result; 1254 std::string result;
1255 EXPECT_TRUE(GetStringFromJS(instant()->GetOverlayContents(), 1255 EXPECT_TRUE(GetStringFromJS(instant()->GetOverlayContents(),
1256 "apiHandle.value", 1256 "apiHandle.value",
1257 &result)); 1257 &result));
1258 EXPECT_EQ(kQueryString, result); 1258 EXPECT_EQ(kQueryString, result);
1259 1259
1260 // Set the query text to the first restricted autocomplete item. 1260 // Set the query text to the first restricted autocomplete item.
1261 int rid = 0; 1261 int rid = 1;
1262 stream.str(std::string()); 1262 stream.str(std::string());
1263 stream << "apiHandle.setRestrictedValue(" << rid << ")"; 1263 stream << "apiHandle.setRestrictedValue(" << rid << ")";
1264 EXPECT_TRUE(ExecuteScript(stream.str())); 1264 EXPECT_TRUE(ExecuteScript(stream.str()));
1265 1265
1266 // Expect that we now receive the empty string when reading the value back. 1266 // Expect that we now receive the empty string when reading the value back.
1267 EXPECT_TRUE(GetStringFromJS(instant()->GetOverlayContents(), 1267 EXPECT_TRUE(GetStringFromJS(instant()->GetOverlayContents(),
1268 "apiHandle.value", 1268 "apiHandle.value",
1269 &result)); 1269 &result));
1270 EXPECT_EQ("", result); 1270 EXPECT_EQ("", result);
1271 1271
(...skipping 18 matching lines...) Expand all
1290 content::WebContents* overlay = instant()->GetOverlayContents(); 1290 content::WebContents* overlay = instant()->GetOverlayContents();
1291 EXPECT_TRUE(UpdateSearchState(overlay)); 1291 EXPECT_TRUE(UpdateSearchState(overlay));
1292 EXPECT_EQ(0, on_native_suggestions_calls_); 1292 EXPECT_EQ(0, on_native_suggestions_calls_);
1293 1293
1294 SetOmniboxTextAndWaitForOverlayToShow("railroad"); 1294 SetOmniboxTextAndWaitForOverlayToShow("railroad");
1295 1295
1296 EXPECT_EQ(overlay, instant()->GetOverlayContents()); 1296 EXPECT_EQ(overlay, instant()->GetOverlayContents());
1297 EXPECT_TRUE(UpdateSearchState(overlay)); 1297 EXPECT_TRUE(UpdateSearchState(overlay));
1298 EXPECT_EQ(1, on_native_suggestions_calls_); 1298 EXPECT_EQ(1, on_native_suggestions_calls_);
1299 } 1299 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/instant_controller.cc ('k') | chrome/browser/ui/search/instant_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698