OLD | NEW |
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 "components/ui/zoom/zoom_controller.h" | 5 #include "components/ui/zoom/zoom_controller.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/process/kill.h" | 8 #include "base/process/kill.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 269 |
270 // Regression test: crbug.com/450909. | 270 // Regression test: crbug.com/450909. |
271 IN_PROC_BROWSER_TEST_F(ZoomControllerBrowserTest, NavigationResetsManualMode) { | 271 IN_PROC_BROWSER_TEST_F(ZoomControllerBrowserTest, NavigationResetsManualMode) { |
272 TestResetOnNavigation(ZoomController::ZOOM_MODE_MANUAL); | 272 TestResetOnNavigation(ZoomController::ZOOM_MODE_MANUAL); |
273 } | 273 } |
274 | 274 |
275 #if !defined(OS_CHROMEOS) | 275 #if !defined(OS_CHROMEOS) |
276 // Regression test: crbug.com/438979. | 276 // Regression test: crbug.com/438979. |
277 IN_PROC_BROWSER_TEST_F(ZoomControllerBrowserTest, | 277 IN_PROC_BROWSER_TEST_F(ZoomControllerBrowserTest, |
278 SettingsZoomAfterSigninWorks) { | 278 SettingsZoomAfterSigninWorks) { |
279 GURL signin_url( | 279 GURL signin_url(std::string(chrome::kChromeUIChromeSigninURL) |
280 std::string(chrome::kChromeUIChromeSigninURL).append("?source=0")); | 280 .append("?access_point=0&reason=0")); |
281 // We open the signin page in a new tab so that the ZoomController is | 281 // We open the signin page in a new tab so that the ZoomController is |
282 // created against the HostZoomMap of the special StoragePartition that | 282 // created against the HostZoomMap of the special StoragePartition that |
283 // backs the signin page. When we subsequently navigate away from the | 283 // backs the signin page. When we subsequently navigate away from the |
284 // signin page, the HostZoomMap changes, and we need to test that the | 284 // signin page, the HostZoomMap changes, and we need to test that the |
285 // ZoomController correctly detects this. | 285 // ZoomController correctly detects this. |
286 ui_test_utils::NavigateToURLWithDisposition( | 286 ui_test_utils::NavigateToURLWithDisposition( |
287 browser(), signin_url, NEW_FOREGROUND_TAB, | 287 browser(), signin_url, NEW_FOREGROUND_TAB, |
288 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); | 288 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
289 login_ui_test_utils::WaitUntilUIReady(browser()); | 289 login_ui_test_utils::WaitUntilUIReady(browser()); |
290 content::WebContents* web_contents = | 290 content::WebContents* web_contents = |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 web_contents, | 334 web_contents, |
335 old_zoom_level, | 335 old_zoom_level, |
336 new_zoom_level, | 336 new_zoom_level, |
337 ZoomController::ZOOM_MODE_DEFAULT, | 337 ZoomController::ZOOM_MODE_DEFAULT, |
338 true); // We have a non-empty host, so this will be 'true'. | 338 true); // We have a non-empty host, so this will be 'true'. |
339 ZoomChangedWatcher zoom_change_watcher(web_contents, zoom_change_data); | 339 ZoomChangedWatcher zoom_change_watcher(web_contents, zoom_change_data); |
340 zoom_controller->SetZoomLevel(new_zoom_level); | 340 zoom_controller->SetZoomLevel(new_zoom_level); |
341 zoom_change_watcher.Wait(); | 341 zoom_change_watcher.Wait(); |
342 } | 342 } |
343 #endif // !defined(OS_CHROMEOS) | 343 #endif // !defined(OS_CHROMEOS) |
OLD | NEW |