| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/ash/launcher/chrome_launcher_controller.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/display/display_controller.h" | 8 #include "ash/display/display_controller.h" |
| 9 #include "ash/shelf/shelf.h" | 9 #include "ash/shelf/shelf.h" |
| 10 #include "ash/shelf/shelf_button.h" | 10 #include "ash/shelf/shelf_button.h" |
| (...skipping 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2059 controller_->UnpinAppWithID(std::string("fake_app_0")); | 2059 controller_->UnpinAppWithID(std::string("fake_app_0")); |
| 2060 | 2060 |
| 2061 test.RunMessageLoopUntilAnimationsDone(); | 2061 test.RunMessageLoopUntilAnimationsDone(); |
| 2062 EXPECT_FALSE(shelf_->IsShowingOverflowBubble()); | 2062 EXPECT_FALSE(shelf_->IsShowingOverflowBubble()); |
| 2063 } | 2063 } |
| 2064 | 2064 |
| 2065 // Check that a windowed V1 application can navigate away from its domain, but | 2065 // Check that a windowed V1 application can navigate away from its domain, but |
| 2066 // still gets detected properly. | 2066 // still gets detected properly. |
| 2067 IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest, V1AppNavigation) { | 2067 IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest, V1AppNavigation) { |
| 2068 // We assume that the web store is always there (which it apparently is). | 2068 // We assume that the web store is always there (which it apparently is). |
| 2069 controller_->PinAppWithID(extension_misc::kWebStoreAppId); | 2069 controller_->PinAppWithID(extensions::kWebStoreAppId); |
| 2070 ash::ShelfID id = controller_->GetShelfIDForAppID( | 2070 ash::ShelfID id = controller_->GetShelfIDForAppID( |
| 2071 extension_misc::kWebStoreAppId); | 2071 extensions::kWebStoreAppId); |
| 2072 ASSERT_NE(0, id); | 2072 ASSERT_NE(0, id); |
| 2073 EXPECT_EQ(ash::STATUS_CLOSED, model_->ItemByID(id)->status); | 2073 EXPECT_EQ(ash::STATUS_CLOSED, model_->ItemByID(id)->status); |
| 2074 | 2074 |
| 2075 // Create a windowed application. | 2075 // Create a windowed application. |
| 2076 AppLaunchParams params( | 2076 AppLaunchParams params( |
| 2077 profile(), | 2077 profile(), |
| 2078 controller_->GetExtensionForAppID(extension_misc::kWebStoreAppId), | 2078 controller_->GetExtensionForAppID(extensions::kWebStoreAppId), |
| 2079 0, | 2079 0, |
| 2080 chrome::HOST_DESKTOP_TYPE_ASH); | 2080 chrome::HOST_DESKTOP_TYPE_ASH); |
| 2081 params.container = extensions::LAUNCH_CONTAINER_WINDOW; | 2081 params.container = extensions::LAUNCH_CONTAINER_WINDOW; |
| 2082 OpenApplication(params); | 2082 OpenApplication(params); |
| 2083 EXPECT_EQ(ash::STATUS_ACTIVE, model_->ItemByID(id)->status); | 2083 EXPECT_EQ(ash::STATUS_ACTIVE, model_->ItemByID(id)->status); |
| 2084 | 2084 |
| 2085 // Find the browser which holds our app. | 2085 // Find the browser which holds our app. |
| 2086 Browser* app_browser = NULL; | 2086 Browser* app_browser = NULL; |
| 2087 const BrowserList* ash_browser_list = | 2087 const BrowserList* ash_browser_list = |
| 2088 BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_ASH); | 2088 BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_ASH); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2126 chrome::GetSettingsUrl(std::string())); | 2126 chrome::GetSettingsUrl(std::string())); |
| 2127 Browser* settings_browser = | 2127 Browser* settings_browser = |
| 2128 settings_manager->FindBrowserForProfile(browser()->profile()); | 2128 settings_manager->FindBrowserForProfile(browser()->profile()); |
| 2129 ASSERT_TRUE(settings_browser); | 2129 ASSERT_TRUE(settings_browser); |
| 2130 EXPECT_EQ(browser_count, NumberOfDetectedLauncherBrowsers(false)); | 2130 EXPECT_EQ(browser_count, NumberOfDetectedLauncherBrowsers(false)); |
| 2131 EXPECT_EQ(item_count + 1, shelf_model->item_count()); | 2131 EXPECT_EQ(item_count + 1, shelf_model->item_count()); |
| 2132 | 2132 |
| 2133 // TODO(stevenjb): Test multiprofile on Chrome OS when test support is addded. | 2133 // TODO(stevenjb): Test multiprofile on Chrome OS when test support is addded. |
| 2134 // crbug.com/230464. | 2134 // crbug.com/230464. |
| 2135 } | 2135 } |
| OLD | NEW |