Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: chrome/browser/extensions/content_script_apitest.cc

Issue 7552028: Injected CSS localization fix (see bug no.) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Cleaned up old unused function. Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/execute_code_in_tab_function.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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, ContentScriptCSSLocalization) {
97 ASSERT_TRUE(StartTestServer());
98 ASSERT_TRUE(RunExtensionTest("content_scripts/css_l10n")) << message_;
99 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/execute_code_in_tab_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698