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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_TEST); | 315 extensions::SOURCE_TEST); |
316 params.command_line = *CommandLine::ForCurrentProcess(); | 316 params.command_line = *base::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; |
326 } | 326 } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 | 406 |
407 // Build a dictionary of values that tests can use to build URLs that | 407 // Build a dictionary of values that tests can use to build URLs that |
408 // access the test server and local file system. Tests can see these values | 408 // access the test server and local file system. Tests can see these values |
409 // using the extension API function chrome.test.getConfig(). | 409 // using the extension API function chrome.test.getConfig(). |
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(base::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 |