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

Side by Side Diff: components/gcm_driver/gcm_driver_desktop_unittest.cc

Issue 562423002: Clear GCM data when the user clears cookies and other site data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ExtensionBrowsingDataTest tests Created 6 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/gcm_driver/gcm_driver_desktop.h" 5 #include "components/gcm_driver/gcm_driver_desktop.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 driver_->RemoveAppHandler(kTestAppID2); 251 driver_->RemoveAppHandler(kTestAppID2);
252 } 252 }
253 253
254 void GCMDriverTest::SignIn(const std::string& account_id) { 254 void GCMDriverTest::SignIn(const std::string& account_id) {
255 driver_->OnSignedIn(); 255 driver_->OnSignedIn();
256 PumpIOLoop(); 256 PumpIOLoop();
257 PumpUILoop(); 257 PumpUILoop();
258 } 258 }
259 259
260 void GCMDriverTest::SignOut() { 260 void GCMDriverTest::SignOut() {
261 driver_->Purge(); 261 driver_->OnSignedOut();
262 PumpIOLoop(); 262 PumpIOLoop();
263 PumpUILoop(); 263 PumpUILoop();
264 } 264 }
265 265
266 void GCMDriverTest::Register(const std::string& app_id, 266 void GCMDriverTest::Register(const std::string& app_id,
267 const std::vector<std::string>& sender_ids, 267 const std::vector<std::string>& sender_ids,
268 WaitToFinish wait_to_finish) { 268 WaitToFinish wait_to_finish) {
269 base::RunLoop run_loop; 269 base::RunLoop run_loop;
270 async_operation_completed_callback_ = run_loop.QuitClosure(); 270 async_operation_completed_callback_ = run_loop.QuitClosure();
271 driver_->Register(app_id, 271 driver_->Register(app_id,
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 922
923 TEST_F(GCMDriverFunctionalTest, MessagesDeleted) { 923 TEST_F(GCMDriverFunctionalTest, MessagesDeleted) {
924 GetGCMClient()->DeleteMessages(kTestAppID1); 924 GetGCMClient()->DeleteMessages(kTestAppID1);
925 gcm_app_handler()->WaitForNotification(); 925 gcm_app_handler()->WaitForNotification();
926 EXPECT_EQ(FakeGCMAppHandler::MESSAGES_DELETED_EVENT, 926 EXPECT_EQ(FakeGCMAppHandler::MESSAGES_DELETED_EVENT,
927 gcm_app_handler()->received_event()); 927 gcm_app_handler()->received_event());
928 EXPECT_EQ(kTestAppID1, gcm_app_handler()->app_id()); 928 EXPECT_EQ(kTestAppID1, gcm_app_handler()->app_id());
929 } 929 }
930 930
931 } // namespace gcm 931 } // namespace gcm
OLDNEW
« components/gcm_driver/gcm_driver_desktop.cc ('K') | « components/gcm_driver/gcm_driver_desktop.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698