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

Unified Diff: chrome/browser/profiles/host_zoom_map_browsertest.cc

Issue 807503004: While trying to enable webview sign-in by default, I found a bunch of issues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/host_zoom_map_browsertest.cc
diff --git a/chrome/browser/profiles/host_zoom_map_browsertest.cc b/chrome/browser/profiles/host_zoom_map_browsertest.cc
index 738d8f542dfbf96d17db988c10da8606da5507c4..8baa41fc431aa48681eeaff019ebef47f8dd7ace 100644
--- a/chrome/browser/profiles/host_zoom_map_browsertest.cc
+++ b/chrome/browser/profiles/host_zoom_map_browsertest.cc
@@ -30,6 +30,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "components/signin/core/common/profile_management_switches.h"
#include "components/ui/zoom/zoom_event_manager.h"
#include "content/public/test/test_utils.h"
#include "net/dns/mock_host_resolver.h"
@@ -257,9 +258,14 @@ IN_PROC_BROWSER_TEST_F(HostZoomMapBrowserTest,
// Verify that our loaded page is using a HostZoomMap different from the
// one for the default StoragePartition.
HostZoomMap* host_zoom_map = HostZoomMap::GetForWebContents(web_contents);
- HostZoomMap* default_profile_host_zoom_map =
- HostZoomMap::GetDefaultForBrowserContext(browser()->profile());
- EXPECT_NE(host_zoom_map, default_profile_host_zoom_map);
+
+ // For the webview based sign-in code, the sign in page uses the default host
+ // zoom map.
+ if (!switches::IsEnableWebviewBasedSignin()) {
+ HostZoomMap* default_profile_host_zoom_map =
+ HostZoomMap::GetDefaultForBrowserContext(browser()->profile());
+ EXPECT_NE(host_zoom_map, default_profile_host_zoom_map);
+ }
double new_zoom_level =
host_zoom_map->GetZoomLevelForHostAndScheme(test_scheme, test_host) + 0.5;

Powered by Google App Engine
This is Rietveld 408576698