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

Side by Side Diff: sync/internal_api/js_sync_encryption_handler_observer_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 (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 "sync/internal_api/js_sync_encryption_handler_observer.h" 5 #include "sync/internal_api/js_sync_encryption_handler_observer.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 16 matching lines...) Expand all
27 class JsSyncEncryptionHandlerObserverTest : public testing::Test { 27 class JsSyncEncryptionHandlerObserverTest : public testing::Test {
28 protected: 28 protected:
29 JsSyncEncryptionHandlerObserverTest() { 29 JsSyncEncryptionHandlerObserverTest() {
30 js_sync_encryption_handler_observer_.SetJsEventHandler( 30 js_sync_encryption_handler_observer_.SetJsEventHandler(
31 mock_js_event_handler_.AsWeakHandle()); 31 mock_js_event_handler_.AsWeakHandle());
32 } 32 }
33 33
34 private: 34 private:
35 // This must be destroyed after the member variables below in order 35 // This must be destroyed after the member variables below in order
36 // for WeakHandles to be destroyed properly. 36 // for WeakHandles to be destroyed properly.
37 MessageLoop message_loop_; 37 base::MessageLoop message_loop_;
38 38
39 protected: 39 protected:
40 StrictMock<MockJsEventHandler> mock_js_event_handler_; 40 StrictMock<MockJsEventHandler> mock_js_event_handler_;
41 JsSyncEncryptionHandlerObserver js_sync_encryption_handler_observer_; 41 JsSyncEncryptionHandlerObserver js_sync_encryption_handler_observer_;
42 42
43 void PumpLoop() { 43 void PumpLoop() {
44 message_loop_.RunUntilIdle(); 44 message_loop_.RunUntilIdle();
45 } 45 }
46 }; 46 };
47 47
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 HandleJsEvent("onPassphraseTypeChanged", 164 HandleJsEvent("onPassphraseTypeChanged",
165 HasDetailsAsDictionary(passphrase_type_details))); 165 HasDetailsAsDictionary(passphrase_type_details)));
166 166
167 js_sync_encryption_handler_observer_.OnPassphraseTypeChanged( 167 js_sync_encryption_handler_observer_.OnPassphraseTypeChanged(
168 IMPLICIT_PASSPHRASE, ProtoTimeToTime(10)); 168 IMPLICIT_PASSPHRASE, ProtoTimeToTime(10));
169 PumpLoop(); 169 PumpLoop();
170 } 170 }
171 171
172 } // namespace 172 } // namespace
173 } // namespace syncer 173 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/js_mutation_event_observer_unittest.cc ('k') | sync/internal_api/js_sync_manager_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698