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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "apps/launcher.h" | 7 #include "apps/launcher.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1222 file_manager->id(), app_runtime::OnLaunched::kEventName)) { | 1222 file_manager->id(), app_runtime::OnLaunched::kEventName)) { |
1223 content::RunAllPendingInMessageLoop(); | 1223 content::RunAllPendingInMessageLoop(); |
1224 } | 1224 } |
1225 | 1225 |
1226 // Listen for new app windows so we see the file manager app launch itself. | 1226 // Listen for new app windows so we see the file manager app launch itself. |
1227 AppWindowRegistry* registry = AppWindowRegistry::Get(incognito_profile); | 1227 AppWindowRegistry* registry = AppWindowRegistry::Get(incognito_profile); |
1228 ASSERT_TRUE(registry != NULL); | 1228 ASSERT_TRUE(registry != NULL); |
1229 registry->AddObserver(this); | 1229 registry->AddObserver(this); |
1230 | 1230 |
1231 OpenApplication(AppLaunchParams(incognito_profile, file_manager, CURRENT_TAB, | 1231 OpenApplication(AppLaunchParams(incognito_profile, file_manager, CURRENT_TAB, |
| 1232 chrome::HOST_DESKTOP_TYPE_NATIVE, |
1232 extensions::SOURCE_TEST)); | 1233 extensions::SOURCE_TEST)); |
1233 | 1234 |
1234 while (!ContainsKey(opener_app_ids_, file_manager->id())) { | 1235 while (!ContainsKey(opener_app_ids_, file_manager->id())) { |
1235 content::RunAllPendingInMessageLoop(); | 1236 content::RunAllPendingInMessageLoop(); |
1236 } | 1237 } |
1237 } | 1238 } |
1238 | 1239 |
1239 class RestartDeviceTest : public PlatformAppBrowserTest { | 1240 class RestartDeviceTest : public PlatformAppBrowserTest { |
1240 public: | 1241 public: |
1241 RestartDeviceTest() | 1242 RestartDeviceTest() |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1359 // Now check that the app window's default zoom, and actual zoom level, | 1360 // Now check that the app window's default zoom, and actual zoom level, |
1360 // have not been changed from the default. | 1361 // have not been changed from the default. |
1361 WebContents* web_contents = GetFirstAppWindowWebContents(); | 1362 WebContents* web_contents = GetFirstAppWindowWebContents(); |
1362 content::HostZoomMap* app_host_zoom_map = content::HostZoomMap::Get( | 1363 content::HostZoomMap* app_host_zoom_map = content::HostZoomMap::Get( |
1363 web_contents->GetSiteInstance()); | 1364 web_contents->GetSiteInstance()); |
1364 EXPECT_EQ(0, app_host_zoom_map->GetDefaultZoomLevel()); | 1365 EXPECT_EQ(0, app_host_zoom_map->GetDefaultZoomLevel()); |
1365 EXPECT_EQ(0, app_host_zoom_map->GetZoomLevel(web_contents)); | 1366 EXPECT_EQ(0, app_host_zoom_map->GetZoomLevel(web_contents)); |
1366 } | 1367 } |
1367 | 1368 |
1368 } // namespace extensions | 1369 } // namespace extensions |
OLD | NEW |