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

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: rebase again Created 7 years, 6 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 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 // Load the launcher extension, which should launch the app. 682 // Load the launcher extension, which should launch the app.
683 ui_test_utils::NavigateToURLWithDisposition( 683 ui_test_utils::NavigateToURLWithDisposition(
684 browser(), 684 browser(),
685 launcher->GetResourceURL("main.html"), 685 launcher->GetResourceURL("main.html"),
686 CURRENT_TAB, 686 CURRENT_TAB,
687 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); 687 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
688 688
689 // Wait for app tab to be created and loaded. 689 // Wait for app tab to be created and loaded.
690 test_navigation_observer.WaitForObservation( 690 test_navigation_observer.WaitForObservation(
691 base::Bind(&content::RunMessageLoop), 691 base::Bind(&content::RunMessageLoop),
692 base::Bind(&MessageLoop::Quit, 692 base::Bind(&base::MessageLoop::Quit,
693 base::Unretained(MessageLoopForUI::current()))); 693 base::Unretained(base::MessageLoopForUI::current())));
694 694
695 // App has loaded, and chrome.app.isInstalled should be true. 695 // App has loaded, and chrome.app.isInstalled should be true.
696 bool is_installed = false; 696 bool is_installed = false;
697 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( 697 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
698 browser()->tab_strip_model()->GetActiveWebContents(), 698 browser()->tab_strip_model()->GetActiveWebContents(),
699 "window.domAutomationController.send(chrome.app.isInstalled)", 699 "window.domAutomationController.send(chrome.app.isInstalled)",
700 &is_installed)); 700 &is_installed));
701 ASSERT_TRUE(is_installed); 701 ASSERT_TRUE(is_installed);
702 } 702 }
703 703
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 &browser()->tab_strip_model()->GetActiveWebContents()-> 776 &browser()->tab_strip_model()->GetActiveWebContents()->
777 GetController())); 777 GetController()));
778 chrome::Reload(browser(), CURRENT_TAB); 778 chrome::Reload(browser(), CURRENT_TAB);
779 observer.Wait(); 779 observer.Wait();
780 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( 780 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
781 contents, 781 contents,
782 "window.domAutomationController.send(chrome.app.isInstalled)", 782 "window.domAutomationController.send(chrome.app.isInstalled)",
783 &is_installed)); 783 &is_installed));
784 ASSERT_TRUE(is_installed); 784 ASSERT_TRUE(is_installed);
785 } 785 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698