| 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 "chrome/browser/extensions/extension_apitest.h" | 5 #include "chrome/browser/extensions/extension_apitest.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" |
| 7 #include "base/strings/string_split.h" | 8 #include "base/strings/string_split.h" |
| 8 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 9 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
| 11 #include "chrome/browser/extensions/unpacked_installer.h" | 12 #include "chrome/browser/extensions/unpacked_installer.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 14 #include "chrome/browser/ui/extensions/app_launch_params.h" | 15 #include "chrome/browser/ui/extensions/app_launch_params.h" |
| 15 #include "chrome/browser/ui/extensions/application_launch.h" | 16 #include "chrome/browser/ui/extensions/application_launch.h" |
| 16 #include "chrome/test/base/ui_test_utils.h" | 17 #include "chrome/test/base/ui_test_utils.h" |
| 18 #include "content/public/common/content_switches.h" |
| 17 #include "extensions/browser/api/test/test_api.h" | 19 #include "extensions/browser/api/test/test_api.h" |
| 18 #include "extensions/browser/extension_registry.h" | 20 #include "extensions/browser/extension_registry.h" |
| 19 #include "extensions/browser/extension_system.h" | 21 #include "extensions/browser/extension_system.h" |
| 20 #include "extensions/common/constants.h" | 22 #include "extensions/common/constants.h" |
| 21 #include "extensions/common/extension.h" | 23 #include "extensions/common/extension.h" |
| 22 #include "extensions/common/extension_set.h" | 24 #include "extensions/common/extension_set.h" |
| 23 #include "extensions/test/result_catcher.h" | 25 #include "extensions/test/result_catcher.h" |
| 24 #include "net/base/escape.h" | 26 #include "net/base/escape.h" |
| 25 #include "net/base/filename_util.h" | 27 #include "net/base/filename_util.h" |
| 26 #include "net/test/embedded_test_server/embedded_test_server.h" | 28 #include "net/test/embedded_test_server/embedded_test_server.h" |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 // using the extension API function chrome.test.getConfig(). | 416 // using the extension API function chrome.test.getConfig(). |
| 415 test_config_->SetInteger(kSpawnedTestServerPort, | 417 test_config_->SetInteger(kSpawnedTestServerPort, |
| 416 test_server()->host_port_pair().port()); | 418 test_server()->host_port_pair().port()); |
| 417 | 419 |
| 418 return true; | 420 return true; |
| 419 } | 421 } |
| 420 | 422 |
| 421 void ExtensionApiTest::SetUpCommandLine(base::CommandLine* command_line) { | 423 void ExtensionApiTest::SetUpCommandLine(base::CommandLine* command_line) { |
| 422 ExtensionBrowserTest::SetUpCommandLine(command_line); | 424 ExtensionBrowserTest::SetUpCommandLine(command_line); |
| 423 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); | 425 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); |
| 426 // Backgrounded renderer processes run at a lower priority, causing the |
| 427 // tests to take more time to complete. Disable backgrounding so that the |
| 428 // tests don't time out. |
| 429 command_line->AppendSwitch(switches::kDisableRendererBackgrounding); |
| 424 } | 430 } |
| OLD | NEW |