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 "base/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.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/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/common/chrome_notification_types.h" | 9 #include "chrome/common/chrome_notification_types.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 L"getPropertyValue('background-color') == 'rgb(255, 0, 0)')", | 112 L"getPropertyValue('background-color') == 'rgb(255, 0, 0)')", |
113 &styles_injected)); | 113 &styles_injected)); |
114 ASSERT_TRUE(styles_injected); | 114 ASSERT_TRUE(styles_injected); |
115 } | 115 } |
116 | 116 |
117 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptCSSLocalization) { | 117 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptCSSLocalization) { |
118 ASSERT_TRUE(StartTestServer()); | 118 ASSERT_TRUE(StartTestServer()); |
119 ASSERT_TRUE(RunExtensionTest("content_scripts/css_l10n")) << message_; | 119 ASSERT_TRUE(RunExtensionTest("content_scripts/css_l10n")) << message_; |
120 } | 120 } |
121 | 121 |
122 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptExtensionAPIs) { | 122 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_ContentScriptExtensionAPIs) { |
123 ASSERT_TRUE(StartTestServer()); | 123 ASSERT_TRUE(StartTestServer()); |
124 | 124 |
125 CommandLine::ForCurrentProcess()->AppendSwitch( | 125 CommandLine::ForCurrentProcess()->AppendSwitch( |
126 switches::kEnableExperimentalExtensionApis); | 126 switches::kEnableExperimentalExtensionApis); |
127 const Extension* extension = LoadExtension( | 127 const Extension* extension = LoadExtension( |
128 test_data_dir_.AppendASCII("content_scripts/extension_api")); | 128 test_data_dir_.AppendASCII("content_scripts/extension_api")); |
129 | 129 |
130 ResultCatcher catcher; | 130 ResultCatcher catcher; |
131 ui_test_utils::NavigateToURL( | 131 ui_test_utils::NavigateToURL( |
132 browser(), test_server()->GetURL("functions.html")); | 132 browser(), test_server()->GetURL("functions.html")); |
133 EXPECT_TRUE(catcher.GetNextResult()); | 133 EXPECT_TRUE(catcher.GetNextResult()); |
134 | 134 |
135 // Navigate to a page that will cause a content script to run that starts | 135 // Navigate to a page that will cause a content script to run that starts |
136 // listening for an extension event. | 136 // listening for an extension event. |
137 ui_test_utils::NavigateToURL( | 137 ui_test_utils::NavigateToURL( |
138 browser(), test_server()->GetURL("events.html")); | 138 browser(), test_server()->GetURL("events.html")); |
139 | 139 |
140 // Navigate to an extension page that will fire the event events.js is | 140 // Navigate to an extension page that will fire the event events.js is |
141 // listening for. | 141 // listening for. |
142 ui_test_utils::NavigateToURLWithDisposition( | 142 ui_test_utils::NavigateToURLWithDisposition( |
143 browser(), extension->GetResourceURL("fire_event.html"), | 143 browser(), extension->GetResourceURL("fire_event.html"), |
144 NEW_FOREGROUND_TAB, ui_test_utils::BROWSER_TEST_NONE); | 144 NEW_FOREGROUND_TAB, ui_test_utils::BROWSER_TEST_NONE); |
145 EXPECT_TRUE(catcher.GetNextResult()); | 145 EXPECT_TRUE(catcher.GetNextResult()); |
146 } | 146 } |
OLD | NEW |