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

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

Issue 10825085: Move RunAllPendingInMessageLoop from ui_test_utils.h to test_utils.h, so that it can be reused by c… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h" 9 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h"
10 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_consta nts.h" 10 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_consta nts.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 extensions::declarative_webrequest_constants::kOnRequest); 52 extensions::declarative_webrequest_constants::kOnRequest);
53 53
54 std::vector<linked_ptr<RulesRegistry::Rule> > known_rules; 54 std::vector<linked_ptr<RulesRegistry::Rule> > known_rules;
55 55
56 content::BrowserThread::PostTask( 56 content::BrowserThread::PostTask(
57 rules_registry->GetOwnerThread(), 57 rules_registry->GetOwnerThread(),
58 FROM_HERE, 58 FROM_HERE,
59 base::Bind(base::IgnoreResult(&RulesRegistry::GetAllRules), 59 base::Bind(base::IgnoreResult(&RulesRegistry::GetAllRules),
60 rules_registry, extension_id, &known_rules)); 60 rules_registry, extension_id, &known_rules));
61 61
62 ui_test_utils::RunAllPendingInMessageLoop(rules_registry->GetOwnerThread()); 62 content::RunAllPendingInMessageLoop(rules_registry->GetOwnerThread());
63 63
64 EXPECT_TRUE(known_rules.empty()); 64 EXPECT_TRUE(known_rules.empty());
65 } 65 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698