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

Side by Side Diff: chrome/browser/extensions/script_bubble_controller_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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 21 matching lines...) Expand all
32 #endif 32 #endif
33 33
34 using content::BrowserThread; 34 using content::BrowserThread;
35 35
36 namespace extensions { 36 namespace extensions {
37 namespace { 37 namespace {
38 38
39 class ScriptBubbleControllerTest : public ChromeRenderViewHostTestHarness { 39 class ScriptBubbleControllerTest : public ChromeRenderViewHostTestHarness {
40 public: 40 public:
41 ScriptBubbleControllerTest() 41 ScriptBubbleControllerTest()
42 : ui_thread_(BrowserThread::UI, MessageLoop::current()), 42 : ui_thread_(BrowserThread::UI, base::MessageLoop::current()),
43 file_thread_(BrowserThread::FILE, MessageLoop::current()), 43 file_thread_(BrowserThread::FILE, base::MessageLoop::current()),
44 enable_script_bubble_(FeatureSwitch::script_bubble(), true) { 44 enable_script_bubble_(FeatureSwitch::script_bubble(), true) {
45 } 45 }
46 46
47 virtual void SetUp() OVERRIDE { 47 virtual void SetUp() OVERRIDE {
48 ChromeRenderViewHostTestHarness::SetUp(); 48 ChromeRenderViewHostTestHarness::SetUp();
49 CommandLine command_line(CommandLine::NO_PROGRAM); 49 CommandLine command_line(CommandLine::NO_PROGRAM);
50 Profile* profile = 50 Profile* profile =
51 Profile::FromBrowserContext(web_contents()->GetBrowserContext()); 51 Profile::FromBrowserContext(web_contents()->GetBrowserContext());
52 extension_service_ = static_cast<TestExtensionSystem*>( 52 extension_service_ = static_cast<TestExtensionSystem*>(
53 ExtensionSystem::Get(profile))->CreateExtensionService( 53 ExtensionSystem::Get(profile))->CreateExtensionService(
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 web_contents(), executing_scripts, 0, GURL()); 181 web_contents(), executing_scripts, 0, GURL());
182 EXPECT_EQ(3u, script_bubble_controller_->extensions_running_scripts().size()); 182 EXPECT_EQ(3u, script_bubble_controller_->extensions_running_scripts().size());
183 183
184 // Navigating away resets the badge. 184 // Navigating away resets the badge.
185 NavigateAndCommit(GURL("http://www.google.com")); 185 NavigateAndCommit(GURL("http://www.google.com"));
186 EXPECT_EQ(0u, script_bubble_controller_->extensions_running_scripts().size()); 186 EXPECT_EQ(0u, script_bubble_controller_->extensions_running_scripts().size());
187 }; 187 };
188 188
189 } // namespace 189 } // namespace
190 } // namespace extensions 190 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698