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

Unified Diff: chrome/browser/ui/toolbar/test_toolbar_model.h

Issue 1634743003: Componentize TestToolbarModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix gyp dependency Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/toolbar/test_toolbar_model.h
diff --git a/chrome/browser/ui/toolbar/test_toolbar_model.h b/chrome/browser/ui/toolbar/test_toolbar_model.h
deleted file mode 100644
index 9acc0c3a36e6ebafa7d4652b46811a8fd84bdfa3..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/toolbar/test_toolbar_model.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2012 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_TOOLBAR_TEST_TOOLBAR_MODEL_H_
-#define CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_MODEL_H_
-
-#include <stddef.h>
-
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "base/strings/string16.h"
-#include "components/toolbar/toolbar_model.h"
-
-namespace gfx {
-enum class VectorIconId;
-}
-
-// A ToolbarModel that is backed by instance variables, which are initialized
-// with some basic values that can be changed with the provided setters. This
-// should be used only for testing.
-class TestToolbarModel : public ToolbarModel {
- public:
- TestToolbarModel();
- ~TestToolbarModel() override;
- base::string16 GetText() const override;
- base::string16 GetFormattedURL(size_t* prefix_end) const override;
- base::string16 GetCorpusNameForMobile() const override;
- GURL GetURL() const override;
- bool WouldPerformSearchTermReplacement(bool ignore_editing) const override;
- security_state::SecurityStateModel::SecurityLevel GetSecurityLevel(
- bool ignore_editing) const override;
- int GetIcon() const override;
- gfx::VectorIconId GetVectorIcon() const override;
- base::string16 GetEVCertName() const override;
- bool ShouldDisplayURL() const override;
-
- void set_text(const base::string16& text) { text_ = text; }
- void set_url(const GURL& url) { url_ = url;}
- void set_perform_search_term_replacement(
- bool perform_search_term_replacement) {
- perform_search_term_replacement_ = perform_search_term_replacement;
- }
- void set_security_level(
- security_state::SecurityStateModel::SecurityLevel security_level) {
- security_level_ = security_level;
- }
- void set_icon(gfx::VectorIconId icon) { icon_ = icon; }
- void set_ev_cert_name(const base::string16& ev_cert_name) {
- ev_cert_name_ = ev_cert_name;
- }
- void set_should_display_url(bool should_display_url) {
- should_display_url_ = should_display_url;
- }
-
- private:
- base::string16 text_;
- GURL url_;
- bool perform_search_term_replacement_;
- security_state::SecurityStateModel::SecurityLevel security_level_;
- gfx::VectorIconId icon_;
- base::string16 ev_cert_name_;
- bool should_display_url_;
-
- DISALLOW_COPY_AND_ASSIGN(TestToolbarModel);
-};
-
-#endif // CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_MODEL_H_
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_view_browsertest.cc ('k') | chrome/browser/ui/toolbar/test_toolbar_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698