OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |