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

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_edit_unittest.cc

Issue 1104513003: Omnibox: Remove Hint Text Code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed WITH_DEFAULT_SEARCH_PROVIDER part of string Created 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/strings/utf_string_conversions.h" 5 #include "base/strings/utf_string_conversions.h"
6 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" 6 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h"
7 #include "chrome/browser/search_engines/template_url_service_factory.h" 7 #include "chrome/browser/search_engines/template_url_service_factory.h"
8 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" 8 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h"
9 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" 9 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h"
10 #include "chrome/browser/ui/omnibox/omnibox_view.h" 10 #include "chrome/browser/ui/omnibox/omnibox_view.h"
(...skipping 10 matching lines...) Expand all
21 class TestingOmniboxView : public OmniboxView { 21 class TestingOmniboxView : public OmniboxView {
22 public: 22 public:
23 explicit TestingOmniboxView(OmniboxEditController* controller) 23 explicit TestingOmniboxView(OmniboxEditController* controller)
24 : OmniboxView(NULL, controller, NULL) {} 24 : OmniboxView(NULL, controller, NULL) {}
25 25
26 // OmniboxView: 26 // OmniboxView:
27 void SaveStateToTab(WebContents* tab) override {} 27 void SaveStateToTab(WebContents* tab) override {}
28 void OnTabChanged(const WebContents* web_contents) override {} 28 void OnTabChanged(const WebContents* web_contents) override {}
29 void ResetTabState(WebContents* web_contents) override {} 29 void ResetTabState(WebContents* web_contents) override {}
30 void Update() override {} 30 void Update() override {}
31 void UpdatePlaceholderText() override {}
32 void OpenMatch(const AutocompleteMatch& match, 31 void OpenMatch(const AutocompleteMatch& match,
33 WindowOpenDisposition disposition, 32 WindowOpenDisposition disposition,
34 const GURL& alternate_nav_url, 33 const GURL& alternate_nav_url,
35 const base::string16& pasted_text, 34 const base::string16& pasted_text,
36 size_t selected_line) override {} 35 size_t selected_line) override {}
37 base::string16 GetText() const override { return text_; } 36 base::string16 GetText() const override { return text_; }
38 void SetUserText(const base::string16& text, 37 void SetUserText(const base::string16& text,
39 const base::string16& display_text, 38 const base::string16& display_text,
40 bool update_popup) override { 39 bool update_popup) override {
41 text_ = display_text; 40 text_ = display_text;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 249
251 model.SetUserText(UTF8ToUTF16("he")); 250 model.SetUserText(UTF8ToUTF16("he"));
252 model.OnPopupDataChanged(UTF8ToUTF16("llo"), NULL, base::string16(), false); 251 model.OnPopupDataChanged(UTF8ToUTF16("llo"), NULL, base::string16(), false);
253 EXPECT_EQ(UTF8ToUTF16("hello"), view.GetText()); 252 EXPECT_EQ(UTF8ToUTF16("hello"), view.GetText());
254 EXPECT_EQ(UTF8ToUTF16("llo"), view.inline_autocomplete_text()); 253 EXPECT_EQ(UTF8ToUTF16("llo"), view.inline_autocomplete_text());
255 254
256 model.AcceptTemporaryTextAsUserText(); 255 model.AcceptTemporaryTextAsUserText();
257 EXPECT_EQ(UTF8ToUTF16("hello"), view.GetText()); 256 EXPECT_EQ(UTF8ToUTF16("hello"), view.GetText());
258 EXPECT_EQ(base::string16(), view.inline_autocomplete_text()); 257 EXPECT_EQ(base::string16(), view.inline_autocomplete_text());
259 } 258 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_edit_model.cc ('k') | chrome/browser/ui/omnibox/omnibox_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698