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

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

Issue 9956097: suppress user/password dialog when re-enabling sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add TODO Created 8 years, 9 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
diff --git a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
index 8ccc60a075a3cb11c10ecff6959d9291b8658ce3..cc24bd1f000e3f6996825c22e10ede5cc39331df 100644
--- a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
@@ -213,6 +213,7 @@ class SyncSetupHandlerTest : public testing::Test {
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 @@ static void CheckInt(const DictionaryValue* dictionary,
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 @@ static void CheckBool(const DictionaryValue* dictionary,
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 @@ static void CheckString(const DictionaryValue* dictionary,
"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 @@ static void CheckShowSyncSetupArgs(const DictionaryValue* dictionary,
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 @@ TEST_F(SyncSetupHandlerTest, HandleFatalError) {
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 @@ TEST_F(SyncSetupHandlerTest, GaiaErrorInitializingSync) {
dictionary, "", false, GoogleServiceAuthError::SERVICE_UNAVAILABLE,
kTestUser, true, "");
}
+#endif // !OS_CHROMEOS
TEST_F(SyncSetupHandlerTest, TestSyncEverything) {
std::string args =
@@ -774,6 +785,7 @@ TEST_F(SyncSetupHandlerTest, ShowSyncSetup) {
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 @@ TEST_F(SyncSetupHandlerTest, ShowSyncSetupWithAuthError) {
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