| 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 |
| 210 ASSERT_TRUE(LoadExtension( | 216 ASSERT_TRUE(LoadExtension( |
| 211 test_data_dir_.AppendASCII("samples") | 217 test_data_dir_.AppendASCII("samples") |
| 212 .AppendASCII("subscribe_page_action"))); | 218 .AppendASCII("subscribe_page_action"))); |
| 213 | 219 |
| 214 ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(0)); | 220 ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(0)); |
| 215 | 221 |
| 216 // Navigate to the feed page. | 222 // Navigate to the feed page. |
| 217 FilePath test_dir; | 223 FilePath test_dir; |
| 218 PathService::Get(chrome::DIR_TEST_DATA, &test_dir); | 224 PathService::Get(chrome::DIR_TEST_DATA, &test_dir); |
| 219 FilePath feed = test_dir.AppendASCII("feeds") | 225 FilePath feed = test_dir.AppendASCII("feeds") |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 // If the options page hasn't already come up, wait for it. | 823 // If the options page hasn't already come up, wait for it. |
| 818 if (tab_strip->count() == 1) { | 824 if (tab_strip->count() == 1) { |
| 819 ui_test_utils::WaitForNewTab(browser()); | 825 ui_test_utils::WaitForNewTab(browser()); |
| 820 } | 826 } |
| 821 ASSERT_EQ(2, tab_strip->count()); | 827 ASSERT_EQ(2, tab_strip->count()); |
| 822 | 828 |
| 823 EXPECT_EQ(extension->GetResourceURL("options.html"), | 829 EXPECT_EQ(extension->GetResourceURL("options.html"), |
| 824 tab_strip->GetTabContentsAt(1)->GetURL()); | 830 tab_strip->GetTabContentsAt(1)->GetURL()); |
| 825 } | 831 } |
| 826 | 832 |
| OLD | NEW |