Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(644)

Side by Side Diff: chrome/browser/extensions/app_process_apitest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "chrome/browser/extensions/extension_host.h" 6 #include "chrome/browser/extensions/extension_host.h"
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/extension_system.h" 8 #include "chrome/browser/extensions/extension_system.h"
9 #include "chrome/browser/extensions/process_map.h" 9 #include "chrome/browser/extensions/process_map.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 // Load the launcher extension, which should launch the app. 627 // Load the launcher extension, which should launch the app.
628 ui_test_utils::NavigateToURLWithDisposition( 628 ui_test_utils::NavigateToURLWithDisposition(
629 browser(), 629 browser(),
630 launcher->GetResourceURL("main.html"), 630 launcher->GetResourceURL("main.html"),
631 CURRENT_TAB, 631 CURRENT_TAB,
632 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); 632 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
633 633
634 // Wait for app tab to be created and loaded. 634 // Wait for app tab to be created and loaded.
635 test_navigation_observer.WaitForObservation( 635 test_navigation_observer.WaitForObservation(
636 base::Bind(&content::RunMessageLoop), 636 base::Bind(&content::RunMessageLoop),
637 base::Bind(&MessageLoop::Quit, 637 base::Bind(&base::MessageLoop::Quit,
638 base::Unretained(MessageLoopForUI::current()))); 638 base::Unretained(base::MessageLoopForUI::current())));
639 639
640 // App has loaded, and chrome.app.isInstalled should be true. 640 // App has loaded, and chrome.app.isInstalled should be true.
641 bool is_installed = false; 641 bool is_installed = false;
642 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( 642 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
643 browser()->tab_strip_model()->GetActiveWebContents(), 643 browser()->tab_strip_model()->GetActiveWebContents(),
644 "window.domAutomationController.send(chrome.app.isInstalled)", 644 "window.domAutomationController.send(chrome.app.isInstalled)",
645 &is_installed)); 645 &is_installed));
646 ASSERT_TRUE(is_installed); 646 ASSERT_TRUE(is_installed);
647 } 647 }
648 648
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 &browser()->tab_strip_model()->GetActiveWebContents()-> 721 &browser()->tab_strip_model()->GetActiveWebContents()->
722 GetController())); 722 GetController()));
723 chrome::Reload(browser(), CURRENT_TAB); 723 chrome::Reload(browser(), CURRENT_TAB);
724 observer.Wait(); 724 observer.Wait();
725 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( 725 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
726 contents, 726 contents,
727 "window.domAutomationController.send(chrome.app.isInstalled)", 727 "window.domAutomationController.send(chrome.app.isInstalled)",
728 &is_installed)); 728 &is_installed));
729 ASSERT_TRUE(is_installed); 729 ASSERT_TRUE(is_installed);
730 } 730 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698