 Chromium Code Reviews
 Chromium Code Reviews Issue 11040055:
  Adds a FakeToolbarModel for use in testing.  (Closed) 
  Base URL: http://git.chromium.org/chromium/src.git@master
    
  
    Issue 11040055:
  Adds a FakeToolbarModel for use in testing.  (Closed) 
  Base URL: http://git.chromium.org/chromium/src.git@master| OLD | NEW | 
|---|---|
| (Empty) | |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_FAKE_TOOLBAR_MODEL_H_ | |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_FAKE_TOOLBAR_MODEL_H_ | |
| 7 | |
| 8 #include "base/string16.h" | |
| 9 #include "chrome/browser/ui/toolbar/toolbar_model.h" | |
| 10 | |
| 11 // A ToolbarModel that is backed by instance variables, which are initialized | |
| 12 // with some basic values that can be changed with the provided setters. This | |
| 13 // should be used only for testing. | |
| 14 class FakeToolbarModel : virtual public ToolbarModel { | |
| 15 public: | |
| 16 FakeToolbarModel(); | |
| 17 virtual ~FakeToolbarModel(); | |
| 18 | |
| 19 void SetText(string16 text); | |
| 
sky
2012/10/05 16:41:22
const string16&
 
lliabraa
2012/10/09 19:29:35
Done.
 | |
| 20 virtual string16 GetText(bool display_search_urls_as_search_terms) const; | |
| 21 | |
| 22 void SetURL(GURL url); | |
| 
sky
2012/10/05 16:41:22
const GURL&
 
lliabraa
2012/10/09 19:29:35
Done.
 | |
| 23 virtual GURL GetURL() const; | |
| 24 | |
| 25 void SetReplaceSearchURLWithSearchTerms(bool should_replace_url); | |
| 26 virtual bool WouldReplaceSearchURLWithSearchTerms() const; | |
| 27 | |
| 28 void SetSecurityLevel(SecurityLevel security_level); | |
| 29 virtual SecurityLevel GetSecurityLevel() const; | |
| 30 | |
| 31 void SetIcon(int icon); | |
| 32 virtual int GetIcon() const; | |
| 33 | |
| 34 void SetEVCertName(string16 ev_cert_name); | |
| 
sky
2012/10/05 16:41:22
const string16&
 
lliabraa
2012/10/09 19:29:35
Done.
 | |
| 35 virtual string16 GetEVCertName() const; | |
| 36 | |
| 37 void SetShouldDisplayURL(bool should_display_url); | |
| 38 virtual bool ShouldDisplayURL() const; | |
| 
sky
2012/10/05 16:41:22
Keep all the virtual methods grouped together and
 
lliabraa
2012/10/09 19:29:35
Done.
 | |
| 39 | |
| 40 private: | |
| 41 string16 text_; | |
| 42 GURL url_; | |
| 43 bool should_replace_url_; | |
| 44 SecurityLevel security_level_; | |
| 45 int icon_; | |
| 46 string16 ev_cert_name_; | |
| 47 bool should_display_url_; | |
| 48 }; | |
| 
sky
2012/10/05 16:41:22
DISALLOW_...
 
lliabraa
2012/10/09 19:29:35
Done.
 | |
| 49 | |
| 50 #endif // CHROME_BROWSER_UI_TOOLBAR_FAKE_TOOLBAR_MODEL_H_ | |
| OLD | NEW |