| 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_browsertest.h" | 5 #include "chrome/browser/extensions/extension_browsertest.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 extensions::SOURCE_TEST); | 322 extensions::SOURCE_TEST); |
| 323 params.command_line = *base::CommandLine::ForCurrentProcess(); | 323 params.command_line = *base::CommandLine::ForCurrentProcess(); |
| 324 OpenApplication(params); | 324 OpenApplication(params); |
| 325 app_loaded_observer.Wait(); | 325 app_loaded_observer.Wait(); |
| 326 | 326 |
| 327 return app; | 327 return app; |
| 328 } | 328 } |
| 329 | 329 |
| 330 base::FilePath ExtensionBrowserTest::PackExtension( | 330 base::FilePath ExtensionBrowserTest::PackExtension( |
| 331 const base::FilePath& dir_path) { | 331 const base::FilePath& dir_path) { |
| 332 base::FilePath crx_path = temp_dir_.path().AppendASCII("temp.crx"); | 332 base::FilePath crx_path = temp_dir_.GetPath().AppendASCII("temp.crx"); |
| 333 if (!base::DeleteFile(crx_path, false)) { | 333 if (!base::DeleteFile(crx_path, false)) { |
| 334 ADD_FAILURE() << "Failed to delete crx: " << crx_path.value(); | 334 ADD_FAILURE() << "Failed to delete crx: " << crx_path.value(); |
| 335 return base::FilePath(); | 335 return base::FilePath(); |
| 336 } | 336 } |
| 337 | 337 |
| 338 // Look for PEM files with the same name as the directory. | 338 // Look for PEM files with the same name as the directory. |
| 339 base::FilePath pem_path = | 339 base::FilePath pem_path = |
| 340 dir_path.ReplaceExtension(FILE_PATH_LITERAL(".pem")); | 340 dir_path.ReplaceExtension(FILE_PATH_LITERAL(".pem")); |
| 341 base::FilePath pem_path_out; | 341 base::FilePath pem_path_out; |
| 342 | 342 |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( | 656 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( |
| 657 profile(), extension_id, script); | 657 profile(), extension_id, script); |
| 658 } | 658 } |
| 659 | 659 |
| 660 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( | 660 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( |
| 661 const std::string& extension_id, | 661 const std::string& extension_id, |
| 662 const std::string& script) { | 662 const std::string& script) { |
| 663 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( | 663 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( |
| 664 profile(), extension_id, script); | 664 profile(), extension_id, script); |
| 665 } | 665 } |
| OLD | NEW |