| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 std::string("chrome-extension://") + last_loaded_extension_id_ + | 701 std::string("chrome-extension://") + last_loaded_extension_id_ + |
| 702 "/newtab.html"); | 702 "/newtab.html"); |
| 703 | 703 |
| 704 // Extension API should succeed. | 704 // Extension API should succeed. |
| 705 bool result = false; | 705 bool result = false; |
| 706 ui_test_utils::ExecuteJavaScriptAndExtractBool( | 706 ui_test_utils::ExecuteJavaScriptAndExtractBool( |
| 707 newtab->render_view_host(), L"", L"testExtensionApi()", &result); | 707 newtab->render_view_host(), L"", L"testExtensionApi()", &result); |
| 708 EXPECT_TRUE(result); | 708 EXPECT_TRUE(result); |
| 709 } | 709 } |
| 710 | 710 |
| 711 #if defined(OS_WIN) || defined(OS_LINUX) | 711 #if defined(OS_WIN) |
| 712 #define MAYBE_PluginLoadUnload PluginLoadUnload | 712 #define MAYBE_PluginLoadUnload PluginLoadUnload |
| 713 #elif defined(OS_LINUX) |
| 714 // http://crbug.com/47598 |
| 715 #define MAYBE_PluginLoadUnload FLAKY_PluginLoadUnload |
| 713 #else | 716 #else |
| 714 // TODO(mpcomplete): http://crbug.com/29900 need cross platform plugin support. | 717 // TODO(mpcomplete): http://crbug.com/29900 need cross platform plugin support. |
| 715 #define MAYBE_PluginLoadUnload DISABLED_PluginLoadUnload | 718 #define MAYBE_PluginLoadUnload DISABLED_PluginLoadUnload |
| 716 #endif | 719 #endif |
| 717 | 720 |
| 718 // Tests that a renderer's plugin list is properly updated when we load and | 721 // Tests that a renderer's plugin list is properly updated when we load and |
| 719 // unload an extension that contains a plugin. | 722 // unload an extension that contains a plugin. |
| 720 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_PluginLoadUnload) { | 723 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_PluginLoadUnload) { |
| 721 FilePath extension_dir = | 724 FilePath extension_dir = |
| 722 test_data_dir_.AppendASCII("uitest").AppendASCII("plugins"); | 725 test_data_dir_.AppendASCII("uitest").AppendASCII("plugins"); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 | 801 |
| 799 // If the options page hasn't already come up, wait for it. | 802 // If the options page hasn't already come up, wait for it. |
| 800 if (tab_strip->count() == 1) { | 803 if (tab_strip->count() == 1) { |
| 801 ui_test_utils::WaitForNewTab(browser()); | 804 ui_test_utils::WaitForNewTab(browser()); |
| 802 } | 805 } |
| 803 ASSERT_EQ(2, tab_strip->count()); | 806 ASSERT_EQ(2, tab_strip->count()); |
| 804 | 807 |
| 805 EXPECT_EQ(extension->GetResourceURL("options.html"), | 808 EXPECT_EQ(extension->GetResourceURL("options.html"), |
| 806 tab_strip->GetTabContentsAt(1)->GetURL()); | 809 tab_strip->GetTabContentsAt(1)->GetURL()); |
| 807 } | 810 } |
| OLD | NEW |