| 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/strings/string_split.h" | 7 #include "base/strings/string_split.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 DCHECK(!page_url.empty()) << "Argument page_url is required."; | 215 DCHECK(!page_url.empty()) << "Argument page_url is required."; |
| 216 // See http://crbug.com/177163 for details. | 216 // See http://crbug.com/177163 for details. |
| 217 #if defined(OS_WIN) && !defined(NDEBUG) | 217 #if defined(OS_WIN) && !defined(NDEBUG) |
| 218 LOG(WARNING) << "Workaround for 177163, prematurely returning"; | 218 LOG(WARNING) << "Workaround for 177163, prematurely returning"; |
| 219 return true; | 219 return true; |
| 220 #else | 220 #else |
| 221 return RunExtensionTestImpl(extension_name, page_url, NULL, flags); | 221 return RunExtensionTestImpl(extension_name, page_url, NULL, flags); |
| 222 #endif | 222 #endif |
| 223 } | 223 } |
| 224 | 224 |
| 225 bool ExtensionApiTest::RunExtensionSubtestWithArg( |
| 226 const std::string& extension_name, |
| 227 const std::string& page_url, |
| 228 const char* custom_arg) { |
| 229 return RunExtensionTestImpl(extension_name, page_url, custom_arg, |
| 230 kFlagEnableFileAccess); |
| 231 } |
| 225 | 232 |
| 226 bool ExtensionApiTest::RunPageTest(const std::string& page_url) { | 233 bool ExtensionApiTest::RunPageTest(const std::string& page_url) { |
| 227 return RunExtensionSubtest(std::string(), page_url); | 234 return RunExtensionSubtest(std::string(), page_url); |
| 228 } | 235 } |
| 229 | 236 |
| 230 bool ExtensionApiTest::RunPageTest(const std::string& page_url, | 237 bool ExtensionApiTest::RunPageTest(const std::string& page_url, |
| 231 int flags) { | 238 int flags) { |
| 232 return RunExtensionSubtest(std::string(), page_url, flags); | 239 return RunExtensionSubtest(std::string(), page_url, flags); |
| 233 } | 240 } |
| 234 | 241 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 test_config_->SetInteger(kSpawnedTestServerPort, | 417 test_config_->SetInteger(kSpawnedTestServerPort, |
| 411 test_server()->host_port_pair().port()); | 418 test_server()->host_port_pair().port()); |
| 412 | 419 |
| 413 return true; | 420 return true; |
| 414 } | 421 } |
| 415 | 422 |
| 416 void ExtensionApiTest::SetUpCommandLine(base::CommandLine* command_line) { | 423 void ExtensionApiTest::SetUpCommandLine(base::CommandLine* command_line) { |
| 417 ExtensionBrowserTest::SetUpCommandLine(command_line); | 424 ExtensionBrowserTest::SetUpCommandLine(command_line); |
| 418 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); | 425 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); |
| 419 } | 426 } |
| OLD | NEW |