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

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

Issue 302453002: New animation for the origin chip URL showing/hiding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test failure by checking for NULL extension Created 6 years, 6 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
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 toolbar_model_(toolbar_model) { 105 toolbar_model_(toolbar_model) {
106 } 106 }
107 107
108 protected: 108 protected:
109 // OmniboxEditController: 109 // OmniboxEditController:
110 virtual void Update(const content::WebContents* contents) OVERRIDE {} 110 virtual void Update(const content::WebContents* contents) OVERRIDE {}
111 virtual void OnChanged() OVERRIDE {} 111 virtual void OnChanged() OVERRIDE {}
112 virtual void OnSetFocus() OVERRIDE {} 112 virtual void OnSetFocus() OVERRIDE {}
113 virtual void ShowURL() OVERRIDE {} 113 virtual void ShowURL() OVERRIDE {}
114 virtual void HideURL() OVERRIDE {} 114 virtual void HideURL() OVERRIDE {}
115 virtual void EndOriginChipAnimations(bool cancel_fade) OVERRIDE {}
115 virtual InstantController* GetInstant() OVERRIDE { return NULL; } 116 virtual InstantController* GetInstant() OVERRIDE { return NULL; }
116 virtual WebContents* GetWebContents() OVERRIDE { return NULL; } 117 virtual WebContents* GetWebContents() OVERRIDE { return NULL; }
117 virtual ToolbarModel* GetToolbarModel() OVERRIDE { return toolbar_model_; } 118 virtual ToolbarModel* GetToolbarModel() OVERRIDE { return toolbar_model_; }
118 virtual const ToolbarModel* GetToolbarModel() const OVERRIDE { 119 virtual const ToolbarModel* GetToolbarModel() const OVERRIDE {
119 return toolbar_model_; 120 return toolbar_model_;
120 } 121 }
121 122
122 private: 123 private:
123 ToolbarModel* toolbar_model_; 124 ToolbarModel* toolbar_model_;
124 125
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 254
254 model.SetUserText(UTF8ToUTF16("he")); 255 model.SetUserText(UTF8ToUTF16("he"));
255 model.OnPopupDataChanged(UTF8ToUTF16("llo"), NULL, base::string16(), false); 256 model.OnPopupDataChanged(UTF8ToUTF16("llo"), NULL, base::string16(), false);
256 EXPECT_EQ(UTF8ToUTF16("hello"), view.GetText()); 257 EXPECT_EQ(UTF8ToUTF16("hello"), view.GetText());
257 EXPECT_EQ(UTF8ToUTF16("llo"), view.inline_autocomplete_text()); 258 EXPECT_EQ(UTF8ToUTF16("llo"), view.inline_autocomplete_text());
258 259
259 model.AcceptTemporaryTextAsUserText(); 260 model.AcceptTemporaryTextAsUserText();
260 EXPECT_EQ(UTF8ToUTF16("hello"), view.GetText()); 261 EXPECT_EQ(UTF8ToUTF16("hello"), view.GetText());
261 EXPECT_EQ(base::string16(), view.inline_autocomplete_text()); 262 EXPECT_EQ(base::string16(), view.inline_autocomplete_text());
262 } 263 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698