| 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 "chrome/browser/extensions/extension_apitest.h" | 5 #include "chrome/browser/extensions/extension_apitest.h" |
| 6 #include "chrome/browser/extensions/extension_service.h" | 6 #include "chrome/browser/extensions/extension_service.h" |
| 7 #include "content/browser/tab_contents/tab_contents.h" | 7 #include "content/browser/tab_contents/tab_contents.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/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // And check that its styles were affected by the styles that just got loaded. | 85 // And check that its styles were affected by the styles that just got loaded. |
| 86 bool styles_injected; | 86 bool styles_injected; |
| 87 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( | 87 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( |
| 88 browser()->GetSelectedTabContents()->render_view_host(), L"", | 88 browser()->GetSelectedTabContents()->render_view_host(), L"", |
| 89 L"window.domAutomationController.send(" | 89 L"window.domAutomationController.send(" |
| 90 L"document.defaultView.getComputedStyle(document.body, null)." | 90 L"document.defaultView.getComputedStyle(document.body, null)." |
| 91 L"getPropertyValue('background-color') == 'rgb(255, 0, 0)')", | 91 L"getPropertyValue('background-color') == 'rgb(255, 0, 0)')", |
| 92 &styles_injected)); | 92 &styles_injected)); |
| 93 ASSERT_TRUE(styles_injected); | 93 ASSERT_TRUE(styles_injected); |
| 94 } | 94 } |
| 95 |
| 96 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CSSLocalization) { |
| 97 ASSERT_TRUE(StartTestServer()); |
| 98 ASSERT_TRUE(RunExtensionTest("css_l10n")) << message_; |
| 99 } |
| OLD | NEW |