Build the Clang plugin on Windows.
[chromium-blink-merge.git] / components / invalidation / invalidation_service_android_unittest.cc
blobed295bb52897d438f76c41747d47123ee84b3991
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "components/invalidation/invalidation_service_android.h"
7 #include "base/android/jni_android.h"
8 #include "components/invalidation/fake_invalidation_handler.h"
9 #include "components/invalidation/invalidation_service_test_template.h"
10 #include "testing/gtest/include/gtest/gtest.h"
12 namespace invalidation {
14 #if defined(OS_ANDROID)
16 class InvalidationServiceAndroidTest : public testing::Test {
17 public:
18 InvalidationServiceAndroidTest() :
19 invalidation_service_(base::android::GetApplicationContext()) {}
20 ~InvalidationServiceAndroidTest() override {}
22 InvalidationService& invalidation_service() {
23 return invalidation_service_;
26 private:
27 InvalidationServiceAndroid invalidation_service_;
30 TEST_F(InvalidationServiceAndroidTest, FetchClientId) {
31 const std::string id1 = invalidation_service().GetInvalidatorClientId();
32 ASSERT_FALSE(id1.empty());
34 // If nothing else, the ID should be consistent.
35 const std::string id2 = invalidation_service().GetInvalidatorClientId();
36 ASSERT_EQ(id1, id2);
39 #endif
41 } // namespace invalidation