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

Unified Diff: chrome/browser/shell_integration_unittest.cc

Issue 11777006: Speculative revert 175230. I suspect that dependency on propsys.dll makes chrome.dll unloadable on … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 12 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/shell_integration.h ('k') | chrome/browser/shell_integration_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_integration_unittest.cc
===================================================================
--- chrome/browser/shell_integration_unittest.cc (revision 175243)
+++ chrome/browser/shell_integration_unittest.cc (working copy)
@@ -15,11 +15,14 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_paths_internal.h"
#include "content/public/test/test_browser_thread.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
+#if defined(OS_WIN)
+#include "chrome/installer/util/browser_distribution.h"
+#elif defined(OS_POSIX) && !defined(OS_MACOSX)
#include "base/environment.h"
#include "chrome/browser/shell_integration_linux.h"
#endif
@@ -361,4 +364,32 @@
FilePath()));
}
}
+#elif defined(OS_WIN)
+TEST(ShellIntegrationTest, GetAppModelIdForProfileTest) {
+ const string16 base_app_id(
+ BrowserDistribution::GetDistribution()->GetBaseAppId());
+
+ // Empty profile path should get chrome::kBrowserAppID
+ FilePath empty_path;
+ EXPECT_EQ(base_app_id,
+ ShellIntegration::GetAppModelIdForProfile(base_app_id, empty_path));
+
+ // Default profile path should get chrome::kBrowserAppID
+ FilePath default_user_data_dir;
+ chrome::GetDefaultUserDataDirectory(&default_user_data_dir);
+ FilePath default_profile_path =
+ default_user_data_dir.AppendASCII(chrome::kInitialProfile);
+ EXPECT_EQ(base_app_id,
+ ShellIntegration::GetAppModelIdForProfile(base_app_id,
+ default_profile_path));
+
+ // Non-default profile path should get chrome::kBrowserAppID joined with
+ // profile info.
+ FilePath profile_path(FILE_PATH_LITERAL("root"));
+ profile_path = profile_path.Append(FILE_PATH_LITERAL("udd"));
+ profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test"));
+ EXPECT_EQ(base_app_id + L".udd.UserDataTest",
+ ShellIntegration::GetAppModelIdForProfile(base_app_id,
+ profile_path));
+}
#endif
« no previous file with comments | « chrome/browser/shell_integration.h ('k') | chrome/browser/shell_integration_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698