Fix UpdaterStateTest.Serialize on iOS.

UpdaterState::GetState returns nullptr on iOS, which leads to a crash in
the unittest.

Bug: None
Change-Id: Ic09aad9f9bb34dfa5afe02c2f937605d8ec6ef1c
Reviewed-on: https://chromium-review.googlesource.com/589028
Reviewed-by: Rohit Rao <[email protected]>
Reviewed-by: Sorin Jianu <[email protected]>
Commit-Queue: Olivier Robin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#490316}
diff --git a/components/update_client/updater_state_unittest.cc b/components/update_client/updater_state_unittest.cc
index ca889ade7..86ad660 100644
--- a/components/update_client/updater_state_unittest.cc
+++ b/components/update_client/updater_state_unittest.cc
@@ -46,9 +46,9 @@
   #if defined(OS_WIN)
     // The name of the Windows updater for Chrome.
     EXPECT_STREQ("Omaha", UpdaterState::GetState(false)->at("name").c_str());
-  #elif defined(OS_MACOSX)
-    EXPECT_STREQ("Keystone", UpdaterState::GetState(false)->at("name").c_str());
-  #endif
+#elif defined(OS_MACOSX) && !defined(OS_IOS)
+  EXPECT_STREQ("Keystone", UpdaterState::GetState(false)->at("name").c_str());
+#endif
 #endif  // GOOGLE_CHROME_BUILD
 
   // Tests some of the remaining values.