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

Side by Side Diff: chrome/browser/shell_integration_win_unittest.cc

Issue 1439323003: Properly call string fill constructor in win shell integration unittest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/shell_integration.h" 5 #include "chrome/browser/shell_integration.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // appid instead of being totally different. 134 // appid instead of being totally different.
135 base::string16 chrome_app_id_is_prefix(chrome_app_id_); 135 base::string16 chrome_app_id_is_prefix(chrome_app_id_);
136 chrome_app_id_is_prefix.push_back(L'1'); 136 chrome_app_id_is_prefix.push_back(L'1');
137 temp_properties.set_target(chrome_exe_); 137 temp_properties.set_target(chrome_exe_);
138 temp_properties.set_app_id(chrome_app_id_is_prefix); 138 temp_properties.set_app_id(chrome_app_id_is_prefix);
139 ASSERT_NO_FATAL_FAILURE( 139 ASSERT_NO_FATAL_FAILURE(
140 AddTestShortcutAndResetProperties(&temp_properties)); 140 AddTestShortcutAndResetProperties(&temp_properties));
141 141
142 // Shortcut 4 is like shortcut 1, but it's appid is of the same size as the 142 // Shortcut 4 is like shortcut 1, but it's appid is of the same size as the
143 // expected appid. 143 // expected appid.
144 base::string16 same_size_as_chrome_app_id(L'1', chrome_app_id_.size()); 144 base::string16 same_size_as_chrome_app_id(chrome_app_id_.size(), L'1');
145 temp_properties.set_target(chrome_exe_); 145 temp_properties.set_target(chrome_exe_);
146 temp_properties.set_app_id(same_size_as_chrome_app_id); 146 temp_properties.set_app_id(same_size_as_chrome_app_id);
147 ASSERT_NO_FATAL_FAILURE( 147 ASSERT_NO_FATAL_FAILURE(
148 AddTestShortcutAndResetProperties(&temp_properties)); 148 AddTestShortcutAndResetProperties(&temp_properties));
149 149
150 // Shortcut 5 doesn't have an app_id, nor is dual_mode even set; they should 150 // Shortcut 5 doesn't have an app_id, nor is dual_mode even set; they should
151 // be set as expected upon migration. 151 // be set as expected upon migration.
152 temp_properties.set_target(chrome_exe_); 152 temp_properties.set_target(chrome_exe_);
153 ASSERT_NO_FATAL_FAILURE( 153 ASSERT_NO_FATAL_FAILURE(
154 AddTestShortcutAndResetProperties(&temp_properties)); 154 AddTestShortcutAndResetProperties(&temp_properties));
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 default_profile_path)); 420 default_profile_path));
421 421
422 // Non-default profile path should get chrome::kBrowserAppID + AppList joined 422 // Non-default profile path should get chrome::kBrowserAppID + AppList joined
423 // with profile info. 423 // with profile info.
424 base::FilePath profile_path(FILE_PATH_LITERAL("root")); 424 base::FilePath profile_path(FILE_PATH_LITERAL("root"));
425 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); 425 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd"));
426 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); 426 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test"));
427 EXPECT_EQ(base_app_id + L".udd.UserDataTest", 427 EXPECT_EQ(base_app_id + L".udd.UserDataTest",
428 ShellIntegration::GetAppListAppModelIdForProfile(profile_path)); 428 ShellIntegration::GetAppListAppModelIdForProfile(profile_path));
429 } 429 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698