Index: components/gcm_driver/instance_id/instance_id_driver_unittest.cc |
diff --git a/components/gcm_driver/instance_id/instance_id_driver_unittest.cc b/components/gcm_driver/instance_id/instance_id_driver_unittest.cc |
index 8997296aca9b1dad49e6749524421ca3094672b6..018f654be1f80dd32dbc62f47b99fdc338775879 100644 |
--- a/components/gcm_driver/instance_id/instance_id_driver_unittest.cc |
+++ b/components/gcm_driver/instance_id/instance_id_driver_unittest.cc |
@@ -15,8 +15,13 @@ |
#include "base/strings/string_util.h" |
#include "components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h" |
#include "components/gcm_driver/instance_id/instance_id.h" |
+#include "components/gcm_driver/instance_id/instance_id_test_utils_android.h" |
Peter Beverloo
2016/04/15 00:00:18
Stick this in the #ifdef too?
johnme
2016/04/15 16:00:43
Done.
|
#include "testing/gtest/include/gtest/gtest.h" |
+#if defined(OS_ANDROID) |
+#include "components/gcm_driver/instance_id/instance_id_android.h" |
+#endif // OS_ANDROID |
+ |
namespace instance_id { |
namespace { |
@@ -105,6 +110,10 @@ InstanceIDDriverTest::~InstanceIDDriverTest() { |
} |
void InstanceIDDriverTest::SetUp() { |
+#if defined(OS_ANDROID) |
+ InstanceIDTestUtilsAndroid::ClearDataAndSetUseFakeForTesting(true); |
+ InstanceIDAndroid::SetBlockOnAsyncTasksForTesting(true); |
Peter Beverloo
2016/04/15 00:00:17
Clean up as part of TearDown? They're statics so t
johnme
2016/04/15 16:00:43
Done (I'd been hoping to avoid the boilerplate, as
|
+#endif // OS_ANDROID |
gcm_driver_.reset(new FakeGCMDriverForInstanceID); |
RecreateInstanceIDDriver(); |
} |