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

Side by Side Diff: sync/internal_api/sync_encryption_handler_impl_unittest.cc

Issue 14113050: sync: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "sync/internal_api/sync_encryption_handler_impl.h" 5 #include "sync/internal_api/sync_encryption_handler_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/json/json_string_value_serializer.h" 10 #include "base/json/json_string_value_serializer.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 EXPECT_FALSE(encryption_handler()->EncryptEverythingEnabled()); 330 EXPECT_FALSE(encryption_handler()->EncryptEverythingEnabled());
331 Mock::VerifyAndClearExpectations(observer()); 331 Mock::VerifyAndClearExpectations(observer());
332 } 332 }
333 333
334 protected: 334 protected:
335 TestUserShare test_user_share_; 335 TestUserShare test_user_share_;
336 FakeEncryptor encryptor_; 336 FakeEncryptor encryptor_;
337 scoped_ptr<SyncEncryptionHandlerImpl> encryption_handler_; 337 scoped_ptr<SyncEncryptionHandlerImpl> encryption_handler_;
338 StrictMock<SyncEncryptionHandlerObserverMock> observer_; 338 StrictMock<SyncEncryptionHandlerObserverMock> observer_;
339 TestIdFactory ids_; 339 TestIdFactory ids_;
340 MessageLoop message_loop_; 340 base::MessageLoop message_loop_;
341 }; 341 };
342 342
343 // Verify that the encrypted types are being written to and read from the 343 // Verify that the encrypted types are being written to and read from the
344 // nigori node properly. 344 // nigori node properly.
345 TEST_F(SyncEncryptionHandlerImplTest, NigoriEncryptionTypes) { 345 TEST_F(SyncEncryptionHandlerImplTest, NigoriEncryptionTypes) {
346 sync_pb::NigoriSpecifics nigori; 346 sync_pb::NigoriSpecifics nigori;
347 347
348 StrictMock<SyncEncryptionHandlerObserverMock> observer2; 348 StrictMock<SyncEncryptionHandlerObserverMock> observer2;
349 SyncEncryptionHandlerImpl handler2(user_share(), 349 SyncEncryptionHandlerImpl handler2(user_share(),
350 &encryptor_, 350 &encryptor_,
(...skipping 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after
2273 encryption_handler()->SetKeystoreKeys(keys, 2273 encryption_handler()->SetKeystoreKeys(keys,
2274 trans.GetWrappedTrans()); 2274 trans.GetWrappedTrans());
2275 } 2275 }
2276 PumpLoop(); 2276 PumpLoop();
2277 Mock::VerifyAndClearExpectations(observer()); 2277 Mock::VerifyAndClearExpectations(observer());
2278 2278
2279 VerifyMigratedNigoriWithTimestamp(1, CUSTOM_PASSPHRASE, kCustomPass); 2279 VerifyMigratedNigoriWithTimestamp(1, CUSTOM_PASSPHRASE, kCustomPass);
2280 } 2280 }
2281 2281
2282 } // namespace syncer 2282 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/sync_encryption_handler_impl.cc ('k') | sync/internal_api/sync_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698