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

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: More OS_CHROMEOS guard for compilation. 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
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 520182a82e99a9382e6aa6eb5fbed30e536e15fe..2dadb0666585cd60837105c0ff58ec8216194f42 100644
--- a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
@@ -208,6 +208,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) {
@@ -217,6 +218,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,
@@ -240,6 +242,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,
@@ -255,7 +258,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,
@@ -282,10 +287,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));
@@ -418,7 +425,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));
@@ -493,6 +503,7 @@ TEST_F(SyncSetupHandlerTest, GaiaErrorInitializingSync) {
dictionary, "", false, GoogleServiceAuthError::SERVICE_UNAVAILABLE,
kTestUser, true, "");
}
+#endif // !OS_CHROMEOS
TEST_F(SyncSetupHandlerTest, TestSyncEverything) {
std::string args =

Powered by Google App Engine
This is Rietveld 408576698