Commit a36a08e0 authored by Alex Cooper's avatar Alex Cooper Committed by Commit Bot

Fix WebXR input browser test usage of RunJavaScriptAndExtractBoolOrFail

Bug: 1002737
Change-Id: I74070a0ad0f0633521247e1c74ea0147ccc0505d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1797248
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Auto-Submit: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: default avatarBrian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695402}
parent fbcffd3c
......@@ -30,9 +30,9 @@ void VerifyInputSourceProfilesArray(
// verified its size above, so we can check the expressions a single time
// here instead of polling them.
for (size_t i = 0; i < expected_values.size(); ++i) {
t->RunJavaScriptAndExtractBoolOrFail("isProfileEqualTo(" +
base::NumberToString(i) + ", '" +
expected_values[i] + "')");
ASSERT_TRUE(t->RunJavaScriptAndExtractBoolOrFail(
"isProfileEqualTo(" + base::NumberToString(i) + ", '" +
expected_values[i] + "')"));
}
}
......@@ -593,12 +593,14 @@ IN_PROC_MULTI_CLASS_BROWSER_TEST_F2(WebXrVrOpenVrBrowserTest,
button_count = "4";
// Make sure both gamepads have the expected button count and mapping.
t->RunJavaScriptAndExtractBoolOrFail("isButtonCountEqualTo(" + button_count +
", 0)");
t->RunJavaScriptAndExtractBoolOrFail("isButtonCountEqualTo(" + button_count +
", 1)");
t->RunJavaScriptAndExtractBoolOrFail("isMappingEqualTo('xr-standard', 0)");
t->RunJavaScriptAndExtractBoolOrFail("isMappingEqualTo('xr-standard', 1)");
ASSERT_TRUE(t->RunJavaScriptAndExtractBoolOrFail("isButtonCountEqualTo(" +
button_count + ", 0)"));
ASSERT_TRUE(t->RunJavaScriptAndExtractBoolOrFail("isButtonCountEqualTo(" +
button_count + ", 1)"));
ASSERT_TRUE(t->RunJavaScriptAndExtractBoolOrFail(
"isMappingEqualTo('xr-standard', 0)"));
ASSERT_TRUE(t->RunJavaScriptAndExtractBoolOrFail(
"isMappingEqualTo('xr-standard', 1)"));
// Press the trigger and set the axis to a non-zero amount, so we can ensure
// we aren't getting just default gamepad data.
......
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