Commit b2bec0cc authored by Samuel Huang's avatar Samuel Huang Committed by Commit Bot

[Build] Fix chromeos-kevin-builder-perf-fyi compile failure.

Compile failure in AppServiceAppWindowArcAppBrowserTest.LogicalWindowId
arises from signed / unsigned comparison: std::count_if() returns a
signed type, but the EXPECT_EQ used an unsigned value.

This issue has been causing Builder chromeos-kevin-builder-perf-fyi to
fail since start of 2020-06.

Bug: 1106626
Change-Id: I4278161ad2533ac566bf78851ceedbada841fa6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2302834Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarPhilipp Weiß <phweiss@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789991}
parent 9f5742ec
...@@ -640,7 +640,7 @@ IN_PROC_BROWSER_TEST_F(AppServiceAppWindowArcAppBrowserTest, LogicalWindowId) { ...@@ -640,7 +640,7 @@ IN_PROC_BROWSER_TEST_F(AppServiceAppWindowArcAppBrowserTest, LogicalWindowId) {
auto is_hidden = [](aura::Window* w) { auto is_hidden = [](aura::Window* w) {
return w->GetProperty(ash::kHideInShelfKey); return w->GetProperty(ash::kHideInShelfKey);
}; };
EXPECT_EQ(1u, std::count_if(windows.begin(), windows.end(), is_hidden)); EXPECT_EQ(1, std::count_if(windows.begin(), windows.end(), is_hidden));
// The hidden window should be task_id 2. // The hidden window should be task_id 2.
aura::Window* window1 = aura::Window* window1 =
...@@ -670,7 +670,7 @@ IN_PROC_BROWSER_TEST_F(AppServiceAppWindowArcAppBrowserTest, LogicalWindowId) { ...@@ -670,7 +670,7 @@ IN_PROC_BROWSER_TEST_F(AppServiceAppWindowArcAppBrowserTest, LogicalWindowId) {
app_host()->OnTaskDestroyed(1); app_host()->OnTaskDestroyed(1);
windows = app_service_proxy_->InstanceRegistry().GetWindows(app_id); windows = app_service_proxy_->InstanceRegistry().GetWindows(app_id);
EXPECT_EQ(1u, windows.size()); EXPECT_EQ(1u, windows.size());
EXPECT_EQ(0u, std::count_if(windows.begin(), windows.end(), is_hidden)); EXPECT_EQ(0, std::count_if(windows.begin(), windows.end(), is_hidden));
// Close second window. // Close second window.
app_host()->OnTaskDestroyed(2); app_host()->OnTaskDestroyed(2);
......
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