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

Side by Side Diff: chrome/browser/extensions/extensions_quota_service_unittest.cc

Issue 11413050: chrome/browser: Update calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/process.h" 6 #include "base/process.h"
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/browser/extensions/extension_function.h" 9 #include "chrome/browser/extensions/extension_function.h"
10 #include "chrome/browser/extensions/extensions_quota_service.h" 10 #include "chrome/browser/extensions/extensions_quota_service.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 : extension_a_("a"), 122 : extension_a_("a"),
123 extension_b_("b"), 123 extension_b_("b"),
124 extension_c_("c"), 124 extension_c_("c"),
125 loop_(), 125 loop_(),
126 ui_thread_(BrowserThread::UI, &loop_) { 126 ui_thread_(BrowserThread::UI, &loop_) {
127 } 127 }
128 virtual void SetUp() { 128 virtual void SetUp() {
129 service_.reset(new ExtensionsQuotaService()); 129 service_.reset(new ExtensionsQuotaService());
130 } 130 }
131 virtual void TearDown() { 131 virtual void TearDown() {
132 loop_.RunAllPending(); 132 loop_.RunUntilIdle();
133 service_.reset(); 133 service_.reset();
134 } 134 }
135 protected: 135 protected:
136 std::string extension_a_; 136 std::string extension_a_;
137 std::string extension_b_; 137 std::string extension_b_;
138 std::string extension_c_; 138 std::string extension_c_;
139 scoped_ptr<ExtensionsQuotaService> service_; 139 scoped_ptr<ExtensionsQuotaService> service_;
140 MessageLoop loop_; 140 MessageLoop loop_;
141 content::TestBrowserThread ui_thread_; 141 content::TestBrowserThread ui_thread_;
142 }; 142 };
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 EXPECT_NE("", service_->Assess(extension_a_, f, &arg, 333 EXPECT_NE("", service_->Assess(extension_a_, f, &arg,
334 kStartTime + TimeDelta::FromSeconds(15))); 334 kStartTime + TimeDelta::FromSeconds(15)));
335 335
336 // We don't allow this extension to use quota limited functions even if they 336 // We don't allow this extension to use quota limited functions even if they
337 // wait a while. 337 // wait a while.
338 EXPECT_NE("", service_->Assess(extension_a_, f, &arg, 338 EXPECT_NE("", service_->Assess(extension_a_, f, &arg,
339 kStartTime + TimeDelta::FromDays(1))); 339 kStartTime + TimeDelta::FromDays(1)));
340 EXPECT_NE("", service_->Assess(extension_a_, g, &arg, 340 EXPECT_NE("", service_->Assess(extension_a_, g, &arg,
341 kStartTime + TimeDelta::FromDays(1))); 341 kStartTime + TimeDelta::FromDays(1)));
342 } 342 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_ui_unittest.cc ('k') | chrome/browser/extensions/sandboxed_unpacker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698