summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/instant/instant_browsertest.cc28
-rw-r--r--chrome/browser/instant/instant_controller.cc5
-rw-r--r--chrome/browser/instant/instant_controller.h4
-rw-r--r--chrome/browser/instant/instant_loader.cc10
-rw-r--r--chrome/browser/instant/instant_loader.h5
-rw-r--r--chrome/test/data/instant/suggest_google.html16
6 files changed, 0 insertions, 68 deletions
diff --git a/chrome/browser/instant/instant_browsertest.cc b/chrome/browser/instant/instant_browsertest.cc
index e8f347c..ef1ac64 100644
--- a/chrome/browser/instant/instant_browsertest.cc
+++ b/chrome/browser/instant/instant_browsertest.cc
@@ -493,34 +493,6 @@ IN_PROC_BROWSER_TEST_F(InstantTest, OnCancelEvent) {
EXPECT_EQ("true 0 1 1 1 abc false", GetSearchStateAsString(preview_));
}
-// Verify that suggestion that looks like a url ('www.google.com' in this case)
-// is not shown.
-IN_PROC_BROWSER_TEST_F(InstantTest, DontShowURLSuggest) {
- ASSERT_TRUE(test_server()->Start());
- ASSERT_NO_FATAL_FAILURE(SetupInstantProvider("suggest_google.html"));
- ASSERT_NO_FATAL_FAILURE(FindLocationBar());
- location_bar_->location_entry()->SetUserText(L"w");
- InstantController* instant = browser()->instant();
- ASSERT_TRUE(instant);
- ASSERT_TRUE(instant->IsShowingInstant());
- ASSERT_TRUE(instant->GetPreviewContents());
- ui_test_utils::WaitForNavigation(
- &(instant->GetPreviewContents()->controller()));
- ASSERT_NO_FATAL_FAILURE(WaitForMessageToBeProcessedByRenderer(
- instant->GetPreviewContents()));
- // TODO: remove this second change when 66104 is fixed.
- location_bar_->location_entry()->SetUserText(L"ww");
- ASSERT_NO_FATAL_FAILURE(WaitForMessageToBeProcessedByRenderer(
- instant->GetPreviewContents()));
- ASSERT_TRUE(instant->is_displayable());
-
- location_bar_->location_entry()->SetUserText(L"www");
- ASSERT_NO_FATAL_FAILURE(WaitForMessageToBeProcessedByRenderer(
- instant->GetPreviewContents()));
- ASSERT_EQ(UTF16ToWide(string16()),
- UTF16ToWide(instant->GetCompleteSuggestedText()));
-}
-
#if !defined(OS_MACOSX)
// Only passes on Mac. http://crbug.com/66850
#define MAYBE_TabKey FAILS_TabKey
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index 0bc6ada..ed01fc5 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -346,11 +346,6 @@ bool InstantController::IsShowingInstant() {
loader_manager_->current_loader()->is_showing_instant();
}
-string16 InstantController::GetCompleteSuggestedText() {
- return loader_manager_.get() && loader_manager_->active_loader() ?
- loader_manager_->active_loader()->complete_suggested_text() : string16();
-}
-
bool InstantController::MightSupportInstant() {
return loader_manager_.get() && loader_manager_->active_loader() &&
loader_manager_->active_loader()->is_showing_instant();
diff --git a/chrome/browser/instant/instant_controller.h b/chrome/browser/instant/instant_controller.h
index 28cee8e..018101d 100644
--- a/chrome/browser/instant/instant_controller.h
+++ b/chrome/browser/instant/instant_controller.h
@@ -171,10 +171,6 @@ class InstantController : public InstantLoaderDelegate {
return last_transition_type_;
}
- // Returns the current complete suggested text, or an empty string if there is
- // no suggestion.
- string16 GetCompleteSuggestedText();
-
// Returns true if we're showing results from a provider that supports the
// instant API. See description of |MightSupportInstant| for how this
// differs from actual loading state.
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
index 8c0b2c3..b6b47a6d 100644
--- a/chrome/browser/instant/instant_loader.cc
+++ b/chrome/browser/instant/instant_loader.cc
@@ -15,7 +15,6 @@
#include "base/timer.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/browser/autocomplete/autocomplete.h"
#include "chrome/browser/favicon_service.h"
#include "chrome/browser/history/history_marshaling.h"
#include "chrome/browser/instant/instant_loader_delegate.h"
@@ -671,15 +670,6 @@ void InstantLoader::SetCompleteSuggestedText(
return;
}
- AutocompleteInput::Type type =
- AutocompleteInput::Parse(UTF16ToWide(complete_suggested_text),
- std::wstring(), NULL, NULL);
- if (type == AutocompleteInput::URL) {
- // Ignore suggestions that look like urls. Otherwise the omnibox ends up
- // showing what looks like a url but the page shows search results.
- return;
- }
-
string16 user_text_lower = l10n_util::ToLower(user_text_);
string16 complete_suggested_text_lower = l10n_util::ToLower(
complete_suggested_text);
diff --git a/chrome/browser/instant/instant_loader.h b/chrome/browser/instant/instant_loader.h
index 070290b..8be48af 100644
--- a/chrome/browser/instant/instant_loader.h
+++ b/chrome/browser/instant/instant_loader.h
@@ -92,11 +92,6 @@ class InstantLoader : public NotificationObserver {
// See description above field.
const string16& user_text() const { return user_text_; }
- // See description above field.
- const string16& complete_suggested_text() const {
- return complete_suggested_text_;
- }
-
private:
friend class InstantLoaderManagerTest;
class FrameLoadObserver;
diff --git a/chrome/test/data/instant/suggest_google.html b/chrome/test/data/instant/suggest_google.html
deleted file mode 100644
index 44e79ca..0000000
--- a/chrome/test/data/instant/suggest_google.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<html>
-<body>
-<h1>Instant</h1>
-<div id=log></div>
-<script>
-window.chrome.sv = true;
-
-var searchBox = window.chrome.searchBox || {};
-
-window.chrome.searchBox.onchange = function() {
- searchBox.setSuggestions(["www.google.com"]);
-};
-
-</script>
-</body>
-</html>