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

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

Issue 7264014: Gmail mails get modified upon send due to certain extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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/renderer/extensions/user_script_slave.cc » ('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/extensions/extension.h" 9 #include "chrome/common/extensions/extension.h"
10 #include "chrome/test/ui_test_utils.h" 10 #include "chrome/test/ui_test_utils.h"
11 #include "googleurl/src/gurl.h" 11 #include "googleurl/src/gurl.h"
12 #include "net/base/mock_host_resolver.h" 12 #include "net/base/mock_host_resolver.h"
13 13
14 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptAllFrames) { 14 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptAllFrames) {
15 ASSERT_TRUE(StartTestServer()); 15 ASSERT_TRUE(StartTestServer());
16 ASSERT_TRUE(RunExtensionTest("content_scripts/all_frames")) << message_; 16 ASSERT_TRUE(RunExtensionTest("content_scripts/all_frames")) << message_;
17 } 17 }
18 18
19 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptAboutBlankIframes) {
20 ASSERT_TRUE(StartTestServer());
21 ASSERT_TRUE(
22 RunExtensionTest("content_scripts/about_blank_iframes")) << message_;
23 }
24
19 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptExtensionIframe) { 25 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptExtensionIframe) {
20 ASSERT_TRUE(StartTestServer()); 26 ASSERT_TRUE(StartTestServer());
21 ASSERT_TRUE(RunExtensionTest("content_scripts/extension_iframe")) << message_; 27 ASSERT_TRUE(RunExtensionTest("content_scripts/extension_iframe")) << message_;
22 } 28 }
23 29
24 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptExtensionProcess) { 30 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptExtensionProcess) {
25 ASSERT_TRUE(StartTestServer()); 31 ASSERT_TRUE(StartTestServer());
26 ASSERT_TRUE( 32 ASSERT_TRUE(
27 RunExtensionTest("content_scripts/extension_process")) << message_; 33 RunExtensionTest("content_scripts/extension_process")) << message_;
28 } 34 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // And check that its styles were affected by the styles that just got loaded. 84 // And check that its styles were affected by the styles that just got loaded.
79 bool styles_injected; 85 bool styles_injected;
80 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( 86 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
81 browser()->GetSelectedTabContents()->render_view_host(), L"", 87 browser()->GetSelectedTabContents()->render_view_host(), L"",
82 L"window.domAutomationController.send(" 88 L"window.domAutomationController.send("
83 L"document.defaultView.getComputedStyle(document.body, null)." 89 L"document.defaultView.getComputedStyle(document.body, null)."
84 L"getPropertyValue('background-color') == 'rgb(255, 0, 0)')", 90 L"getPropertyValue('background-color') == 'rgb(255, 0, 0)')",
85 &styles_injected)); 91 &styles_injected));
86 ASSERT_TRUE(styles_injected); 92 ASSERT_TRUE(styles_injected);
87 } 93 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/extensions/user_script_slave.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698