| 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_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
| 7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
| 8 #include "chrome/browser/extensions/extension_tab_util.h" | 8 #include "chrome/browser/extensions/extension_tab_util.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/sessions/restore_tab_helper.h" | 10 #include "chrome/browser/sessions/restore_tab_helper.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 ASSERT_TRUE(catcher.GetNextResult()); | 138 ASSERT_TRUE(catcher.GetNextResult()); |
| 139 } | 139 } |
| 140 | 140 |
| 141 ASSERT_FALSE(page_action->HasPopup(tab_id)) | 141 ASSERT_FALSE(page_action->HasPopup(tab_id)) |
| 142 << "Page action popup should have been removed."; | 142 << "Page action popup should have been removed."; |
| 143 } | 143 } |
| 144 | 144 |
| 145 // Tests old-style pageActions API that is deprecated but we don't want to | 145 // Tests old-style pageActions API that is deprecated but we don't want to |
| 146 // break. | 146 // break. |
| 147 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OldPageActions) { | 147 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OldPageActions) { |
| 148 ASSERT_TRUE(RunExtensionTest("page_action/old_api")) << message_; | 148 ASSERT_TRUE(RunExtensionTestIgnoreManifestWarnings("page_action/old_api")) << |
| 149 message_; |
| 149 const Extension* extension = GetSingleLoadedExtension(); | 150 const Extension* extension = GetSingleLoadedExtension(); |
| 150 ASSERT_TRUE(extension) << message_; | 151 ASSERT_TRUE(extension) << message_; |
| 151 | 152 |
| 152 // Have the extension enable the page action. | 153 // Have the extension enable the page action. |
| 153 { | 154 { |
| 154 ResultCatcher catcher; | 155 ResultCatcher catcher; |
| 155 ui_test_utils::NavigateToURL(browser(), | 156 ui_test_utils::NavigateToURL(browser(), |
| 156 GURL(extension->GetResourceURL("page.html"))); | 157 GURL(extension->GetResourceURL("page.html"))); |
| 157 ASSERT_TRUE(catcher.GetNextResult()); | 158 ASSERT_TRUE(catcher.GetNextResult()); |
| 158 } | 159 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Getters) { | 204 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Getters) { |
| 204 ASSERT_TRUE(RunExtensionTest("page_action/getters")) << message_; | 205 ASSERT_TRUE(RunExtensionTest("page_action/getters")) << message_; |
| 205 const Extension* extension = GetSingleLoadedExtension(); | 206 const Extension* extension = GetSingleLoadedExtension(); |
| 206 ASSERT_TRUE(extension) << message_; | 207 ASSERT_TRUE(extension) << message_; |
| 207 | 208 |
| 208 ResultCatcher catcher; | 209 ResultCatcher catcher; |
| 209 ui_test_utils::NavigateToURL(browser(), | 210 ui_test_utils::NavigateToURL(browser(), |
| 210 GURL(extension->GetResourceURL("update.html"))); | 211 GURL(extension->GetResourceURL("update.html"))); |
| 211 ASSERT_TRUE(catcher.GetNextResult()); | 212 ASSERT_TRUE(catcher.GetNextResult()); |
| 212 } | 213 } |
| OLD | NEW |