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

Side by Side Diff: chrome/browser/extensions/page_action_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/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/extensions/extension_action.h" 10 #include "chrome/browser/extensions/extension_action.h"
(...skipping 18 matching lines...) Expand all
29 #endif 29 #endif
30 30
31 using content::BrowserThread; 31 using content::BrowserThread;
32 32
33 namespace extensions { 33 namespace extensions {
34 namespace { 34 namespace {
35 35
36 class PageActionControllerTest : public ChromeRenderViewHostTestHarness { 36 class PageActionControllerTest : public ChromeRenderViewHostTestHarness {
37 public: 37 public:
38 PageActionControllerTest() 38 PageActionControllerTest()
39 : ui_thread_(BrowserThread::UI, MessageLoop::current()), 39 : ui_thread_(BrowserThread::UI, base::MessageLoop::current()),
40 file_thread_(BrowserThread::FILE, MessageLoop::current()) {} 40 file_thread_(BrowserThread::FILE, base::MessageLoop::current()) {}
41 41
42 virtual void SetUp() OVERRIDE { 42 virtual void SetUp() OVERRIDE {
43 ChromeRenderViewHostTestHarness::SetUp(); 43 ChromeRenderViewHostTestHarness::SetUp();
44 TabHelper::CreateForWebContents(web_contents()); 44 TabHelper::CreateForWebContents(web_contents());
45 // Create an ExtensionService so the PageActionController can find its 45 // Create an ExtensionService so the PageActionController can find its
46 // extensions. 46 // extensions.
47 CommandLine command_line(CommandLine::NO_PROGRAM); 47 CommandLine command_line(CommandLine::NO_PROGRAM);
48 Profile* profile = 48 Profile* profile =
49 Profile::FromBrowserContext(web_contents()->GetBrowserContext()); 49 Profile::FromBrowserContext(web_contents()->GetBrowserContext());
50 extension_service_ = static_cast<TestExtensionSystem*>( 50 extension_service_ = static_cast<TestExtensionSystem*>(
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 // Should discard the settings, and go back to the defaults. 106 // Should discard the settings, and go back to the defaults.
107 NavigateAndCommit(GURL("http://www.yahoo.com")); 107 NavigateAndCommit(GURL("http://www.yahoo.com"));
108 108
109 EXPECT_EQ("Hello", page_action.GetTitle(tab_id())); 109 EXPECT_EQ("Hello", page_action.GetTitle(tab_id()));
110 EXPECT_EQ(GURL(), page_action.GetPopupUrl(tab_id())); 110 EXPECT_EQ(GURL(), page_action.GetPopupUrl(tab_id()));
111 }; 111 };
112 112
113 } // namespace 113 } // namespace
114 } // namespace extensions 114 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/pack_extension_unittest.cc ('k') | chrome/browser/extensions/permissions_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698