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

Side by Side Diff: chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc

Issue 19381005: Add version field to syncer::Invalidation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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 | « no previous file | chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/push_messaging/push_messaging_api.h" 5 #include "chrome/browser/extensions/api/push_messaging/push_messaging_api.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati on_handler.h" 8 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati on_handler.h"
9 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati on_mapper.h" 9 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati on_mapper.h"
10 #include "chrome/browser/extensions/extension_apitest.h" 10 #include "chrome/browser/extensions/extension_apitest.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 ExtensionApiTest::SetUpOnMainThread(); 74 ExtensionApiTest::SetUpOnMainThread();
75 fake_invalidation_service_ = 75 fake_invalidation_service_ =
76 static_cast<invalidation::FakeInvalidationService*>( 76 static_cast<invalidation::FakeInvalidationService*>(
77 InvalidationServiceFactory::GetInstance()->GetForProfile( 77 InvalidationServiceFactory::GetInstance()->GetForProfile(
78 profile())); 78 profile()));
79 } 79 }
80 80
81 void EmitInvalidation( 81 void EmitInvalidation(
82 const invalidation::ObjectId& object_id, 82 const invalidation::ObjectId& object_id,
83 const std::string& payload) { 83 const std::string& payload) {
84 fake_invalidation_service_->EmitInvalidationForTest(object_id, payload); 84 fake_invalidation_service_->EmitInvalidationForTest(
85 object_id,
86 syncer::Invalidation::kUnknownVersion,
87 payload);
85 } 88 }
86 89
87 PushMessagingAPI* GetAPI() { 90 PushMessagingAPI* GetAPI() {
88 return PushMessagingAPI::Get(profile()); 91 return PushMessagingAPI::Get(profile());
89 } 92 }
90 93
91 PushMessagingEventRouter* GetEventRouter() { 94 PushMessagingEventRouter* GetEventRouter() {
92 return PushMessagingAPI::Get(profile())->GetEventRouterForTest(); 95 return PushMessagingAPI::Get(profile())->GetEventRouterForTest();
93 } 96 }
94 97
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 const extensions::Extension* extension = 188 const extensions::Extension* extension =
186 LoadExtension(test_data_dir_.AppendASCII("push_messaging")); 189 LoadExtension(test_data_dir_.AppendASCII("push_messaging"));
187 ASSERT_TRUE(extension); 190 ASSERT_TRUE(extension);
188 ui_test_utils::NavigateToURL( 191 ui_test_utils::NavigateToURL(
189 browser(), extension->GetResourceURL("get_channel_id.html")); 192 browser(), extension->GetResourceURL("get_channel_id.html"));
190 193
191 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 194 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
192 } 195 }
193 196
194 } // namespace extensions 197 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698