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

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

Issue 2624263003: Add more WebVR layout tests and fix small issues they found (Closed)
Patch Set: Added a few clarifying comments 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
Index: third_party/WebKit/LayoutTests/vr/getLayers_presenting_nondefaultbounds.html
diff --git a/third_party/WebKit/LayoutTests/vr/getLayers_presenting.html b/third_party/WebKit/LayoutTests/vr/getLayers_presenting_nondefaultbounds.html
similarity index 82%
copy from third_party/WebKit/LayoutTests/vr/getLayers_presenting.html
copy to third_party/WebKit/LayoutTests/vr/getLayers_presenting_nondefaultbounds.html
index ff43931e6a13dc18406dca29644f10493c90a95c..ef251b7af7ee66ab73660519aaa0269d6f8b81ca 100644
--- a/third_party/WebKit/LayoutTests/vr/getLayers_presenting.html
+++ b/third_party/WebKit/LayoutTests/vr/getLayers_presenting_nondefaultbounds.html
@@ -19,7 +19,11 @@ vr_test( (t) => {
}, "No layers initially returned");
runWithUserGesture( () => {
- display.requestPresent([{ source : webglCanvas }]).then( () => {
+ let expectedLeft = [0.0, 0.1, 0.2, 0.3];
+ let expectedRight = [0.4, 0.5, 0.6, 0.7];
+ display.requestPresent([{ source : webglCanvas,
+ leftBounds : expectedLeft,
+ rightBounds : expectedRight}]).then( () => {
t.step( () => {
let layers = display.getLayers();
assert_equals(layers.length, 1);
@@ -29,8 +33,6 @@ vr_test( (t) => {
assert_equals(layer.leftBounds.length, 4);
assert_equals(layer.rightBounds.length, 4);
- let expectedLeft = [0.0, 0.0, 0.5, 1.0];
- let expectedRight = [0.5, 0.0, 0.5, 1.0];
for (let i = 0; i < layer.leftBounds.length; i++) {
assert_approx_equals(layer.leftBounds[i], expectedLeft[i],
FLOAT_EPSILON);
@@ -53,6 +55,6 @@ vr_test( (t) => {
t.done();
});
}, [fakeDisplays["Pixel"]],
-"Test getLayers returns an empty array when not presenting");
+"Test getLayers returns non-default bounds when specified in the layer");
</script>

Powered by Google App Engine
This is Rietveld 408576698