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/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 } | 274 } |
275 | 275 |
276 bool ExtensionApiTest::RunExtensionSubtest(const std::string& extension_name, | 276 bool ExtensionApiTest::RunExtensionSubtest(const std::string& extension_name, |
277 const std::string& page_url, | 277 const std::string& page_url, |
278 int flags) { | 278 int flags) { |
279 DCHECK(!page_url.empty()) << "Argument page_url is required."; | 279 DCHECK(!page_url.empty()) << "Argument page_url is required."; |
280 // See http://crbug.com/177163 for details. | 280 // See http://crbug.com/177163 for details. |
281 #if defined(OS_WIN) && !defined(NDEBUG) | 281 #if defined(OS_WIN) && !defined(NDEBUG) |
282 LOG(WARNING) << "Workaround for 177163, prematurely returning"; | 282 LOG(WARNING) << "Workaround for 177163, prematurely returning"; |
283 return true; | 283 return true; |
| 284 #else |
| 285 return RunExtensionTestImpl(extension_name, page_url, NULL, flags); |
284 #endif | 286 #endif |
285 return RunExtensionTestImpl(extension_name, page_url, NULL, flags); | |
286 } | 287 } |
287 | 288 |
288 | 289 |
289 bool ExtensionApiTest::RunPageTest(const std::string& page_url) { | 290 bool ExtensionApiTest::RunPageTest(const std::string& page_url) { |
290 return RunExtensionSubtest(std::string(), page_url); | 291 return RunExtensionSubtest(std::string(), page_url); |
291 } | 292 } |
292 | 293 |
293 bool ExtensionApiTest::RunPageTest(const std::string& page_url, | 294 bool ExtensionApiTest::RunPageTest(const std::string& page_url, |
294 int flags) { | 295 int flags) { |
295 return RunExtensionSubtest(std::string(), page_url, flags); | 296 return RunExtensionSubtest(std::string(), page_url, flags); |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 test_config_->SetInteger(kSpawnedTestServerPort, | 476 test_config_->SetInteger(kSpawnedTestServerPort, |
476 test_server()->host_port_pair().port()); | 477 test_server()->host_port_pair().port()); |
477 | 478 |
478 return true; | 479 return true; |
479 } | 480 } |
480 | 481 |
481 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) { | 482 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) { |
482 ExtensionBrowserTest::SetUpCommandLine(command_line); | 483 ExtensionBrowserTest::SetUpCommandLine(command_line); |
483 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); | 484 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); |
484 } | 485 } |
OLD | NEW |