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

Side by Side Diff: chrome/browser/apps/ephemeral_app_launcher_browsertest.cc

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/thread_task_runner_handle.h" 5 #include "base/thread_task_runner_handle.h"
6 #include "chrome/browser/apps/ephemeral_app_launcher.h" 6 #include "chrome/browser/apps/ephemeral_app_launcher.h"
7 #include "chrome/browser/apps/ephemeral_app_service.h" 7 #include "chrome/browser/apps/ephemeral_app_service.h"
8 #include "chrome/browser/extensions/extension_install_checker.h" 8 #include "chrome/browser/extensions/extension_install_checker.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/install_tracker.h" 10 #include "chrome/browser/extensions/install_tracker.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 base::Unretained(&launch_observer)))); 408 base::Unretained(&launch_observer))));
409 launcher->Start(); 409 launcher->Start();
410 launch_observer.Wait(); 410 launch_observer.Wait();
411 411
412 EXPECT_EQ(webstore_install::SUCCESS, launch_observer.result()); 412 EXPECT_EQ(webstore_install::SUCCESS, launch_observer.result());
413 EXPECT_FALSE(launcher->install_initiated()); 413 EXPECT_FALSE(launcher->install_initiated());
414 EXPECT_FALSE(GetInstalledExtension(kHostedAppId)); 414 EXPECT_FALSE(GetInstalledExtension(kHostedAppId));
415 415
416 // Verify that a navigation to the launch url was attempted. 416 // Verify that a navigation to the launch url was attempted.
417 Browser* browser = 417 Browser* browser =
418 FindBrowserWithProfile(profile(), chrome::GetActiveDesktop()); 418 chrome::FindBrowserWithProfile(profile(), chrome::GetActiveDesktop());
419 ASSERT_TRUE(browser); 419 ASSERT_TRUE(browser);
420 content::WebContents* web_contents = 420 content::WebContents* web_contents =
421 browser->tab_strip_model()->GetActiveWebContents(); 421 browser->tab_strip_model()->GetActiveWebContents();
422 ASSERT_TRUE(web_contents); 422 ASSERT_TRUE(web_contents);
423 EXPECT_EQ(GURL(kHostedAppLaunchUrl), web_contents->GetVisibleURL()); 423 EXPECT_EQ(GURL(kHostedAppLaunchUrl), web_contents->GetVisibleURL());
424 } 424 }
425 425
426 // Verifies that the EphemeralAppLauncher handles non-existent extension ids. 426 // Verifies that the EphemeralAppLauncher handles non-existent extension ids.
427 IN_PROC_BROWSER_TEST_F(EphemeralAppLauncherTest, NonExistentExtensionId) { 427 IN_PROC_BROWSER_TEST_F(EphemeralAppLauncherTest, NonExistentExtensionId) {
428 RunLaunchTest( 428 RunLaunchTest(
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 } 554 }
555 555
556 // Verifies that a launch will fail if a duplicate launch is in progress. 556 // Verifies that a launch will fail if a duplicate launch is in progress.
557 IN_PROC_BROWSER_TEST_F(EphemeralAppLauncherTest, DuplicateLaunchInProgress) { 557 IN_PROC_BROWSER_TEST_F(EphemeralAppLauncherTest, DuplicateLaunchInProgress) {
558 extensions::ActiveInstallData install_data(kDefaultAppId); 558 extensions::ActiveInstallData install_data(kDefaultAppId);
559 install_data.is_ephemeral = true; 559 install_data.is_ephemeral = true;
560 InstallTracker::Get(profile())->AddActiveInstall(install_data); 560 InstallTracker::Get(profile())->AddActiveInstall(install_data);
561 561
562 RunLaunchTest(kDefaultAppId, webstore_install::LAUNCH_IN_PROGRESS, false); 562 RunLaunchTest(kDefaultAppId, webstore_install::LAUNCH_IN_PROGRESS, false);
563 } 563 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698