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

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

Issue 2623613002: Reland 2617183002 without offending tests (Closed)
Patch Set: Created 3 years, 11 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 <script src="../resources/mojo-helpers.js"></script> 4 <script src="../resources/mojo-helpers.js"></script>
5 <script src="resources/fake-vr-displays.js"></script> 5 <script src="resources/fake-vr-displays.js"></script>
6 <script src="resources/mock-vr-service.js"></script> 6 <script src="resources/mock-vr-service.js"></script>
7 <script src="resources/test-constants.js"></script>
7 <script> 8 <script>
8 let fakeDisplays = fakeVRDisplays(); 9 let fakeDisplays = fakeVRDisplays();
9 10
10 vr_test((service) => { 11 vr_test( (t) => {
11 return navigator.getVRDisplays().then(devices => { 12 return navigator.getVRDisplays().then( (displays) => {
12 assert_true(devices != null); 13 t.step( () => {
13 assert_equals(1, devices.length); 14 assert_true(displays != null);
14 assert_equals(devices[0].displayName, 'Google, Inc. Daydream View'); 15 assert_equals(displays.length, 1);
15 assert_true(devices[0].capabilities.hasOrientation); 16 let display = displays[0];
16 assert_true(devices != null); 17 assert_equals(display.displayName, 'Google, Inc. Daydream View');
18 assert_true(display.capabilities.hasOrientation);
19 assert_approx_equals(display.depthNear, 0.01, FLOAT_EPSILON);
20 assert_approx_equals(display.depthFar, 10000.0, FLOAT_EPSILON);
21 }, "getVRDisplays returned correct results");
22 }, (err) => {
23 t.step( () => {
24 assert_unreached("getVRDisplays rejected");
17 }); 25 });
18 }, [fakeDisplays['Pixel']], 'test 1 VRDisplay'); 26 }).then( () => {
27 t.done();
28 });
29 }, [fakeDisplays["Pixel"]],
30 "WebVR properly returns a single display");
19 31
20 </script> 32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698