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

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

Issue 2692153002: Enable SiteIsolationExtensions trial for developers. (Closed)
Patch Set: Remove the TearDownOnMainThread method in ExtensionWebstorePrivateApiTest Created 3 years, 10 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
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 embedded_test_server()->RegisterRequestHandler( 144 embedded_test_server()->RegisterRequestHandler(
145 base::Bind(&HandleEchoHeaderRequest)); 145 base::Bind(&HandleEchoHeaderRequest));
146 embedded_test_server()->RegisterRequestHandler( 146 embedded_test_server()->RegisterRequestHandler(
147 base::Bind(&HandleSetCookieRequest)); 147 base::Bind(&HandleSetCookieRequest));
148 embedded_test_server()->RegisterRequestHandler( 148 embedded_test_server()->RegisterRequestHandler(
149 base::Bind(&HandleSetHeaderRequest)); 149 base::Bind(&HandleSetHeaderRequest));
150 } 150 }
151 151
152 ExtensionApiTest::~ExtensionApiTest() {} 152 ExtensionApiTest::~ExtensionApiTest() {}
153 153
154 void ExtensionApiTest::SetUpInProcessBrowserTestFixture() { 154 void ExtensionApiTest::SetUpOnMainThread() {
155 ExtensionBrowserTest::SetUpOnMainThread();
155 DCHECK(!test_config_.get()) << "Previous test did not clear config state."; 156 DCHECK(!test_config_.get()) << "Previous test did not clear config state.";
156 test_config_.reset(new base::DictionaryValue()); 157 test_config_.reset(new base::DictionaryValue());
157 test_config_->SetString(kTestDataDirectory, 158 test_config_->SetString(kTestDataDirectory,
158 net::FilePathToFileURL(test_data_dir_).spec()); 159 net::FilePathToFileURL(test_data_dir_).spec());
159 test_config_->SetInteger(kTestWebSocketPort, 0); 160 test_config_->SetInteger(kTestWebSocketPort, 0);
160 bool isolate_extensions = extensions::IsIsolateExtensionsEnabled(); 161 bool isolate_extensions = extensions::IsIsolateExtensionsEnabled();
161 test_config_->SetBoolean(kIsolateExtensions, isolate_extensions); 162 test_config_->SetBoolean(kIsolateExtensions, isolate_extensions);
162 extensions::TestGetConfigFunction::set_test_config_state( 163 extensions::TestGetConfigFunction::set_test_config_state(
163 test_config_.get()); 164 test_config_.get());
164 } 165 }
165 166
166 void ExtensionApiTest::TearDownInProcessBrowserTestFixture() { 167 void ExtensionApiTest::TearDownOnMainThread() {
168 ExtensionBrowserTest::TearDownOnMainThread();
167 extensions::TestGetConfigFunction::set_test_config_state(NULL); 169 extensions::TestGetConfigFunction::set_test_config_state(NULL);
168 test_config_.reset(NULL); 170 test_config_.reset(NULL);
169 } 171 }
170 172
171 bool ExtensionApiTest::RunExtensionTest(const std::string& extension_name) { 173 bool ExtensionApiTest::RunExtensionTest(const std::string& extension_name) {
172 return RunExtensionTestImpl( 174 return RunExtensionTestImpl(
173 extension_name, std::string(), NULL, kFlagEnableFileAccess); 175 extension_name, std::string(), NULL, kFlagEnableFileAccess);
174 } 176 }
175 177
176 bool ExtensionApiTest::RunExtensionTestWithArg( 178 bool ExtensionApiTest::RunExtensionTestWithArg(
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 } 446 }
445 447
446 void ExtensionApiTest::SetUpCommandLine(base::CommandLine* command_line) { 448 void ExtensionApiTest::SetUpCommandLine(base::CommandLine* command_line) {
447 ExtensionBrowserTest::SetUpCommandLine(command_line); 449 ExtensionBrowserTest::SetUpCommandLine(command_line);
448 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); 450 test_data_dir_ = test_data_dir_.AppendASCII("api_test");
449 // Backgrounded renderer processes run at a lower priority, causing the 451 // Backgrounded renderer processes run at a lower priority, causing the
450 // tests to take more time to complete. Disable backgrounding so that the 452 // tests to take more time to complete. Disable backgrounding so that the
451 // tests don't time out. 453 // tests don't time out.
452 command_line->AppendSwitch(switches::kDisableRendererBackgrounding); 454 command_line->AppendSwitch(switches::kDisableRendererBackgrounding);
453 } 455 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_apitest.h ('k') | testing/variations/fieldtrial_testing_config.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698