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

Unified Diff: third_party/WebKit/LayoutTests/vr/getFrameData_noupdate.html

Issue 2659853006: Add getFrameData and getPose layout tests (Closed)
Patch Set: Add more tests 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/vr/getFrameData_oneframeupdate.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/vr/getFrameData_noupdate.html
diff --git a/third_party/WebKit/LayoutTests/vr/getFrameData_noupdate.html b/third_party/WebKit/LayoutTests/vr/getFrameData_noupdate.html
new file mode 100644
index 0000000000000000000000000000000000000000..edfc5efd7b53648e2ffba7418cdab42b36b5d8e1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/vr/getFrameData_noupdate.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="../resources/mojo-helpers.js"></script>
+<script src="resources/fake-vr-displays.js"></script>
+<script src="resources/mock-vr-service.js"></script>
+<script src="resources/test-constants.js"></script>
+<script>
+let fakeDisplays = fakeVRDisplays();
+
+vr_test( (t, mock_service) => {
+ return navigator.getVRDisplays().then( (displays) => {
+ var display = displays[0];
+ mock_service.mockVRDisplays_[0].setPose(VALID_POSE);
+ var fd = new VRFrameData();
+ t.step( () => {
+ assert_false(display.getFrameData(fd));
+ }, "getFrameData did not update object initially");
+
+ function checkLater() {
+ t.step( () => {
+ assert_false(display.getFrameData(fd));
+ }, "getFrameData did not update object after delay");
+ t.done();
+ }
+
+ window.setTimeout(checkLater, 500);
+ }, (err) => {
+ t.step( () => {
+ assert_unreached("getVRDisplays rejected");
+ });
+ t.done();
+ });
+}, [fakeDisplays["Pixel"]],
+"getFrameData does not update objects until data is available after rAF call");
+
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/vr/getFrameData_oneframeupdate.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698