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 "chrome/browser/extensions/browser_event_router.h" | 5 #include "chrome/browser/extensions/browser_event_router.h" |
| 6 #include "chrome/browser/extensions/extension_action.h" |
6 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
7 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
8 #include "chrome/browser/extensions/location_bar_controller.h" | 9 #include "chrome/browser/extensions/location_bar_controller.h" |
9 #include "chrome/browser/extensions/tab_helper.h" | 10 #include "chrome/browser/extensions/tab_helper.h" |
10 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
12 #include "chrome/browser/ui/browser_tabstrip.h" | 13 #include "chrome/browser/ui/browser_tabstrip.h" |
13 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 14 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
14 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
15 #include "chrome/common/extensions/extension.h" | 16 #include "chrome/common/extensions/extension.h" |
16 #include "chrome/common/extensions/extension_action.h" | |
17 #include "chrome/common/extensions/features/feature.h" | 17 #include "chrome/common/extensions/features/feature.h" |
18 #include "chrome/test/base/ui_test_utils.h" | 18 #include "chrome/test/base/ui_test_utils.h" |
19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
20 #include "net/base/mock_host_resolver.h" | 20 #include "net/base/mock_host_resolver.h" |
21 #include "net/test/test_server.h" | 21 #include "net/test/test_server.h" |
22 #include "testing/gmock/include/gmock/gmock.h" | 22 #include "testing/gmock/include/gmock/gmock.h" |
23 | 23 |
24 using extensions::Extension; | 24 using extensions::Extension; |
25 | 25 |
26 class ScriptBadgeApiTest : public ExtensionApiTest { | 26 class ScriptBadgeApiTest : public ExtensionApiTest { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 ResultCatcher catcher; | 82 ResultCatcher catcher; |
83 // Visit a non-extension page so the extension can run a content script and | 83 // Visit a non-extension page so the extension can run a content script and |
84 // cause the script badge to be animated in. | 84 // cause the script badge to be animated in. |
85 ui_test_utils::NavigateToURL(browser(), test_server()->GetURL("")); | 85 ui_test_utils::NavigateToURL(browser(), test_server()->GetURL("")); |
86 ASSERT_TRUE(catcher.GetNextResult()); | 86 ASSERT_TRUE(catcher.GetNextResult()); |
87 } | 87 } |
88 EXPECT_TRUE(script_badge->GetIsVisible(tab_id)); | 88 EXPECT_TRUE(script_badge->GetIsVisible(tab_id)); |
89 EXPECT_THAT(location_bar_controller->GetCurrentActions(), | 89 EXPECT_THAT(location_bar_controller->GetCurrentActions(), |
90 testing::ElementsAre(script_badge)); | 90 testing::ElementsAre(script_badge)); |
91 } | 91 } |
OLD | NEW |