| 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/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/api/test/test_api.h" | 10 #include "chrome/browser/extensions/api/test/test_api.h" |
| 11 #include "chrome/browser/extensions/unpacked_installer.h" | 11 #include "chrome/browser/extensions/unpacked_installer.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
| 14 #include "chrome/browser/ui/extensions/application_launch.h" | 14 #include "chrome/browser/ui/extensions/application_launch.h" |
| 15 #include "chrome/common/chrome_notification_types.h" | 15 #include "chrome/common/chrome_notification_types.h" |
| 16 #include "chrome/common/chrome_switches.h" | |
| 17 #include "chrome/common/extensions/extension.h" | 16 #include "chrome/common/extensions/extension.h" |
| 18 #include "chrome/test/base/ui_test_utils.h" | 17 #include "chrome/test/base/ui_test_utils.h" |
| 19 #include "content/public/browser/notification_registrar.h" | 18 #include "content/public/browser/notification_registrar.h" |
| 20 #include "content/public/browser/notification_service.h" | 19 #include "content/public/browser/notification_service.h" |
| 21 #include "net/base/net_util.h" | 20 #include "net/base/net_util.h" |
| 22 #include "net/test/test_server.h" | 21 #include "net/test/test_server.h" |
| 23 | 22 |
| 24 namespace { | 23 namespace { |
| 25 | 24 |
| 26 const char kTestServerPort[] = "testServer.port"; | 25 const char kTestServerPort[] = "testServer.port"; |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 test_config_->SetInteger(kTestWebSocketPort, | 304 test_config_->SetInteger(kTestWebSocketPort, |
| 306 websocket_server_->host_port_pair().port()); | 305 websocket_server_->host_port_pair().port()); |
| 307 | 306 |
| 308 return true; | 307 return true; |
| 309 } | 308 } |
| 310 | 309 |
| 311 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) { | 310 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) { |
| 312 ExtensionBrowserTest::SetUpCommandLine(command_line); | 311 ExtensionBrowserTest::SetUpCommandLine(command_line); |
| 313 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); | 312 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); |
| 314 } | 313 } |
| 315 | |
| 316 PlatformAppApiTest::PlatformAppApiTest() {} | |
| 317 | |
| 318 PlatformAppApiTest::~PlatformAppApiTest() {} | |
| 319 | |
| 320 void PlatformAppApiTest::SetUpCommandLine(CommandLine* command_line) { | |
| 321 ExtensionApiTest::SetUpCommandLine(command_line); | |
| 322 | |
| 323 // If someone is using this class, we're going to insist on management of the | |
| 324 // relevant flags. If these flags are already set, die. | |
| 325 DCHECK(!command_line->HasSwitch(switches::kEnableExperimentalExtensionApis)); | |
| 326 | |
| 327 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); | |
| 328 } | |
| OLD | NEW |