Commit f00061f3 authored by Jiewei Qian's avatar Jiewei Qian Committed by Chromium LUCI CQ

ui/ash: update GetNumberOfSettingsWindows calls to compare with unsigned int

This is a followup to https://crrev.com/c/2569191, which the method was
added. The callsite in chrome_new_window_client_browsertest.cc wasn't
changed to match the return type. This caused a mismatch so EXPECT_EQ is
asked to compare int with size_t, and can cause problem on certain build
configurations.

Change-Id: I092e0f0ea5d333359c8e11c39e7202f27e1849e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2573556
Auto-Submit: Jiewei Qian  <qjw@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#833524}
parent 1ae38e73
...@@ -185,7 +185,7 @@ IN_PROC_BROWSER_TEST_F(ChromeNewWindowClientWebAppBrowserTest, OpenWebApp) { ...@@ -185,7 +185,7 @@ IN_PROC_BROWSER_TEST_F(ChromeNewWindowClientWebAppBrowserTest, OpenWebApp) {
void TestOpenSettingFromArc(Browser* browser, void TestOpenSettingFromArc(Browser* browser,
ChromePage page, ChromePage page,
const GURL& expected_url, const GURL& expected_url,
int expected_setting_window_count) { size_t expected_setting_window_count) {
// Install the Settings App. // Install the Settings App.
web_app::WebAppProvider::Get(browser->profile()) web_app::WebAppProvider::Get(browser->profile())
->system_web_app_manager() ->system_web_app_manager()
...@@ -206,20 +206,20 @@ IN_PROC_BROWSER_TEST_F(ChromeNewWindowClientBrowserTest, ...@@ -206,20 +206,20 @@ IN_PROC_BROWSER_TEST_F(ChromeNewWindowClientBrowserTest,
TestOpenSettingFromArc( TestOpenSettingFromArc(
browser(), ChromePage::AUTOFILL, browser(), ChromePage::AUTOFILL,
GURL("chrome://settings/").Resolve(chrome::kAutofillSubPage), GURL("chrome://settings/").Resolve(chrome::kAutofillSubPage),
/*expected_setting_window_count=*/0); /*expected_setting_window_count=*/0u);
// But opening an OS setting should open the OS setting window. // But opening an OS setting should open the OS setting window.
TestOpenSettingFromArc( TestOpenSettingFromArc(
browser(), ChromePage::POWER, browser(), ChromePage::POWER,
GURL("chrome://os-settings/") GURL("chrome://os-settings/")
.Resolve(chromeos::settings::mojom::kPowerSubpagePath), .Resolve(chromeos::settings::mojom::kPowerSubpagePath),
/*expected_setting_window_count=*/1); /*expected_setting_window_count=*/1u);
} }
IN_PROC_BROWSER_TEST_F(ChromeNewWindowClientBrowserTest, OpenAboutChromePage) { IN_PROC_BROWSER_TEST_F(ChromeNewWindowClientBrowserTest, OpenAboutChromePage) {
// Opening an about: chrome page opens a new tab, and not the Settings window. // Opening an about: chrome page opens a new tab, and not the Settings window.
ChromeNewWindowClient::Get()->OpenChromePageFromArc(ChromePage::ABOUTHISTORY); ChromeNewWindowClient::Get()->OpenChromePageFromArc(ChromePage::ABOUTHISTORY);
EXPECT_EQ(0, GetNumberOfSettingsWindows()); EXPECT_EQ(0u, GetNumberOfSettingsWindows());
content::WebContents* contents = content::WebContents* contents =
GetLastActiveBrowser()->tab_strip_model()->GetActiveWebContents(); GetLastActiveBrowser()->tab_strip_model()->GetActiveWebContents();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment