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

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

Issue 2456413002: Revert of Enable Site Isolation for Extensions. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | chrome/common/extensions/extension_process_policy.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) 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 "chrome/browser/extensions/extension_apitest.h" 5 #include "chrome/browser/extensions/extension_apitest.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/base_switches.h" 10 #include "base/base_switches.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 150
151 ExtensionApiTest::~ExtensionApiTest() {} 151 ExtensionApiTest::~ExtensionApiTest() {}
152 152
153 void ExtensionApiTest::SetUpInProcessBrowserTestFixture() { 153 void ExtensionApiTest::SetUpInProcessBrowserTestFixture() {
154 DCHECK(!test_config_.get()) << "Previous test did not clear config state."; 154 DCHECK(!test_config_.get()) << "Previous test did not clear config state.";
155 test_config_.reset(new base::DictionaryValue()); 155 test_config_.reset(new base::DictionaryValue());
156 test_config_->SetString(kTestDataDirectory, 156 test_config_->SetString(kTestDataDirectory,
157 net::FilePathToFileURL(test_data_dir_).spec()); 157 net::FilePathToFileURL(test_data_dir_).spec());
158 test_config_->SetInteger(kTestWebSocketPort, 0); 158 test_config_->SetInteger(kTestWebSocketPort, 0);
159 bool isolate_extensions = true; 159 bool isolate_extensions = base::CommandLine::ForCurrentProcess()->HasSwitch(
160 switches::kSitePerProcess) ||
161 base::CommandLine::ForCurrentProcess()->HasSwitch(
162 extensions::switches::kIsolateExtensions);
160 test_config_->SetBoolean(kIsolateExtensions, isolate_extensions); 163 test_config_->SetBoolean(kIsolateExtensions, isolate_extensions);
161 extensions::TestGetConfigFunction::set_test_config_state( 164 extensions::TestGetConfigFunction::set_test_config_state(
162 test_config_.get()); 165 test_config_.get());
163 } 166 }
164 167
165 void ExtensionApiTest::TearDownInProcessBrowserTestFixture() { 168 void ExtensionApiTest::TearDownInProcessBrowserTestFixture() {
166 extensions::TestGetConfigFunction::set_test_config_state(NULL); 169 extensions::TestGetConfigFunction::set_test_config_state(NULL);
167 test_config_.reset(NULL); 170 test_config_.reset(NULL);
168 } 171 }
169 172
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 } 434 }
432 435
433 void ExtensionApiTest::SetUpCommandLine(base::CommandLine* command_line) { 436 void ExtensionApiTest::SetUpCommandLine(base::CommandLine* command_line) {
434 ExtensionBrowserTest::SetUpCommandLine(command_line); 437 ExtensionBrowserTest::SetUpCommandLine(command_line);
435 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); 438 test_data_dir_ = test_data_dir_.AppendASCII("api_test");
436 // Backgrounded renderer processes run at a lower priority, causing the 439 // Backgrounded renderer processes run at a lower priority, causing the
437 // tests to take more time to complete. Disable backgrounding so that the 440 // tests to take more time to complete. Disable backgrounding so that the
438 // tests don't time out. 441 // tests don't time out.
439 command_line->AppendSwitch(switches::kDisableRendererBackgrounding); 442 command_line->AppendSwitch(switches::kDisableRendererBackgrounding);
440 } 443 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/extension_process_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698