| OLD | NEW |
| 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 "chrome/browser/ui/toolbar/toolbar_model.h" | 5 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" | 10 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 class ToolbarModelTest : public BrowserWithTestWindowTest { | 139 class ToolbarModelTest : public BrowserWithTestWindowTest { |
| 140 public: | 140 public: |
| 141 ToolbarModelTest(); | 141 ToolbarModelTest(); |
| 142 ToolbarModelTest(Browser::Type browser_type, | 142 ToolbarModelTest(Browser::Type browser_type, |
| 143 chrome::HostDesktopType host_desktop_type, | 143 chrome::HostDesktopType host_desktop_type, |
| 144 bool hosted_app); | 144 bool hosted_app); |
| 145 virtual ~ToolbarModelTest(); | 145 virtual ~ToolbarModelTest(); |
| 146 | 146 |
| 147 // BrowserWithTestWindowTest: | 147 // BrowserWithTestWindowTest: |
| 148 virtual void SetUp() OVERRIDE; | 148 virtual void SetUp() override; |
| 149 | 149 |
| 150 protected: | 150 protected: |
| 151 void EnableOriginChipFieldTrial(); | 151 void EnableOriginChipFieldTrial(); |
| 152 void NavigateAndCheckText(const GURL& url, | 152 void NavigateAndCheckText(const GURL& url, |
| 153 const base::string16& expected_text, | 153 const base::string16& expected_text, |
| 154 bool would_perform_search_term_replacement, | 154 bool would_perform_search_term_replacement, |
| 155 bool should_display_url); | 155 bool should_display_url); |
| 156 | 156 |
| 157 private: | 157 private: |
| 158 scoped_ptr<base::FieldTrialList> field_trial_list_; | 158 scoped_ptr<base::FieldTrialList> field_trial_list_; |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 | 413 |
| 414 // Disabling URL replacement should reset to only showing URLs. | 414 // Disabling URL replacement should reset to only showing URLs. |
| 415 browser()->toolbar_model()->set_url_replacement_enabled(false); | 415 browser()->toolbar_model()->set_url_replacement_enabled(false); |
| 416 for (size_t i = 0; i < arraysize(test_items); ++i) { | 416 for (size_t i = 0; i < arraysize(test_items); ++i) { |
| 417 const TestItem& test_item = test_items[i]; | 417 const TestItem& test_item = test_items[i]; |
| 418 NavigateAndCheckText(test_item.url, | 418 NavigateAndCheckText(test_item.url, |
| 419 test_item.expected_text_url_replacement_inactive, | 419 test_item.expected_text_url_replacement_inactive, |
| 420 false, test_item.should_display_url); | 420 false, test_item.should_display_url); |
| 421 } | 421 } |
| 422 } | 422 } |
| OLD | NEW |