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_action.h" |
7 #include "chrome/browser/extensions/extension_action_manager.h" | 7 #include "chrome/browser/extensions/extension_action_manager.h" |
8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 browser()->profile())->extension_service(); | 81 browser()->profile())->extension_service(); |
82 service->browser_event_router()->ScriptBadgeExecuted( | 82 service->browser_event_router()->ScriptBadgeExecuted( |
83 browser()->profile(), *script_badge, tab_id); | 83 browser()->profile(), *script_badge, tab_id); |
84 EXPECT_TRUE(catcher.GetNextResult()); | 84 EXPECT_TRUE(catcher.GetNextResult()); |
85 } | 85 } |
86 | 86 |
87 { | 87 { |
88 ResultCatcher catcher; | 88 ResultCatcher catcher; |
89 // Visit a non-extension page so the extension can run a content script and | 89 // Visit a non-extension page so the extension can run a content script and |
90 // cause the script badge to be animated in. | 90 // cause the script badge to be animated in. |
91 ui_test_utils::NavigateToURL(browser(), test_server()->GetURL("")); | 91 ui_test_utils::NavigateToURL(browser(), |
| 92 test_server()->GetURL(std::string())); |
92 ASSERT_TRUE(catcher.GetNextResult()); | 93 ASSERT_TRUE(catcher.GetNextResult()); |
93 } | 94 } |
94 EXPECT_TRUE(script_badge->GetIsVisible(tab_id)); | 95 EXPECT_TRUE(script_badge->GetIsVisible(tab_id)); |
95 EXPECT_THAT(location_bar_controller->GetCurrentActions(), | 96 EXPECT_THAT(location_bar_controller->GetCurrentActions(), |
96 testing::ElementsAre(script_badge)); | 97 testing::ElementsAre(script_badge)); |
97 } | 98 } |
98 | 99 |
99 } // namespace | 100 } // namespace |
100 } // namespace extensions | 101 } // namespace extensions |
OLD | NEW |