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

Side by Side Diff: chrome/test/page_cycler/page_cycler_test.cc

Issue 430003: Revert change that disallowed content scripts access to file:// (Closed)
Patch Set: Can't go back, only through Created 11 years, 1 month 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/eintr_wrapper.h" 7 #include "base/eintr_wrapper.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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 protected: 155 protected:
156 rlim_t fd_limit_; 156 rlim_t fd_limit_;
157 #endif 157 #endif
158 public: 158 public:
159 PageCyclerTest() { 159 PageCyclerTest() {
160 show_window_ = true; 160 show_window_ = true;
161 161
162 // Expose garbage collection for the page cycler tests. 162 // Expose garbage collection for the page cycler tests.
163 launch_arguments_.AppendSwitchWithValue(switches::kJavaScriptFlags, 163 launch_arguments_.AppendSwitchWithValue(switches::kJavaScriptFlags,
164 L"--expose_gc"); 164 L"--expose_gc");
165 // Page cycler tests need to run content scripts on file:// urls.
166 launch_arguments_.AppendSwitch(switches::kEnableJsOnFileUrls);
167
168 #if defined(OS_MACOSX) 165 #if defined(OS_MACOSX)
169 static rlim_t initial_fd_limit = GetFileDescriptorLimit(); 166 static rlim_t initial_fd_limit = GetFileDescriptorLimit();
170 fd_limit_ = initial_fd_limit; 167 fd_limit_ = initial_fd_limit;
171 #endif 168 #endif
172 } 169 }
173 170
174 void SetUp() { 171 void SetUp() {
175 #if defined(OS_MACOSX) 172 #if defined(OS_MACOSX)
176 SetFileDescriptorLimit(fd_limit_); 173 SetFileDescriptorLimit(fd_limit_);
177 #endif 174 #endif
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 356
360 // http (localhost) tests 357 // http (localhost) tests
361 PAGE_CYCLER_HTTP_TESTS("moz", MozHttp); 358 PAGE_CYCLER_HTTP_TESTS("moz", MozHttp);
362 PAGE_CYCLER_HTTP_TESTS("intl1", Intl1Http); 359 PAGE_CYCLER_HTTP_TESTS("intl1", Intl1Http);
363 PAGE_CYCLER_HTTP_TESTS("intl2", Intl2Http); 360 PAGE_CYCLER_HTTP_TESTS("intl2", Intl2Http);
364 PAGE_CYCLER_HTTP_TESTS("dom", DomHttp); 361 PAGE_CYCLER_HTTP_TESTS("dom", DomHttp);
365 PAGE_CYCLER_HTTP_TESTS("bloat", BloatHttp); 362 PAGE_CYCLER_HTTP_TESTS("bloat", BloatHttp);
366 363
367 364
368 } // namespace 365 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698