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

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

Issue 11826048: Revert 176015 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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) 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/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "chrome/browser/extensions/api/permissions/permissions_api.h" 6 #include "chrome/browser/extensions/api/permissions/permissions_api.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_tabstrip.h" 10 #include "chrome/browser/ui/browser_tabstrip.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 // Navigate to an extension page that will fire the event events.js is 157 // Navigate to an extension page that will fire the event events.js is
158 // listening for. 158 // listening for.
159 ui_test_utils::NavigateToURLWithDisposition( 159 ui_test_utils::NavigateToURLWithDisposition(
160 browser(), extension->GetResourceURL("fire_event.html"), 160 browser(), extension->GetResourceURL("fire_event.html"),
161 NEW_FOREGROUND_TAB, ui_test_utils::BROWSER_TEST_NONE); 161 NEW_FOREGROUND_TAB, ui_test_utils::BROWSER_TEST_NONE);
162 EXPECT_TRUE(catcher.GetNextResult()); 162 EXPECT_TRUE(catcher.GetNextResult());
163 } 163 }
164 164
165 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptPermissionsApi) { 165 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptPermissionsApi) {
166 PermissionsRequestFunction::SetIgnoreUserGestureForTests(true); 166 RequestPermissionsFunction::SetIgnoreUserGestureForTests(true);
167 PermissionsRequestFunction::SetAutoConfirmForTests(true); 167 RequestPermissionsFunction::SetAutoConfirmForTests(true);
168 host_resolver()->AddRule("*.com", "127.0.0.1"); 168 host_resolver()->AddRule("*.com", "127.0.0.1");
169 ASSERT_TRUE(StartTestServer()); 169 ASSERT_TRUE(StartTestServer());
170 ASSERT_TRUE(RunExtensionTest("content_scripts/permissions")) << message_; 170 ASSERT_TRUE(RunExtensionTest("content_scripts/permissions")) << message_;
171 } 171 }
172 172
173 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptBypassPageCSP) { 173 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptBypassPageCSP) {
174 ASSERT_TRUE(StartTestServer()); 174 ASSERT_TRUE(StartTestServer());
175 ASSERT_TRUE(RunExtensionTest("content_scripts/bypass_page_csp")) << message_; 175 ASSERT_TRUE(RunExtensionTest("content_scripts/bypass_page_csp")) << message_;
176 } 176 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/browser_event_router.h ('k') | chrome/browser/extensions/data_deleter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698