| OLD | NEW |
| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 enable_extensions_ = true; | 162 enable_extensions_ = true; |
| 163 } | 163 } |
| 164 }; | 164 }; |
| 165 | 165 |
| 166 IN_PROC_BROWSER_TEST_F(ExtensionsStartupTest, Test) { | 166 IN_PROC_BROWSER_TEST_F(ExtensionsStartupTest, Test) { |
| 167 WaitForServicesToStart(num_expected_extensions_, true); | 167 WaitForServicesToStart(num_expected_extensions_, true); |
| 168 TestInjection(true, true); | 168 TestInjection(true, true); |
| 169 } | 169 } |
| 170 | 170 |
| 171 // Sometimes times out on Mac. http://crbug.com/48151 | 171 // Sometimes times out on Mac. http://crbug.com/48151 |
| 172 #if defined(OS_MACOSX) | 172 // |
| 173 // TODO(erg): linux_aura bringup: http://crbug.com/163931 |
| 174 #if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined
(USE_AURA)) |
| 173 #define MAYBE_NoFileAccess DISABLED_NoFileAccess | 175 #define MAYBE_NoFileAccess DISABLED_NoFileAccess |
| 174 #else | 176 #else |
| 175 #define MAYBE_NoFileAccess NoFileAccess | 177 #define MAYBE_NoFileAccess NoFileAccess |
| 176 #endif | 178 #endif |
| 177 // Tests that disallowing file access on an extension prevents it from injecting | 179 // Tests that disallowing file access on an extension prevents it from injecting |
| 178 // script into a page with a file URL. | 180 // script into a page with a file URL. |
| 179 IN_PROC_BROWSER_TEST_F(ExtensionsStartupTest, MAYBE_NoFileAccess) { | 181 IN_PROC_BROWSER_TEST_F(ExtensionsStartupTest, MAYBE_NoFileAccess) { |
| 180 WaitForServicesToStart(num_expected_extensions_, true); | 182 WaitForServicesToStart(num_expected_extensions_, true); |
| 181 | 183 |
| 182 // Keep a separate list of extensions for which to disable file access, since | 184 // Keep a separate list of extensions for which to disable file access, since |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 .AppendASCII("extensions") | 271 .AppendASCII("extensions") |
| 270 .AppendASCII("app2"); | 272 .AppendASCII("app2"); |
| 271 load_extensions_.push_back(fourth_extension_path.value()); | 273 load_extensions_.push_back(fourth_extension_path.value()); |
| 272 } | 274 } |
| 273 }; | 275 }; |
| 274 | 276 |
| 275 IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTest, Test) { | 277 IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTest, Test) { |
| 276 WaitForServicesToStart(4, true); | 278 WaitForServicesToStart(4, true); |
| 277 TestInjection(true, true); | 279 TestInjection(true, true); |
| 278 } | 280 } |
| OLD | NEW |