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

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

Issue 226663003: Allow content script insertion on about:-URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address reviewer's comments (matches->match) Created 6 years, 8 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
OLDNEW
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/strings/stringprintf.h" 5 #include "base/strings/stringprintf.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/extensions/api/permissions/permissions_api.h" 8 #include "chrome/browser/extensions/api/permissions/permissions_api.h"
9 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 ASSERT_TRUE(StartEmbeddedTestServer()); 77 ASSERT_TRUE(StartEmbeddedTestServer());
78 ASSERT_TRUE(RunExtensionTest("content_scripts/all_frames")) << message_; 78 ASSERT_TRUE(RunExtensionTest("content_scripts/all_frames")) << message_;
79 } 79 }
80 80
81 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptAboutBlankIframes) { 81 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptAboutBlankIframes) {
82 ASSERT_TRUE(StartEmbeddedTestServer()); 82 ASSERT_TRUE(StartEmbeddedTestServer());
83 ASSERT_TRUE( 83 ASSERT_TRUE(
84 RunExtensionTest("content_scripts/about_blank_iframes")) << message_; 84 RunExtensionTest("content_scripts/about_blank_iframes")) << message_;
85 } 85 }
86 86
87 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptAboutBlankAndSrcdoc) {
88 ASSERT_TRUE(StartEmbeddedTestServer());
89 ASSERT_TRUE(RunExtensionTest("content_scripts/about_blank_srcdoc"))
90 << message_;
91 }
92
87 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptExtensionIframe) { 93 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptExtensionIframe) {
88 ASSERT_TRUE(StartEmbeddedTestServer()); 94 ASSERT_TRUE(StartEmbeddedTestServer());
89 ASSERT_TRUE(RunExtensionTest("content_scripts/extension_iframe")) << message_; 95 ASSERT_TRUE(RunExtensionTest("content_scripts/extension_iframe")) << message_;
90 } 96 }
91 97
92 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptExtensionProcess) { 98 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptExtensionProcess) {
93 ASSERT_TRUE(StartEmbeddedTestServer()); 99 ASSERT_TRUE(StartEmbeddedTestServer());
94 ASSERT_TRUE( 100 ASSERT_TRUE(
95 RunExtensionTest("content_scripts/extension_process")) << message_; 101 RunExtensionTest("content_scripts/extension_process")) << message_;
96 } 102 }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 ASSERT_TRUE(StartEmbeddedTestServer()); 273 ASSERT_TRUE(StartEmbeddedTestServer());
268 ASSERT_TRUE(RunExtensionTest("content_scripts/permissions")) << message_; 274 ASSERT_TRUE(RunExtensionTest("content_scripts/permissions")) << message_;
269 } 275 }
270 276
271 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptBypassPageCSP) { 277 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptBypassPageCSP) {
272 ASSERT_TRUE(StartEmbeddedTestServer()); 278 ASSERT_TRUE(StartEmbeddedTestServer());
273 ASSERT_TRUE(RunExtensionTest("content_scripts/bypass_page_csp")) << message_; 279 ASSERT_TRUE(RunExtensionTest("content_scripts/bypass_page_csp")) << message_;
274 } 280 }
275 281
276 } // namespace extensions 282 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698