OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/extensions/autoupdate_interceptor.h" | 8 #include "chrome/browser/extensions/autoupdate_interceptor.h" |
9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
10 #include "chrome/browser/extensions/extension_browsertest.h" | 10 #include "chrome/browser/extensions/extension_browsertest.h" |
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 // extension's options page. | 818 // extension's options page. |
819 // Disabled. See http://crbug.com/26948 for details. | 819 // Disabled. See http://crbug.com/26948 for details. |
820 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, DISABLED_OptionsPage) { | 820 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, DISABLED_OptionsPage) { |
821 // Install an extension with an options page. | 821 // Install an extension with an options page. |
822 ASSERT_TRUE(InstallExtension(test_data_dir_.AppendASCII("options.crx"), 1)); | 822 ASSERT_TRUE(InstallExtension(test_data_dir_.AppendASCII("options.crx"), 1)); |
823 ExtensionService* service = browser()->profile()->GetExtensionService(); | 823 ExtensionService* service = browser()->profile()->GetExtensionService(); |
824 const ExtensionList* extensions = service->extensions(); | 824 const ExtensionList* extensions = service->extensions(); |
825 ASSERT_EQ(1u, extensions->size()); | 825 ASSERT_EQ(1u, extensions->size()); |
826 const Extension* extension = extensions->at(0); | 826 const Extension* extension = extensions->at(0); |
827 | 827 |
828 // Go to the chrome://extensions page and click the Options button. | 828 // Go to the Extension Settings page and click the Options button. |
829 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIExtensionsURL)); | 829 ui_test_utils::NavigateToURL( |
| 830 browser(), GURL(std::string(chrome::kChromeUISettingsURL) + |
| 831 chrome::kExtensionsSubPage)); |
830 TabStripModel* tab_strip = browser()->tabstrip_model(); | 832 TabStripModel* tab_strip = browser()->tabstrip_model(); |
831 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript( | 833 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript( |
832 browser()->GetSelectedTabContents()->render_view_host(), L"", | 834 browser()->GetSelectedTabContents()->render_view_host(), L"", |
833 jscript_click_option_button)); | 835 jscript_click_option_button)); |
834 | 836 |
835 // If the options page hasn't already come up, wait for it. | 837 // If the options page hasn't already come up, wait for it. |
836 if (tab_strip->count() == 1) { | 838 if (tab_strip->count() == 1) { |
837 ui_test_utils::WaitForNewTab(browser()); | 839 ui_test_utils::WaitForNewTab(browser()); |
838 } | 840 } |
839 ASSERT_EQ(2, tab_strip->count()); | 841 ASSERT_EQ(2, tab_strip->count()); |
840 | 842 |
841 EXPECT_EQ(extension->GetResourceURL("options.html"), | 843 EXPECT_EQ(extension->GetResourceURL("options.html"), |
842 tab_strip->GetTabContentsAt(1)->tab_contents()->GetURL()); | 844 tab_strip->GetTabContentsAt(1)->tab_contents()->GetURL()); |
843 } | 845 } |
844 | 846 |
845 //============================================================================== | 847 //============================================================================== |
846 // STOP! Please do not add any more random-ass tests here. Create new files for | 848 // STOP! Please do not add any more random-ass tests here. Create new files for |
847 // your tests grouped by functionality. Also, you should strongly consider using | 849 // your tests grouped by functionality. Also, you should strongly consider using |
848 // ExtensionAPITest if possible. | 850 // ExtensionAPITest if possible. |
849 //============================================================================== | 851 //============================================================================== |
OLD | NEW |