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

Side by Side Diff: chrome/browser/ui/location_bar/origin_chip_info_unittest.cc

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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 unified diff | Download patch
OLDNEW
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 EXPECT_EQ(l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME), info()->label()); 140 EXPECT_EQ(l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME), info()->label());
141 EXPECT_EQ(base::ASCIIToUTF16(kChromeOrigin2), info()->Tooltip()); 141 EXPECT_EQ(base::ASCIIToUTF16(kChromeOrigin2), info()->Tooltip());
142 EXPECT_EQ(url(), info()->displayed_url()); 142 EXPECT_EQ(url(), info()->displayed_url());
143 EXPECT_EQ(IDR_PRODUCT_LOGO_16, info()->icon()); 143 EXPECT_EQ(IDR_PRODUCT_LOGO_16, info()->icon());
144 144
145 SetURL(kExampleUrl, true); 145 SetURL(kExampleUrl, true);
146 EXPECT_NE(IDR_PRODUCT_LOGO_16, info()->icon()); 146 EXPECT_NE(IDR_PRODUCT_LOGO_16, info()->icon());
147 } 147 }
148 148
149 TEST_F(OriginChipInfoTest, ExtensionOrigin) { 149 TEST_F(OriginChipInfoTest, ExtensionOrigin) {
150 CommandLine command_line(CommandLine::NO_PROGRAM); 150 base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
151 extensions::TestExtensionSystem* test_extension_system = 151 extensions::TestExtensionSystem* test_extension_system =
152 static_cast<extensions::TestExtensionSystem*>( 152 static_cast<extensions::TestExtensionSystem*>(
153 extensions::ExtensionSystem::Get(profile())); 153 extensions::ExtensionSystem::Get(profile()));
154 154
155 // |extension_service| is owned by |profile()|. 155 // |extension_service| is owned by |profile()|.
156 ExtensionService* extension_service = 156 ExtensionService* extension_service =
157 test_extension_system->CreateExtensionService(&command_line, 157 test_extension_system->CreateExtensionService(&command_line,
158 base::FilePath(), 158 base::FilePath(),
159 false); 159 false);
160 160
(...skipping 14 matching lines...) Expand all
175 const std::string extension_origin = 175 const std::string extension_origin =
176 base::StringPrintf("chrome-extension://%s/index.html", kFooId); 176 base::StringPrintf("chrome-extension://%s/index.html", kFooId);
177 SetURL(extension_origin, true); 177 SetURL(extension_origin, true);
178 EXPECT_NE(null_image, icon_image()); 178 EXPECT_NE(null_image, icon_image());
179 EXPECT_EQ(base::ASCIIToUTF16(kFooName), info()->label()); 179 EXPECT_EQ(base::ASCIIToUTF16(kFooName), info()->label());
180 EXPECT_EQ(base::ASCIIToUTF16(extension_origin), info()->Tooltip()); 180 EXPECT_EQ(base::ASCIIToUTF16(extension_origin), info()->Tooltip());
181 181
182 SetURL(kExampleUrl, true); 182 SetURL(kExampleUrl, true);
183 EXPECT_EQ(null_image, icon_image()); 183 EXPECT_EQ(null_image, icon_image());
184 } 184 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/select_file_dialog_impl_kde.cc ('k') | chrome/browser/ui/network_profile_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698