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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 const std::string& page_url) { | 269 const std::string& page_url) { |
270 return RunExtensionSubtest(extension_name, page_url, kFlagEnableFileAccess); | 270 return RunExtensionSubtest(extension_name, page_url, kFlagEnableFileAccess); |
271 } | 271 } |
272 | 272 |
273 bool ExtensionApiTest::RunExtensionSubtest(const std::string& extension_name, | 273 bool ExtensionApiTest::RunExtensionSubtest(const std::string& extension_name, |
274 const std::string& page_url, | 274 const std::string& page_url, |
275 int flags) { | 275 int flags) { |
276 DCHECK(!page_url.empty()) << "Argument page_url is required."; | 276 DCHECK(!page_url.empty()) << "Argument page_url is required."; |
277 // See http://crbug.com/177163 for details. | 277 // See http://crbug.com/177163 for details. |
278 #if defined(OS_WIN) && !defined(NDEBUG) | 278 #if defined(OS_WIN) && !defined(NDEBUG) |
279 LOG(WARNING) << "Workaround for 177163, prematurely returning"; | 279 // LOG(WARNING) << "Workaround for 177163, prematurely returning"; |
280 return true; | 280 // return true; |
281 #endif | 281 #endif |
282 return RunExtensionTestImpl(extension_name, page_url, NULL, flags); | 282 return RunExtensionTestImpl(extension_name, page_url, NULL, flags); |
283 } | 283 } |
284 | 284 |
285 | 285 |
286 bool ExtensionApiTest::RunPageTest(const std::string& page_url) { | 286 bool ExtensionApiTest::RunPageTest(const std::string& page_url) { |
287 return RunExtensionSubtest(std::string(), page_url); | 287 return RunExtensionSubtest(std::string(), page_url); |
288 } | 288 } |
289 | 289 |
290 bool ExtensionApiTest::RunPageTest(const std::string& page_url, | 290 bool ExtensionApiTest::RunPageTest(const std::string& page_url, |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 test_config_->SetInteger(kTestWebSocketPort, | 436 test_config_->SetInteger(kTestWebSocketPort, |
437 websocket_server_->host_port_pair().port()); | 437 websocket_server_->host_port_pair().port()); |
438 | 438 |
439 return true; | 439 return true; |
440 } | 440 } |
441 | 441 |
442 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) { | 442 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) { |
443 ExtensionBrowserTest::SetUpCommandLine(command_line); | 443 ExtensionBrowserTest::SetUpCommandLine(command_line); |
444 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); | 444 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); |
445 } | 445 } |
OLD | NEW |