Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a sessionavailable event that allows content to enter an XR session without a user gesture #27235

Merged
merged 2 commits into from Jul 10, 2020
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Added a test for sessionavailable

  • Loading branch information
asajeffrey committed Jul 10, 2020
commit a6da5dccd1c68e7b33719d91d938ba32844a449b
@@ -14731,6 +14731,13 @@
null,
{}
]
],
"sessionavailable.html": [
"dd9a071d05c4d696471be87428c12cea573cba60",
[
null,
{}
]
]
}
}
@@ -0,0 +1,2 @@
prefs: [dom.webxr.sessionavailable:true]

@@ -0,0 +1,20 @@
<!DOCTYPE html>
<body>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src="./resources/webxr-util.js"></script>
<script>
navigator.xr.test.simulateDeviceConnection({
supportedModes: ["immersive-vr"],
views: TEST_VIEWS,
});
async_test((t) => {
navigator.xr.addEventListener("sessionavailable", (evt) => {
navigator.xr.requestSession("immersive-vr")
.then((session) => {
t.done();
})
});
}, "Requesting immersive session in a sessionavailable handler should succeed");
</script>
</body>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.