| 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" |
| 11 #include "chrome/browser/extensions/location_bar_controller.h" | 11 #include "chrome/browser/extensions/location_bar_controller.h" |
| 12 #include "chrome/browser/extensions/tab_helper.h" | 12 #include "chrome/browser/extensions/tab_helper.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
| 17 #include "chrome/common/extensions/extension.h" | 17 #include "chrome/common/extensions/extension.h" |
| 18 #include "chrome/common/extensions/features/feature.h" | 18 #include "chrome/common/extensions/features/feature.h" |
| 19 #include "chrome/test/base/ui_test_utils.h" | 19 #include "chrome/test/base/ui_test_utils.h" |
| 20 #include "content/public/browser/web_contents.h" | 20 #include "content/public/browser/web_contents.h" |
| 21 #include "net/dns/mock_host_resolver.h" | 21 #include "net/dns/mock_host_resolver.h" |
| 22 #include "net/test/spawned_test_server.h" | 22 #include "net/test/spawned_test_server/spawned_test_server.h" |
| 23 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
| 24 | 24 |
| 25 namespace extensions { | 25 namespace extensions { |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 class ScriptBadgeApiTest : public ExtensionApiTest { | 28 class ScriptBadgeApiTest : public ExtensionApiTest { |
| 29 public: | 29 public: |
| 30 ScriptBadgeApiTest() : trunk_(chrome::VersionInfo::CHANNEL_UNKNOWN) {} | 30 ScriptBadgeApiTest() : trunk_(chrome::VersionInfo::CHANNEL_UNKNOWN) {} |
| 31 | 31 |
| 32 protected: | 32 protected: |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 test_server()->GetURL(std::string())); | 92 test_server()->GetURL(std::string())); |
| 93 ASSERT_TRUE(catcher.GetNextResult()); | 93 ASSERT_TRUE(catcher.GetNextResult()); |
| 94 } | 94 } |
| 95 EXPECT_TRUE(script_badge->GetIsVisible(tab_id)); | 95 EXPECT_TRUE(script_badge->GetIsVisible(tab_id)); |
| 96 EXPECT_THAT(location_bar_controller->GetCurrentActions(), | 96 EXPECT_THAT(location_bar_controller->GetCurrentActions(), |
| 97 testing::ElementsAre(script_badge)); | 97 testing::ElementsAre(script_badge)); |
| 98 } | 98 } |
| 99 | 99 |
| 100 } // namespace | 100 } // namespace |
| 101 } // namespace extensions | 101 } // namespace extensions |
| OLD | NEW |