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

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

Issue 624153002: replace OVERRIDE and FINAL with override and final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/extensions/api/permissions/permissions_api.h" 7 #include "chrome/browser/extensions/api/permissions/permissions_api.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 << message_; 155 << message_;
156 // Then load targeted extension to make sure its content isn't changed. 156 // Then load targeted extension to make sure its content isn't changed.
157 ASSERT_TRUE(RunExtensionTest("content_scripts/other_extensions/victim")) 157 ASSERT_TRUE(RunExtensionTest("content_scripts/other_extensions/victim"))
158 << message_; 158 << message_;
159 } 159 }
160 160
161 class ContentScriptCssInjectionTest : public ExtensionApiTest { 161 class ContentScriptCssInjectionTest : public ExtensionApiTest {
162 protected: 162 protected:
163 // TODO(rdevlin.cronin): Make a testing switch that looks like FeatureSwitch, 163 // TODO(rdevlin.cronin): Make a testing switch that looks like FeatureSwitch,
164 // but takes in an optional value so that we don't have to do this. 164 // but takes in an optional value so that we don't have to do this.
165 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE { 165 virtual void SetUpCommandLine(base::CommandLine* command_line) override {
166 ExtensionApiTest::SetUpCommandLine(command_line); 166 ExtensionApiTest::SetUpCommandLine(command_line);
167 // We change the Webstore URL to be http://cws.com. We need to do this so 167 // We change the Webstore URL to be http://cws.com. We need to do this so
168 // we can check that css injection is not allowed on the webstore (which 168 // we can check that css injection is not allowed on the webstore (which
169 // could lead to spoofing). Unfortunately, host_resolver seems to have 169 // could lead to spoofing). Unfortunately, host_resolver seems to have
170 // problems with redirecting "chrome.google.com" to the test server, so we 170 // problems with redirecting "chrome.google.com" to the test server, so we
171 // can't use the real Webstore's URL. If this changes, we could clean this 171 // can't use the real Webstore's URL. If this changes, we could clean this
172 // up. 172 // up.
173 command_line->AppendSwitchASCII( 173 command_line->AppendSwitchASCII(
174 switches::kAppsGalleryURL, 174 switches::kAppsGalleryURL,
175 base::StringPrintf("http://%s", kWebstoreDomain)); 175 base::StringPrintf("http://%s", kWebstoreDomain));
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 ASSERT_TRUE(StartEmbeddedTestServer()); 280 ASSERT_TRUE(StartEmbeddedTestServer());
281 ASSERT_TRUE(RunExtensionTest("content_scripts/permissions")) << message_; 281 ASSERT_TRUE(RunExtensionTest("content_scripts/permissions")) << message_;
282 } 282 }
283 283
284 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptBypassPageCSP) { 284 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptBypassPageCSP) {
285 ASSERT_TRUE(StartEmbeddedTestServer()); 285 ASSERT_TRUE(StartEmbeddedTestServer());
286 ASSERT_TRUE(RunExtensionTest("content_scripts/bypass_page_csp")) << message_; 286 ASSERT_TRUE(RunExtensionTest("content_scripts/bypass_page_csp")) << message_;
287 } 287 }
288 288
289 } // namespace extensions 289 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/component_loader_unittest.cc ('k') | chrome/browser/extensions/content_verifier_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698