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

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

Issue 2141753002: [Extensions] Code cleanup - const &s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/data_reduction_proxy/data_reduction_proxy_api.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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "build/build_config.h" 7 #include "build/build_config.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/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // internal pages, data URLs, regular HTTP pages, and resource URLs from 81 // internal pages, data URLs, regular HTTP pages, and resource URLs from
82 // extensions. 82 // extensions.
83 const std::string test_urls[] = { 83 const std::string test_urls[] = {
84 "chrome://newtab/", 84 "chrome://newtab/",
85 "data:text/html;charset=utf-8,<html>asdf</html>", 85 "data:text/html;charset=utf-8,<html>asdf</html>",
86 "chrome://version/", 86 "chrome://version/",
87 "about:blank", 87 "about:blank",
88 embedded_test_server()->GetURL(kAllUrlsTarget).spec(), 88 embedded_test_server()->GetURL(kAllUrlsTarget).spec(),
89 bystander->GetResourceURL("page.html").spec() 89 bystander->GetResourceURL("page.html").spec()
90 }; 90 };
91 for (auto test_url : test_urls) 91 for (const auto& test_url : test_urls)
92 NavigateAndWait(test_url); 92 NavigateAndWait(test_url);
93 } 93 }
94 94
95 // Test that an extension NOT whitelisted for scripting can ask for <all_urls> 95 // Test that an extension NOT whitelisted for scripting can ask for <all_urls>
96 // and run scripts on non-restricted all pages. 96 // and run scripts on non-restricted all pages.
97 IN_PROC_BROWSER_TEST_F(AllUrlsApiTest, RegularExtensions) { 97 IN_PROC_BROWSER_TEST_F(AllUrlsApiTest, RegularExtensions) {
98 // Now verify we can script a regular http page. 98 // Now verify we can script a regular http page.
99 ASSERT_TRUE(StartEmbeddedTestServer()); 99 ASSERT_TRUE(StartEmbeddedTestServer());
100 NavigateAndWait(embedded_test_server()->GetURL(kAllUrlsTarget).spec()); 100 NavigateAndWait(embedded_test_server()->GetURL(kAllUrlsTarget).spec());
101 } 101 }
102 102
103 } // namespace extensions 103 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/data_reduction_proxy/data_reduction_proxy_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698