summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/ui/webui/chromeos/system_web_dialog_browsertest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/browser/ui/webui/chromeos/system_web_dialog_browsertest.cc')
-rw-r--r--chromium/chrome/browser/ui/webui/chromeos/system_web_dialog_browsertest.cc28
1 files changed, 16 insertions, 12 deletions
diff --git a/chromium/chrome/browser/ui/webui/chromeos/system_web_dialog_browsertest.cc b/chromium/chrome/browser/ui/webui/chromeos/system_web_dialog_browsertest.cc
index ce3b17a3858..c23cac4ef3a 100644
--- a/chromium/chrome/browser/ui/webui/chromeos/system_web_dialog_browsertest.cc
+++ b/chromium/chrome/browser/ui/webui/chromeos/system_web_dialog_browsertest.cc
@@ -18,10 +18,10 @@
#include "components/account_id/account_id.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/render_view_host.h"
-#include "content/public/common/page_zoom.h"
#include "content/public/common/service_manager_connection.h"
#include "content/public/common/web_preferences.h"
#include "services/service_manager/public/cpp/connector.h"
+#include "third_party/blink/public/common/page/page_zoom.h"
#include "ui/aura/client/aura_constants.h"
#include "url/gurl.h"
@@ -99,14 +99,21 @@ IN_PROC_BROWSER_TEST_F(SystemWebDialogTest, InstanceTest) {
// https://crbug.com/855344.
}
-IN_PROC_BROWSER_TEST_F(SystemWebDialogTest, FontSize) {
+class SystemWebDialogTestWithSplitSettings : public SystemWebDialogTest {
+ public:
+ SystemWebDialogTestWithSplitSettings() {
+ feature_list_.InitAndEnableFeature(chromeos::features::kSplitSettings);
+ }
+
+ private:
+ base::test::ScopedFeatureList feature_list_;
+};
+
+IN_PROC_BROWSER_TEST_F(SystemWebDialogTestWithSplitSettings, FontSize) {
const content::WebPreferences kDefaultPrefs;
const int kDefaultFontSize = kDefaultPrefs.default_font_size;
const int kDefaultFixedFontSize = kDefaultPrefs.default_fixed_font_size;
- base::test::ScopedFeatureList features;
- features.InitAndEnableFeature(features::kSplitSettings);
-
// Set the browser font sizes to non-default values.
PrefService* profile_prefs = browser()->profile()->GetPrefs();
profile_prefs->SetInteger(prefs::kWebKitDefaultFontSize,
@@ -127,12 +134,9 @@ IN_PROC_BROWSER_TEST_F(SystemWebDialogTest, FontSize) {
EXPECT_EQ(kDefaultFixedFontSize, dialog_prefs.default_fixed_font_size);
}
-IN_PROC_BROWSER_TEST_F(SystemWebDialogTest, PageZoom) {
- base::test::ScopedFeatureList features;
- features.InitAndEnableFeature(features::kSplitSettings);
-
+IN_PROC_BROWSER_TEST_F(SystemWebDialogTestWithSplitSettings, PageZoom) {
// Set the default browser page zoom to 150%.
- double level = content::ZoomFactorToZoomLevel(1.5);
+ double level = blink::PageZoomFactorToZoomLevel(1.5);
browser()->profile()->GetZoomLevelPrefs()->SetDefaultZoomLevelPref(level);
// Open a system dialog.
@@ -142,8 +146,8 @@ IN_PROC_BROWSER_TEST_F(SystemWebDialogTest, PageZoom) {
// Dialog page zoom is still 100%.
auto* web_contents = dialog->GetWebUIForTest()->GetWebContents();
double dialog_level = content::HostZoomMap::GetZoomLevel(web_contents);
- EXPECT_TRUE(content::ZoomValuesEqual(dialog_level,
- content::ZoomFactorToZoomLevel(1.0)))
+ EXPECT_TRUE(blink::PageZoomValuesEqual(dialog_level,
+ blink::PageZoomFactorToZoomLevel(1.0)))
<< dialog_level;
}