| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 url = extension->GetResourceURL(page_url); | 305 url = extension->GetResourceURL(page_url); |
| 306 } | 306 } |
| 307 | 307 |
| 308 if (use_incognito) | 308 if (use_incognito) |
| 309 ui_test_utils::OpenURLOffTheRecord(browser()->profile(), url); | 309 ui_test_utils::OpenURLOffTheRecord(browser()->profile(), url); |
| 310 else | 310 else |
| 311 ui_test_utils::NavigateToURL(browser(), url); | 311 ui_test_utils::NavigateToURL(browser(), url); |
| 312 } else if (launch_platform_app) { | 312 } else if (launch_platform_app) { |
| 313 AppLaunchParams params(browser()->profile(), extension, | 313 AppLaunchParams params(browser()->profile(), extension, |
| 314 extensions::LAUNCH_CONTAINER_NONE, NEW_WINDOW, | 314 extensions::LAUNCH_CONTAINER_NONE, NEW_WINDOW, |
| 315 extensions::SOURCE_UNTRACKED); | 315 extensions::SOURCE_TEST); |
| 316 params.command_line = *CommandLine::ForCurrentProcess(); | 316 params.command_line = *CommandLine::ForCurrentProcess(); |
| 317 OpenApplication(params); | 317 OpenApplication(params); |
| 318 } | 318 } |
| 319 | 319 |
| 320 if (!catcher.GetNextResult()) { | 320 if (!catcher.GetNextResult()) { |
| 321 message_ = catcher.message(); | 321 message_ = catcher.message(); |
| 322 return false; | 322 return false; |
| 323 } | 323 } |
| 324 | 324 |
| 325 return true; | 325 return true; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 test_config_->SetInteger(kSpawnedTestServerPort, | 410 test_config_->SetInteger(kSpawnedTestServerPort, |
| 411 test_server()->host_port_pair().port()); | 411 test_server()->host_port_pair().port()); |
| 412 | 412 |
| 413 return true; | 413 return true; |
| 414 } | 414 } |
| 415 | 415 |
| 416 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) { | 416 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) { |
| 417 ExtensionBrowserTest::SetUpCommandLine(command_line); | 417 ExtensionBrowserTest::SetUpCommandLine(command_line); |
| 418 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); | 418 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); |
| 419 } | 419 } |
| OLD | NEW |