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

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

Issue 2856029: Disable ExtensionsStartupTest.NoFileAccess on Mac. (Closed)
Patch Set: Created 10 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 | no next file » | 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) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 ExtensionsStartupTest() { 137 ExtensionsStartupTest() {
138 enable_extensions_ = true; 138 enable_extensions_ = true;
139 } 139 }
140 }; 140 };
141 141
142 IN_PROC_BROWSER_TEST_F(ExtensionsStartupTest, Test) { 142 IN_PROC_BROWSER_TEST_F(ExtensionsStartupTest, Test) {
143 WaitForServicesToStart(4, true); // 1 component extension and 3 others. 143 WaitForServicesToStart(4, true); // 1 component extension and 3 others.
144 TestInjection(true, true); 144 TestInjection(true, true);
145 } 145 }
146 146
147 // Sometimes times out on Mac. http://crbug.com/48151
148 #if defined(OS_MACOSX)
149 #define MAYBE_NoFileAccess DISABLED_NoFileAccess
150 #else
151 #define MAYBE_NoFileAccess NoFileAccess
152 #endif
147 // Tests that disallowing file access on an extension prevents it from injecting 153 // Tests that disallowing file access on an extension prevents it from injecting
148 // script into a page with a file URL. 154 // script into a page with a file URL.
149 IN_PROC_BROWSER_TEST_F(ExtensionsStartupTest, NoFileAccess) { 155 IN_PROC_BROWSER_TEST_F(ExtensionsStartupTest, MAYBE_NoFileAccess) {
150 WaitForServicesToStart(4, true); // 1 component extension and 3 others. 156 WaitForServicesToStart(4, true); // 1 component extension and 3 others.
151 157
152 ExtensionsService* service = browser()->profile()->GetExtensionsService(); 158 ExtensionsService* service = browser()->profile()->GetExtensionsService();
153 for (size_t i = 0; i < service->extensions()->size(); ++i) { 159 for (size_t i = 0; i < service->extensions()->size(); ++i) {
154 if (service->AllowFileAccess(service->extensions()->at(i))) { 160 if (service->AllowFileAccess(service->extensions()->at(i))) {
155 service->SetAllowFileAccess(service->extensions()->at(i), false); 161 service->SetAllowFileAccess(service->extensions()->at(i), false);
156 ui_test_utils::WaitForNotification( 162 ui_test_utils::WaitForNotification(
157 NotificationType::USER_SCRIPTS_UPDATED); 163 NotificationType::USER_SCRIPTS_UPDATED);
158 } 164 }
159 } 165 }
(...skipping 21 matching lines...) Expand all
181 // Flaky (times out) on Mac/Windows. http://crbug.com/46301. 187 // Flaky (times out) on Mac/Windows. http://crbug.com/46301.
182 #if defined(OS_MACOSX) || defined(OS_WIN) 188 #if defined(OS_MACOSX) || defined(OS_WIN)
183 #define MAYBE_Test FLAKY_Test 189 #define MAYBE_Test FLAKY_Test
184 #else 190 #else
185 #define MAYBE_Test Test 191 #define MAYBE_Test Test
186 #endif 192 #endif
187 IN_PROC_BROWSER_TEST_F(ExtensionsLoadTest, MAYBE_Test) { 193 IN_PROC_BROWSER_TEST_F(ExtensionsLoadTest, MAYBE_Test) {
188 WaitForServicesToStart(1, false); 194 WaitForServicesToStart(1, false);
189 TestInjection(true, true); 195 TestInjection(true, true);
190 } 196 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698