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

Side by Side Diff: sync/internal_api/js_mutation_event_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_mutation_event_observer.h" 5 #include "sync/internal_api/js_mutation_event_observer.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "sync/internal_api/public/base/model_type.h" 10 #include "sync/internal_api/public/base/model_type.h"
(...skipping 11 matching lines...) Expand all
22 class JsMutationEventObserverTest : public testing::Test { 22 class JsMutationEventObserverTest : public testing::Test {
23 protected: 23 protected:
24 JsMutationEventObserverTest() { 24 JsMutationEventObserverTest() {
25 js_mutation_event_observer_.SetJsEventHandler( 25 js_mutation_event_observer_.SetJsEventHandler(
26 mock_js_event_handler_.AsWeakHandle()); 26 mock_js_event_handler_.AsWeakHandle());
27 } 27 }
28 28
29 private: 29 private:
30 // This must be destroyed after the member variables below in order 30 // This must be destroyed after the member variables below in order
31 // for WeakHandles to be destroyed properly. 31 // for WeakHandles to be destroyed properly.
32 MessageLoop message_loop_; 32 base::MessageLoop message_loop_;
33 33
34 protected: 34 protected:
35 StrictMock<MockJsEventHandler> mock_js_event_handler_; 35 StrictMock<MockJsEventHandler> mock_js_event_handler_;
36 JsMutationEventObserver js_mutation_event_observer_; 36 JsMutationEventObserver js_mutation_event_observer_;
37 37
38 void PumpLoop() { 38 void PumpLoop() {
39 message_loop_.RunUntilIdle(); 39 message_loop_.RunUntilIdle();
40 } 40 }
41 }; 41 };
42 42
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; ++i) { 110 for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; ++i) {
111 js_mutation_event_observer_.OnChangesComplete( 111 js_mutation_event_observer_.OnChangesComplete(
112 ModelTypeFromInt(i)); 112 ModelTypeFromInt(i));
113 } 113 }
114 PumpLoop(); 114 PumpLoop();
115 } 115 }
116 116
117 } // namespace 117 } // namespace
118 } // namespace syncer 118 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/http_bridge_unittest.cc ('k') | sync/internal_api/js_sync_encryption_handler_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698