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

Side by Side Diff: chrome/browser/extensions/api/declarative/rules_registry_service_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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 "chrome/browser/extensions/api/declarative/rules_registry_service.h" 5 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/extensions/api/declarative/test_rules_registry.h" 9 #include "chrome/browser/extensions/api/declarative/test_rules_registry.h"
10 #include "content/public/test/test_browser_thread.h" 10 #include "content/public/test/test_browser_thread.h"
(...skipping 29 matching lines...) Expand all
40 io(content::BrowserThread::IO, &message_loop) {} 40 io(content::BrowserThread::IO, &message_loop) {}
41 41
42 virtual ~RulesRegistryServiceTest() {} 42 virtual ~RulesRegistryServiceTest() {}
43 43
44 virtual void TearDown() OVERRIDE { 44 virtual void TearDown() OVERRIDE {
45 // Make sure that deletion traits of all registries are executed. 45 // Make sure that deletion traits of all registries are executed.
46 message_loop.RunUntilIdle(); 46 message_loop.RunUntilIdle();
47 } 47 }
48 48
49 protected: 49 protected:
50 MessageLoop message_loop; 50 base::MessageLoop message_loop;
51 content::TestBrowserThread ui; 51 content::TestBrowserThread ui;
52 content::TestBrowserThread io; 52 content::TestBrowserThread io;
53 }; 53 };
54 54
55 TEST_F(RulesRegistryServiceTest, TestConstructionAndMultiThreading) { 55 TEST_F(RulesRegistryServiceTest, TestConstructionAndMultiThreading) {
56 TestRulesRegistry* ui_registry = 56 TestRulesRegistry* ui_registry =
57 new TestRulesRegistry(content::BrowserThread::UI, "ui"); 57 new TestRulesRegistry(content::BrowserThread::UI, "ui");
58 58
59 TestRulesRegistry* io_registry = 59 TestRulesRegistry* io_registry =
60 new TestRulesRegistry(content::BrowserThread::IO, "io"); 60 new TestRulesRegistry(content::BrowserThread::IO, "io");
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 content::BrowserThread::PostTask( 103 content::BrowserThread::PostTask(
104 content::BrowserThread::IO, FROM_HERE, 104 content::BrowserThread::IO, FROM_HERE,
105 base::Bind(&VerifyNumberOfRules, 105 base::Bind(&VerifyNumberOfRules,
106 registry_service.GetRulesRegistry("io"), 0)); 106 registry_service.GetRulesRegistry("io"), 0));
107 107
108 message_loop.RunUntilIdle(); 108 message_loop.RunUntilIdle();
109 } 109 }
110 110
111 } // namespace extensions 111 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698