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

Unified Diff: chrome/browser/ui/webui/sync_setup_handler_unittest.cc

Issue 10020028: Merge 130722 - On ChromeOS, the user is always signed in and we should not (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src/
Patch Set: Created 8 years, 8 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/ui/webui/sync_setup_handler.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/sync_setup_handler_unittest.cc
===================================================================
--- chrome/browser/ui/webui/sync_setup_handler_unittest.cc (revision 131686)
+++ chrome/browser/ui/webui/sync_setup_handler_unittest.cc (working copy)
@@ -213,6 +213,7 @@
scoped_ptr<TestingSyncSetupHandler> handler_;
};
+#if !defined(OS_CHROMEOS)
static void CheckInt(const DictionaryValue* dictionary,
const std::string& key,
int expected_value) {
@@ -222,6 +223,7 @@
EXPECT_EQ(actual_value, expected_value) <<
"Mismatch found for " << key;;
}
+#endif
static void CheckBool(const DictionaryValue* dictionary,
const std::string& key,
@@ -245,6 +247,7 @@
return CheckBool(dictionary, key, expected_value, false);
}
+#if !defined(OS_CHROMEOS)
static void CheckString(const DictionaryValue* dictionary,
const std::string& key,
const std::string& expected_value,
@@ -260,7 +263,9 @@
"Mismatch found for " << key;
}
}
+#endif
+#if !defined(OS_CHROMEOS)
// Validates that the expected args are being passed off to javascript.
static void CheckShowSyncSetupArgs(const DictionaryValue* dictionary,
std::string error_message,
@@ -287,10 +292,12 @@
CheckBool(dictionary, "fatalError", fatal_error, true);
CheckBool(dictionary, "editable_user", user_is_editable);
}
+#endif
TEST_F(SyncSetupHandlerTest, Basic) {
}
+#if !defined(OS_CHROMEOS)
TEST_F(SyncSetupHandlerTest, DisplayBasicLogin) {
EXPECT_CALL(*mock_pss_, AreCredentialsAvailable())
.WillRepeatedly(Return(false));
@@ -423,7 +430,10 @@
CheckShowSyncSetupArgs(
dictionary, "", true, GoogleServiceAuthError::NONE, "", true, "");
}
+#endif // !OS_CHROMEOS
+#if !defined(OS_CHROMEOS)
+// TODO(kochi): We need equivalent tests for ChromeOS.
TEST_F(SyncSetupHandlerTest, UnrecoverableErrorInitializingSync) {
EXPECT_CALL(*mock_pss_, AreCredentialsAvailable())
.WillRepeatedly(Return(false));
@@ -498,6 +508,7 @@
dictionary, "", false, GoogleServiceAuthError::SERVICE_UNAVAILABLE,
kTestUser, true, "");
}
+#endif // !OS_CHROMEOS
TEST_F(SyncSetupHandlerTest, TestSyncEverything) {
std::string args =
@@ -774,6 +785,7 @@
ExpectConfig();
}
+#if !defined(OS_CHROMEOS)
TEST_F(SyncSetupHandlerTest, ShowSyncSetupWithAuthError) {
// Initialize the system to a signed in state, but with an auth error.
error_ = GoogleServiceAuthError(
@@ -809,6 +821,7 @@
false,
"");
}
+#endif
TEST_F(SyncSetupHandlerTest, ShowSetupSyncEverything) {
EXPECT_CALL(*mock_pss_, IsPassphraseRequired())
« no previous file with comments | « chrome/browser/ui/webui/sync_setup_handler.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698