Chromium Code Reviews| Index: chrome/browser/ui/cocoa/location_bar/mock_toolbar_model.h |
| diff --git a/chrome/browser/ui/cocoa/location_bar/mock_toolbar_model.h b/chrome/browser/ui/cocoa/location_bar/mock_toolbar_model.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ada888b52b0e2819f88595c96a4114ef339c65a9 |
| --- /dev/null |
| +++ b/chrome/browser/ui/cocoa/location_bar/mock_toolbar_model.h |
| @@ -0,0 +1,38 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_MOCK_TOOLBAR_MODEL_H_ |
| +#define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_MOCK_TOOLBAR_MODEL_H_ |
| + |
| +#include "chrome/browser/ui/toolbar/toolbar_model.h" |
| +#include "base/compiler_specific.h" |
| + |
| +// Override the toolbar model to allow |GetInputInProgress| and |
| +// |WouldReplaceSearchURLWithSearchTerms| to be customized. |
|
Scott Hess - ex-Googler
2013/02/27 15:22:10
Since you're pulling this out to be shared ... is
sail
2013/02/27 18:48:18
Done.
Added chrome::testing:: to match run_loop_te
|
| +class MockToolbarModel : public ToolbarModel { |
| + public: |
| + MockToolbarModel(); |
| + virtual ~MockToolbarModel(); |
| + |
| + virtual string16 GetText( |
| + bool display_search_urls_as_search_terms) const OVERRIDE; |
| + virtual GURL GetURL() const OVERRIDE; |
| + virtual bool WouldReplaceSearchURLWithSearchTerms() const OVERRIDE; |
| + virtual SecurityLevel GetSecurityLevel() const OVERRIDE; |
| + virtual int GetIcon() const OVERRIDE; |
| + virtual string16 GetEVCertName() const OVERRIDE; |
| + virtual bool ShouldDisplayURL() const OVERRIDE; |
| + virtual void SetInputInProgress(bool value) OVERRIDE; |
| + virtual bool GetInputInProgress() const OVERRIDE; |
| + |
| + void set_would_replace_search_url_with_search_terms(bool value) { |
| + would_replace_search_url_with_search_terms_ = value; |
| + } |
| + |
| + private: |
| + bool input_in_progress_; |
| + bool would_replace_search_url_with_search_terms_; |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_MOCK_TOOLBAR_MODEL_H_ |