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

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: Removed unnecessary include and added comments to browser test. 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
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, CSSLocalization) {
97 ASSERT_TRUE(StartTestServer());
98 ASSERT_TRUE(RunExtensionTest("css_l10n")) << message_;
Nebojša Ćirić 2011/08/16 17:40:24 Do you want to move css_l10n under content_scripts
Mihai Parparita -not on Chrome 2011/08/16 17:42:41 All the other API tests in this file are in the co
adriansc 2011/08/16 22:13:51 Done.
adriansc 2011/08/16 22:13:51 Done.
99 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698