| 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 "Relative page_url given with no extension_name"; | 358 "Relative page_url given with no extension_name"; |
| 359 | 359 |
| 360 url = extension->GetResourceURL(page_url); | 360 url = extension->GetResourceURL(page_url); |
| 361 } | 361 } |
| 362 | 362 |
| 363 if (use_incognito) | 363 if (use_incognito) |
| 364 ui_test_utils::OpenURLOffTheRecord(browser()->profile(), url); | 364 ui_test_utils::OpenURLOffTheRecord(browser()->profile(), url); |
| 365 else | 365 else |
| 366 ui_test_utils::NavigateToURL(browser(), url); | 366 ui_test_utils::NavigateToURL(browser(), url); |
| 367 } else if (launch_platform_app) { | 367 } else if (launch_platform_app) { |
| 368 AppLaunchParams params(browser()->profile(), extension, | 368 AppLaunchParams params(browser()->profile(), |
| 369 extensions::LAUNCH_NONE, NEW_WINDOW); | 369 extension, |
| 370 extensions::LAUNCH_CONTAINER_NONE, |
| 371 NEW_WINDOW); |
| 370 params.command_line = CommandLine::ForCurrentProcess(); | 372 params.command_line = CommandLine::ForCurrentProcess(); |
| 371 OpenApplication(params); | 373 OpenApplication(params); |
| 372 } | 374 } |
| 373 | 375 |
| 374 if (!catcher.GetNextResult()) { | 376 if (!catcher.GetNextResult()) { |
| 375 message_ = catcher.message(); | 377 message_ = catcher.message(); |
| 376 return false; | 378 return false; |
| 377 } | 379 } |
| 378 | 380 |
| 379 return true; | 381 return true; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 test_config_->SetInteger(kSpawnedTestServerPort, | 451 test_config_->SetInteger(kSpawnedTestServerPort, |
| 450 test_server()->host_port_pair().port()); | 452 test_server()->host_port_pair().port()); |
| 451 | 453 |
| 452 return true; | 454 return true; |
| 453 } | 455 } |
| 454 | 456 |
| 455 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) { | 457 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) { |
| 456 ExtensionBrowserTest::SetUpCommandLine(command_line); | 458 ExtensionBrowserTest::SetUpCommandLine(command_line); |
| 457 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); | 459 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); |
| 458 } | 460 } |
| OLD | NEW |