| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/ref_counted.h" | 5 #include "base/ref_counted.h" |
| 6 #include "chrome/browser/browser.h" | 6 #include "chrome/browser/browser.h" |
| 7 #include "chrome/browser/browser_list.h" | 7 #include "chrome/browser/browser_list.h" |
| 8 #include "chrome/browser/renderer_host/render_view_host.h" | 8 #include "chrome/browser/renderer_host/render_view_host.h" |
| 9 #include "chrome/browser/extensions/autoupdate_interceptor.h" | 9 #include "chrome/browser/extensions/autoupdate_interceptor.h" |
| 10 #include "chrome/browser/extensions/extension_browsertest.h" | 10 #include "chrome/browser/extensions/extension_browsertest.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 result = false; | 200 result = false; |
| 201 ui_test_utils::ExecuteJavaScriptAndExtractBool( | 201 ui_test_utils::ExecuteJavaScriptAndExtractBool( |
| 202 browser()->GetSelectedTabContents()->render_view_host(), L"", | 202 browser()->GetSelectedTabContents()->render_view_host(), L"", |
| 203 L"testTabsAPI()", &result); | 203 L"testTabsAPI()", &result); |
| 204 EXPECT_TRUE(result); | 204 EXPECT_TRUE(result); |
| 205 } | 205 } |
| 206 | 206 |
| 207 #if defined(OS_WIN) || defined(OS_LINUX) | 207 #if defined(OS_WIN) || defined(OS_LINUX) |
| 208 // Tests that we can load page actions in the Omnibox. | 208 // Tests that we can load page actions in the Omnibox. |
| 209 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PageAction) { | 209 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PageAction) { |
| 210 // This page action will not show an icon, since it doesn't specify one but | |
| 211 // is included here to test for a crash (http://crbug.com/25562). | |
| 212 ASSERT_TRUE(LoadExtension( | |
| 213 test_data_dir_.AppendASCII("browsertest") | |
| 214 .AppendASCII("crash_25562"))); | |
| 215 | |
| 216 ASSERT_TRUE(LoadExtension( | 210 ASSERT_TRUE(LoadExtension( |
| 217 test_data_dir_.AppendASCII("samples") | 211 test_data_dir_.AppendASCII("samples") |
| 218 .AppendASCII("subscribe_page_action"))); | 212 .AppendASCII("subscribe_page_action"))); |
| 219 | 213 |
| 220 ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(0)); | 214 ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(0)); |
| 221 | 215 |
| 222 // Navigate to the feed page. | 216 // Navigate to the feed page. |
| 223 FilePath test_dir; | 217 FilePath test_dir; |
| 224 PathService::Get(chrome::DIR_TEST_DATA, &test_dir); | 218 PathService::Get(chrome::DIR_TEST_DATA, &test_dir); |
| 225 FilePath feed = test_dir.AppendASCII("feeds") | 219 FilePath feed = test_dir.AppendASCII("feeds") |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 // If the options page hasn't already come up, wait for it. | 817 // If the options page hasn't already come up, wait for it. |
| 824 if (tab_strip->count() == 1) { | 818 if (tab_strip->count() == 1) { |
| 825 ui_test_utils::WaitForNewTab(browser()); | 819 ui_test_utils::WaitForNewTab(browser()); |
| 826 } | 820 } |
| 827 ASSERT_EQ(2, tab_strip->count()); | 821 ASSERT_EQ(2, tab_strip->count()); |
| 828 | 822 |
| 829 EXPECT_EQ(extension->GetResourceURL("options.html"), | 823 EXPECT_EQ(extension->GetResourceURL("options.html"), |
| 830 tab_strip->GetTabContentsAt(1)->GetURL()); | 824 tab_strip->GetTabContentsAt(1)->GetURL()); |
| 831 } | 825 } |
| 832 | 826 |
| OLD | NEW |