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

Unified Diff: third_party/WebKit/LayoutTests/vr/requestPresent_reject_badrightbounds.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/vr/requestPresent_reject_badrightbounds.html
diff --git a/third_party/WebKit/LayoutTests/vr/requestPresent_reject_badrightbounds.html b/third_party/WebKit/LayoutTests/vr/requestPresent_reject_badrightbounds.html
index 0ff2a67389d71ebd9be1bfd8eda5db0f34dcd13d..8fa5169faec73c2b2422d31f0658562c41edb69d 100644
--- a/third_party/WebKit/LayoutTests/vr/requestPresent_reject_badrightbounds.html
+++ b/third_party/WebKit/LayoutTests/vr/requestPresent_reject_badrightbounds.html
@@ -9,30 +9,34 @@
<script>
let fakeDisplays = fakeVRDisplays();
-vr_test((service) => {
- return navigator.getVRDisplays().then(displays => {
- assert_true(displays != null);
- assert_equals(1, displays.length);
- var asyncTest = async_test(
- "requestPresent rejects and does not present");
- runWithUserGesture( () => {
- displays[0].requestPresent([{
- source : webglCanvas,
- rightBounds: [0, 1, 2, 3, 4] // Too long
- }]).then( () => {
- asyncTest.step( () => {
- assert_unreached();
- }, "Display should not be presenting");
- }, (err) => {
- asyncTest.step( () => {
- assert_false(displays[0].isPresenting);
- }, "requestPresent rejected and not presenting");
- }).then( () => {
- asyncTest.done();
- });
+vr_test( (t) => {
+ return navigator.getVRDisplays().then( (displays) => {
+ var display = displays[0];
+
+ runWithUserGesture( () => {
+ display.requestPresent([{
+ source : webglCanvas,
+ rightBounds: [0, 1, 2, 3, 4] // Too long
+ }])
+ .then( () => {
+ t.step( () => {
+ assert_unreached();
+ }, "Display should not be presenting");
+ }, (err) => {
+ t.step( () => {
+ assert_false(display.isPresenting);
+ }, "requestPresent rejected and not presenting");
+ }).then( () => {
+ t.done();
});
});
-}, [fakeDisplays['Pixel']],
-'Test requestPresent rejects if provided a bad rightBounds');
+ }, (err) => {
+ t.step( () => {
+ assert_unreached(err);
+ }, "getVRDisplays rejected");
+ t.done();
+ });
+}, [fakeDisplays["Pixel"]],
+"Test requestPresent rejects if provided a bad rightBounds");
</script>

Powered by Google App Engine
This is Rietveld 408576698