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

Side by Side Diff: components/invalidation/invalidation_service_android_unittest.cc

Issue 459513002: Massive refactor of the Android invalidation code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: A couple GN fixes. Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « components/invalidation/invalidation_service_android.cc ('k') | components/signin.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "components/invalidation/invalidation_service_android.h"
6
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"
11
12 namespace invalidation {
13
14 #if defined(OS_ANDROID)
15
16 class InvalidationServiceAndroidTest : public testing::Test {
17 public:
18 InvalidationServiceAndroidTest() :
19 invalidation_service_(base::android::GetApplicationContext()) {}
20 virtual ~InvalidationServiceAndroidTest() {}
21
22 InvalidationService& invalidation_service() {
23 return invalidation_service_;
24 }
25
26 private:
27 InvalidationServiceAndroid invalidation_service_;
28 };
29
30 TEST_F(InvalidationServiceAndroidTest, FetchClientId) {
31 const std::string id1 = invalidation_service().GetInvalidatorClientId();
32 ASSERT_FALSE(id1.empty());
33
34 // If nothing else, the ID should be consistent.
35 const std::string id2 = invalidation_service().GetInvalidatorClientId();
36 ASSERT_EQ(id1, id2);
37 }
38
39 #endif
40
41 } // namespace invalidation
OLDNEW
« no previous file with comments | « components/invalidation/invalidation_service_android.cc ('k') | components/signin.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698