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

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

Issue 5968008: Update file version info/memory details/process utils to use string16.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/shell_integration_linux.cc ('k') | chrome/common/chrome_constants.h » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <map> 7 #include <map>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 { FPL("http___foo_.desktop"), "http://foo" }, 143 { FPL("http___foo_.desktop"), "http://foo" },
144 { FPL("http___foo_bar_.desktop"), "http://foo/bar/" }, 144 { FPL("http___foo_bar_.desktop"), "http://foo/bar/" },
145 { FPL("http___foo_bar_a=b&c=d.desktop"), "http://foo/bar?a=b&c=d" }, 145 { FPL("http___foo_bar_a=b&c=d.desktop"), "http://foo/bar?a=b&c=d" },
146 146
147 // Now we're starting to be more evil... 147 // Now we're starting to be more evil...
148 { FPL("http___foo_.desktop"), "http://foo/bar/baz/../../../../../" }, 148 { FPL("http___foo_.desktop"), "http://foo/bar/baz/../../../../../" },
149 { FPL("http___foo_.desktop"), "http://foo/bar/././../baz/././../" }, 149 { FPL("http___foo_.desktop"), "http://foo/bar/././../baz/././../" },
150 { FPL("http___.._.desktop"), "http://../../../../" }, 150 { FPL("http___.._.desktop"), "http://../../../../" },
151 }; 151 };
152 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); i++) { 152 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); i++) {
153 EXPECT_EQ(WideToASCII(chrome::kBrowserProcessExecutableName) + "-" + 153 EXPECT_EQ(std::string(chrome::kBrowserProcessExecutableName) + "-" +
154 test_cases[i].path, 154 test_cases[i].path,
155 ShellIntegration::GetDesktopShortcutFilename( 155 ShellIntegration::GetDesktopShortcutFilename(
156 GURL(test_cases[i].url)).value()) << 156 GURL(test_cases[i].url)).value()) <<
157 " while testing " << test_cases[i].url; 157 " while testing " << test_cases[i].url;
158 } 158 }
159 } 159 }
160 160
161 TEST(ShellIntegrationTest, GetDesktopFileContents) { 161 TEST(ShellIntegrationTest, GetDesktopFileContents) {
162 const struct { 162 const struct {
163 const char* url; 163 const char* url;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // Non-default profile path should get chrome::kBrowserAppID joined with 310 // Non-default profile path should get chrome::kBrowserAppID joined with
311 // profile info. 311 // profile info.
312 FilePath profile_path(FILE_PATH_LITERAL("root")); 312 FilePath profile_path(FILE_PATH_LITERAL("root"));
313 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); 313 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd"));
314 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); 314 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test"));
315 EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId() + 315 EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId() +
316 L".udd.UserDataTest", 316 L".udd.UserDataTest",
317 ShellIntegration::GetChromiumAppId(profile_path)); 317 ShellIntegration::GetChromiumAppId(profile_path));
318 } 318 }
319 #endif 319 #endif
OLDNEW
« no previous file with comments | « chrome/browser/shell_integration_linux.cc ('k') | chrome/common/chrome_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698