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 "apps/launcher.h" | 5 #include "apps/launcher.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1234 file_manager->id(), app_runtime::OnLaunched::kEventName)) { | 1234 file_manager->id(), app_runtime::OnLaunched::kEventName)) { |
1235 content::RunAllPendingInMessageLoop(); | 1235 content::RunAllPendingInMessageLoop(); |
1236 } | 1236 } |
1237 | 1237 |
1238 // Listen for new app windows so we see the file manager app launch itself. | 1238 // Listen for new app windows so we see the file manager app launch itself. |
1239 AppWindowRegistry* registry = AppWindowRegistry::Get(incognito_profile); | 1239 AppWindowRegistry* registry = AppWindowRegistry::Get(incognito_profile); |
1240 ASSERT_TRUE(registry != NULL); | 1240 ASSERT_TRUE(registry != NULL); |
1241 registry->AddObserver(this); | 1241 registry->AddObserver(this); |
1242 | 1242 |
1243 OpenApplication(AppLaunchParams(incognito_profile, file_manager, CURRENT_TAB, | 1243 OpenApplication(AppLaunchParams(incognito_profile, file_manager, CURRENT_TAB, |
1244 chrome::HOST_DESKTOP_TYPE_NATIVE, | 1244 ui::HOST_DESKTOP_TYPE_NATIVE, |
1245 extensions::SOURCE_TEST)); | 1245 extensions::SOURCE_TEST)); |
1246 | 1246 |
1247 while (!ContainsKey(opener_app_ids_, file_manager->id())) { | 1247 while (!ContainsKey(opener_app_ids_, file_manager->id())) { |
1248 content::RunAllPendingInMessageLoop(); | 1248 content::RunAllPendingInMessageLoop(); |
1249 } | 1249 } |
1250 } | 1250 } |
1251 | 1251 |
1252 class RestartDeviceTest : public PlatformAppBrowserTest { | 1252 class RestartDeviceTest : public PlatformAppBrowserTest { |
1253 public: | 1253 public: |
1254 RestartDeviceTest() | 1254 RestartDeviceTest() |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1372 // Now check that the app window's default zoom, and actual zoom level, | 1372 // Now check that the app window's default zoom, and actual zoom level, |
1373 // have not been changed from the default. | 1373 // have not been changed from the default. |
1374 WebContents* web_contents = GetFirstAppWindowWebContents(); | 1374 WebContents* web_contents = GetFirstAppWindowWebContents(); |
1375 content::HostZoomMap* app_host_zoom_map = content::HostZoomMap::Get( | 1375 content::HostZoomMap* app_host_zoom_map = content::HostZoomMap::Get( |
1376 web_contents->GetSiteInstance()); | 1376 web_contents->GetSiteInstance()); |
1377 EXPECT_EQ(0, app_host_zoom_map->GetDefaultZoomLevel()); | 1377 EXPECT_EQ(0, app_host_zoom_map->GetDefaultZoomLevel()); |
1378 EXPECT_EQ(0, app_host_zoom_map->GetZoomLevel(web_contents)); | 1378 EXPECT_EQ(0, app_host_zoom_map->GetZoomLevel(web_contents)); |
1379 } | 1379 } |
1380 | 1380 |
1381 } // namespace extensions | 1381 } // namespace extensions |
OLD | NEW |