Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: third_party/WebKit/LayoutTests/vr/getVRDisplays_detached.html

Issue 2703283003: Gracefully handle navigator.getVRDisplays() in detached contexts. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Detached use of navigator.getVRDisplays()</title>
5 <script src="../resources/testharness.js"></script>
6 <script src="../resources/testharnessreport.js"></script>
7 </head>
8 <body>
9 <iframe sandbox="allow-same-origin" id="subframe"></iframe>
10 <script>
11 test(() => {
12 var nav = window.frames[0].navigator;
13 document.getElementById("subframe").remove();
14 // A promise won't be rejected when in a detached context,
15 // so the undefined value is returned.
16 assert_equals(nav.getVRDisplays(), undefined);
17 });
18 </script>
19 </body>
20 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698