| 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/extension_action_manager.h" | 5 #include "chrome/browser/extensions/extension_action_manager.h" |
| 6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
| 7 #include "chrome/browser/extensions/extension_tab_util.h" | 7 #include "chrome/browser/extensions/extension_tab_util.h" |
| 8 #include "chrome/browser/extensions/test_extension_dir.h" | 8 #include "chrome/browser/extensions/test_extension_dir.h" |
| 9 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 9 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 10 #include "chrome/common/extensions/features/feature_channel.h" | 10 #include "chrome/common/extensions/features/feature_channel.h" |
| 11 #include "components/version_info/version_info.h" |
| 11 #include "extensions/test/extension_test_message_listener.h" | 12 #include "extensions/test/extension_test_message_listener.h" |
| 12 #include "ui/gfx/image/image.h" | 13 #include "ui/gfx/image/image.h" |
| 13 | 14 |
| 14 namespace extensions { | 15 namespace extensions { |
| 15 namespace { | 16 namespace { |
| 16 | 17 |
| 17 const char kDeclarativeContentManifest[] = | 18 const char kDeclarativeContentManifest[] = |
| 18 "{\n" | 19 "{\n" |
| 19 " \"name\": \"Declarative Content apitest\",\n" | 20 " \"name\": \"Declarative Content apitest\",\n" |
| 20 " \"version\": \"0.1\",\n" | 21 " \"version\": \"0.1\",\n" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 EXPECT_TRUE(page_action->GetDeclarativeIcon(tab_id).IsEmpty()); | 88 EXPECT_TRUE(page_action->GetDeclarativeIcon(tab_id).IsEmpty()); |
| 88 NavigateInRenderer(tab, GURL("http://test1/")); | 89 NavigateInRenderer(tab, GURL("http://test1/")); |
| 89 EXPECT_FALSE(page_action->GetDeclarativeIcon(tab_id).IsEmpty()); | 90 EXPECT_FALSE(page_action->GetDeclarativeIcon(tab_id).IsEmpty()); |
| 90 | 91 |
| 91 // Navigating to an unmatched page should reset the icon. | 92 // Navigating to an unmatched page should reset the icon. |
| 92 NavigateInRenderer(tab, GURL("http://test2/")); | 93 NavigateInRenderer(tab, GURL("http://test2/")); |
| 93 EXPECT_TRUE(page_action->GetDeclarativeIcon(tab_id).IsEmpty()); | 94 EXPECT_TRUE(page_action->GetDeclarativeIcon(tab_id).IsEmpty()); |
| 94 } | 95 } |
| 95 } // namespace | 96 } // namespace |
| 96 } // namespace extensions | 97 } // namespace extensions |
| OLD | NEW |