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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 } | 311 } |
312 | 312 |
313 const Extension* ExtensionBrowserTest::LoadAndLaunchApp( | 313 const Extension* ExtensionBrowserTest::LoadAndLaunchApp( |
314 const base::FilePath& path) { | 314 const base::FilePath& path) { |
315 const Extension* app = LoadExtension(path); | 315 const Extension* app = LoadExtension(path); |
316 CHECK(app); | 316 CHECK(app); |
317 content::WindowedNotificationObserver app_loaded_observer( | 317 content::WindowedNotificationObserver app_loaded_observer( |
318 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, | 318 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, |
319 content::NotificationService::AllSources()); | 319 content::NotificationService::AllSources()); |
320 AppLaunchParams params(profile(), app, extensions::LAUNCH_CONTAINER_NONE, | 320 AppLaunchParams params(profile(), app, extensions::LAUNCH_CONTAINER_NONE, |
321 NEW_WINDOW, extensions::SOURCE_TEST); | 321 WindowOpenDisposition::NEW_WINDOW, |
| 322 extensions::SOURCE_TEST); |
322 params.command_line = *base::CommandLine::ForCurrentProcess(); | 323 params.command_line = *base::CommandLine::ForCurrentProcess(); |
323 OpenApplication(params); | 324 OpenApplication(params); |
324 app_loaded_observer.Wait(); | 325 app_loaded_observer.Wait(); |
325 | 326 |
326 return app; | 327 return app; |
327 } | 328 } |
328 | 329 |
329 base::FilePath ExtensionBrowserTest::PackExtension( | 330 base::FilePath ExtensionBrowserTest::PackExtension( |
330 const base::FilePath& dir_path) { | 331 const base::FilePath& dir_path) { |
331 base::FilePath crx_path = temp_dir_.path().AppendASCII("temp.crx"); | 332 base::FilePath crx_path = temp_dir_.path().AppendASCII("temp.crx"); |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( | 656 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( |
656 profile(), extension_id, script); | 657 profile(), extension_id, script); |
657 } | 658 } |
658 | 659 |
659 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( | 660 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( |
660 const std::string& extension_id, | 661 const std::string& extension_id, |
661 const std::string& script) { | 662 const std::string& script) { |
662 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( | 663 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( |
663 profile(), extension_id, script); | 664 profile(), extension_id, script); |
664 } | 665 } |
OLD | NEW |