OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/location_bar/origin_chip_info.h" | 5 #include "chrome/browser/ui/location_bar/origin_chip_info.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 virtual void TearDown() override { | 64 virtual void TearDown() override { |
65 info_.reset(); | 65 info_.reset(); |
66 toolbar_model_.reset(); | 66 toolbar_model_.reset(); |
67 #if defined(OS_CHROMEOS) | 67 #if defined(OS_CHROMEOS) |
68 test_user_manager_.reset(); | 68 test_user_manager_.reset(); |
69 #endif | 69 #endif |
70 ChromeRenderViewHostTestHarness::TearDown(); | 70 ChromeRenderViewHostTestHarness::TearDown(); |
71 } | 71 } |
72 | 72 |
73 virtual void OnExtensionIconImageChanged( | 73 void OnExtensionIconImageChanged(extensions::IconImage* image) override { |
74 extensions::IconImage* image) override { | |
75 // We keep the value of |image| to check if it's set, but the actual value | 74 // We keep the value of |image| to check if it's set, but the actual value |
76 // is never used. | 75 // is never used. |
77 icon_image_ = image; | 76 icon_image_ = image; |
78 } | 77 } |
79 | 78 |
80 private: | 79 private: |
81 scoped_ptr<OriginChipInfo> info_; | 80 scoped_ptr<OriginChipInfo> info_; |
82 scoped_ptr<TestToolbarModel> toolbar_model_; | 81 scoped_ptr<TestToolbarModel> toolbar_model_; |
83 GURL url_; | 82 GURL url_; |
84 extensions::IconImage* icon_image_; | 83 extensions::IconImage* icon_image_; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 const std::string extension_origin = | 175 const std::string extension_origin = |
177 base::StringPrintf("chrome-extension://%s/index.html", kFooId); | 176 base::StringPrintf("chrome-extension://%s/index.html", kFooId); |
178 SetURL(extension_origin, true); | 177 SetURL(extension_origin, true); |
179 EXPECT_NE(null_image, icon_image()); | 178 EXPECT_NE(null_image, icon_image()); |
180 EXPECT_EQ(base::ASCIIToUTF16(kFooName), info()->label()); | 179 EXPECT_EQ(base::ASCIIToUTF16(kFooName), info()->label()); |
181 EXPECT_EQ(base::ASCIIToUTF16(extension_origin), info()->Tooltip()); | 180 EXPECT_EQ(base::ASCIIToUTF16(extension_origin), info()->Tooltip()); |
182 | 181 |
183 SetURL(kExampleUrl, true); | 182 SetURL(kExampleUrl, true); |
184 EXPECT_EQ(null_image, icon_image()); | 183 EXPECT_EQ(null_image, icon_image()); |
185 } | 184 } |
OLD | NEW |