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

Update simulateUserActivation to match webxr-test-api spec

Currently it returns a promise, but per the spec it should be void.

Bug: 997305
Change-Id: If8af8e9e184209f5baafd4210ac58b358c7469eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1768552
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Auto-Submit: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: default avatarBrandon Jones <bajones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#690067}
parent 87b30cd3
...@@ -60,19 +60,17 @@ class ChromeXRTest { ...@@ -60,19 +60,17 @@ class ChromeXRTest {
} }
simulateUserActivation(callback) { simulateUserActivation(callback) {
return new Promise(resolve => { let button = document.createElement('button');
let button = document.createElement('button'); button.textContent = 'click to continue test';
button.textContent = 'click to continue test'; button.style.display = 'block';
button.style.display = 'block'; button.style.fontSize = '20px';
button.style.fontSize = '20px'; button.style.padding = '10px';
button.style.padding = '10px'; button.onclick = () => {
button.onclick = () => { callback();
resolve(callback()); document.body.removeChild(button);
document.body.removeChild(button); };
}; document.body.appendChild(button);
document.body.appendChild(button); test_driver.click(button);
test_driver.click(button);
});
} }
} }
......
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