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/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 "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 using content::BrowserThread; | 40 using content::BrowserThread; |
41 | 41 |
42 namespace extensions { | 42 namespace extensions { |
43 namespace { | 43 namespace { |
44 | 44 |
45 class ScriptBadgeControllerTest : public ChromeRenderViewHostTestHarness { | 45 class ScriptBadgeControllerTest : public ChromeRenderViewHostTestHarness { |
46 public: | 46 public: |
47 ScriptBadgeControllerTest() | 47 ScriptBadgeControllerTest() |
48 : feature_override_(FeatureSwitch::script_badges(), true), | 48 : feature_override_(FeatureSwitch::script_badges(), true), |
49 ui_thread_(BrowserThread::UI, MessageLoop::current()), | 49 ui_thread_(BrowserThread::UI, base::MessageLoop::current()), |
50 file_thread_(BrowserThread::FILE, MessageLoop::current()), | 50 file_thread_(BrowserThread::FILE, base::MessageLoop::current()), |
51 current_channel_(chrome::VersionInfo::CHANNEL_DEV) {} | 51 current_channel_(chrome::VersionInfo::CHANNEL_DEV) {} |
52 | 52 |
53 virtual void SetUp() OVERRIDE { | 53 virtual void SetUp() OVERRIDE { |
54 // Note that this sets a PageActionController into the | 54 // Note that this sets a PageActionController into the |
55 // extensions::TabHelper's location_bar_controller field. Do | 55 // extensions::TabHelper's location_bar_controller field. Do |
56 // not use that for testing. | 56 // not use that for testing. |
57 ChromeRenderViewHostTestHarness::SetUp(); | 57 ChromeRenderViewHostTestHarness::SetUp(); |
58 | 58 |
59 Profile* profile = | 59 Profile* profile = |
60 Profile::FromBrowserContext(web_contents()->GetBrowserContext()); | 60 Profile::FromBrowserContext(web_contents()->GetBrowserContext()); |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 // Getting attention a second time should have no effect. | 263 // Getting attention a second time should have no effect. |
264 script_badge_controller_->GetAttentionFor(extension->id()); | 264 script_badge_controller_->GetAttentionFor(extension->id()); |
265 | 265 |
266 EXPECT_THAT(script_badge_controller_->GetCurrentActions(), | 266 EXPECT_THAT(script_badge_controller_->GetCurrentActions(), |
267 testing::ElementsAre(GetScriptBadge(*extension))); | 267 testing::ElementsAre(GetScriptBadge(*extension))); |
268 EXPECT_EQ(0, subsequent_get_attention_call.events); | 268 EXPECT_EQ(0, subsequent_get_attention_call.events); |
269 }; | 269 }; |
270 | 270 |
271 } // namespace | 271 } // namespace |
272 } // namespace extensions | 272 } // namespace extensions |
OLD | NEW |