Commit d6a067e2 authored by Willie Koomson's avatar Willie Koomson Committed by Commit Bot

arc: Fix ArcVmClientAdapterTest.ChromeOsChannel* unittests

This change fixes ArcVmClientAdapterTest.ChromeOsChannel{Stable,Unknown}
by adding a call to base::SysInfo::ResetChromeOSVersionInfoForTest().
This fixes a crash in base::SysInfo::SetChromeOSVersionInfoForTest that
happens when it is called twice without being reset.

BUG=b:174186047
TEST=ArcVmClientAdapterTest unittests

Change-Id: I5ba40f3efe5ddd44fbcf9ec7ec56711678c50248
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2559533
Auto-Submit: Willie Koomson <wvk@google.com>
Reviewed-by: default avatarYusuke Sato <yusukes@chromium.org>
Commit-Queue: Yusuke Sato <yusukes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831216}
parent 651d9f85
......@@ -1199,6 +1199,8 @@ TEST_F(ArcVmClientAdapterTest, ChromeOsChannelStable) {
EXPECT_TRUE(
base::Contains(GetTestConciergeClient()->start_arc_vm_request().params(),
"androidboot.chromeos_channel=stable"));
base::SysInfo::ResetChromeOSVersionInfoForTest();
}
TEST_F(ArcVmClientAdapterTest, ChromeOsChannelUnknown) {
......@@ -1212,6 +1214,8 @@ TEST_F(ArcVmClientAdapterTest, ChromeOsChannelUnknown) {
EXPECT_TRUE(
base::Contains(GetTestConciergeClient()->start_arc_vm_request().params(),
"androidboot.chromeos_channel=unknown"));
base::SysInfo::ResetChromeOSVersionInfoForTest();
}
// Tests that the binary translation type is set to None when no library is
......
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