 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 #include "chrome/browser/ui/toolbar/fake_toolbar_model.h" | |
| 6 | |
| 7 #include "base/utf_string_conversions.h" | |
| 
sky
2012/10/09 20:07:13
Do you really need this?
 
lliabraa
2012/10/10 19:39:34
Nope...removed.
 | |
| 8 | |
| 9 FakeToolbarModel::FakeToolbarModel() | |
| 10 : ToolbarModel(), | |
| 11 text_(), | |
| 
sky
2012/10/09 20:07:13
Remove text_, url_ and ev_cert_name_.
 
lliabraa
2012/10/10 19:39:34
Done.
 | |
| 12 url_(), | |
| 13 should_replace_url_(false), | |
| 14 security_level_(NONE), | |
| 15 icon_(0), | |
| 16 ev_cert_name_(), | |
| 17 should_display_url_(true) {} | |
| 
sky
2012/10/09 20:07:13
You missed input_in_progress_
 
lliabraa
2012/10/10 19:39:34
Done.
 | |
| 18 | |
| 19 FakeToolbarModel::~FakeToolbarModel() {} | |
| 20 | |
| 21 string16 FakeToolbarModel::GetText( | |
| 22 bool display_search_urls_as_search_terms) const { | |
| 23 return text_; | |
| 24 } | |
| 25 | |
| 26 GURL FakeToolbarModel::GetURL() const { | |
| 27 return url_; | |
| 28 } | |
| 29 | |
| 30 bool FakeToolbarModel::WouldReplaceSearchURLWithSearchTerms() const { | |
| 31 return should_replace_url_; | |
| 32 } | |
| 33 | |
| 34 ToolbarModel::SecurityLevel FakeToolbarModel::GetSecurityLevel() const { | |
| 35 return security_level_; | |
| 36 } | |
| 37 | |
| 38 int FakeToolbarModel::GetIcon() const { | |
| 39 return icon_; | |
| 40 } | |
| 41 | |
| 42 string16 FakeToolbarModel::GetEVCertName() const { | |
| 43 return ev_cert_name_; | |
| 44 } | |
| 45 | |
| 46 bool FakeToolbarModel::ShouldDisplayURL() const { | |
| 47 return should_display_url_; | |
| 48 } | |
| 49 | |
| 50 void FakeToolbarModel::set_input_in_progress(bool value) { | |
| 51 input_in_progress_ = value; | |
| 52 } | |
| 53 | |
| 54 bool FakeToolbarModel::input_in_progress() const { | |
| 55 return input_in_progress_; | |
| 56 } | |
| OLD | NEW |