Vectorize website settings icons in omnibox
[chromium-blink-merge.git] / components / invalidation / impl / invalidation_service_android_unittest.cc
blob832f1fc8cce2f0248dedf79050722fde872c7e43
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/impl/invalidation_service_android.h"
7 #include "base/android/jni_android.h"
8 #include "components/invalidation/impl/fake_invalidation_handler.h"
9 #include "components/invalidation/impl/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