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

Side by Side Diff: chrome/browser/extensions/extension_action_icon_factory_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 "chrome/browser/extensions/extension_action_icon_factory.h" 5 #include "chrome/browser/extensions/extension_action_icon_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/json/json_file_value_serializer.h" 9 #include "base/json/json_file_value_serializer.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 io_thread_.Start(); 132 io_thread_.Start();
133 profile_.reset(new TestingProfile); 133 profile_.reset(new TestingProfile);
134 CommandLine command_line(CommandLine::NO_PROGRAM); 134 CommandLine command_line(CommandLine::NO_PROGRAM);
135 extension_service_ = static_cast<extensions::TestExtensionSystem*>( 135 extension_service_ = static_cast<extensions::TestExtensionSystem*>(
136 extensions::ExtensionSystem::Get(profile_.get()))-> 136 extensions::ExtensionSystem::Get(profile_.get()))->
137 CreateExtensionService(&command_line, FilePath(), false); 137 CreateExtensionService(&command_line, FilePath(), false);
138 } 138 }
139 139
140 virtual void TearDown() OVERRIDE { 140 virtual void TearDown() OVERRIDE {
141 profile_.reset(); // Get all DeleteSoon calls sent to ui_loop_. 141 profile_.reset(); // Get all DeleteSoon calls sent to ui_loop_.
142 ui_loop_.RunAllPending(); 142 ui_loop_.RunUntilIdle();
143 } 143 }
144 144
145 // ExtensionActionIconFactory::Observer overrides: 145 // ExtensionActionIconFactory::Observer overrides:
146 virtual void OnIconUpdated() OVERRIDE { 146 virtual void OnIconUpdated() OVERRIDE {
147 if (quit_in_icon_updated_) 147 if (quit_in_icon_updated_)
148 MessageLoop::current()->Quit(); 148 MessageLoop::current()->Quit();
149 } 149 }
150 150
151 gfx::ImageSkia GetFavicon() { 151 gfx::ImageSkia GetFavicon() {
152 return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( 152 return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 icon = icon_factory.GetIcon(1); 279 icon = icon_factory.GetIcon(1);
280 280
281 EXPECT_TRUE(ImageRepsAreEqual( 281 EXPECT_TRUE(ImageRepsAreEqual(
282 default_icon.ToImageSkia()->GetRepresentation(ui::SCALE_FACTOR_100P), 282 default_icon.ToImageSkia()->GetRepresentation(ui::SCALE_FACTOR_100P),
283 icon.ToImageSkia()->GetRepresentation(ui::SCALE_FACTOR_100P))); 283 icon.ToImageSkia()->GetRepresentation(ui::SCALE_FACTOR_100P)));
284 284
285 } 285 }
286 286
287 } // namespace 287 } // namespace
288 } // namespace extensions 288 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698