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

Unified Diff: third_party/WebKit/LayoutTests/vr/exitPresent_reject_notpresenting.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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/vr/exitPresent_resolve.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/vr/exitPresent_reject_notpresenting.html
diff --git a/third_party/WebKit/LayoutTests/vr/exitPresent_reject_notpresenting.html b/third_party/WebKit/LayoutTests/vr/exitPresent_reject_notpresenting.html
new file mode 100644
index 0000000000000000000000000000000000000000..810d1b2612946bffdf760d09a77d6014381d356d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/vr/exitPresent_reject_notpresenting.html
@@ -0,0 +1,38 @@
+<!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>
+<canvas id="webgl-canvas"></canvas>
+<script src="resources/presentation-setup.js"></script>
+<script>
+let fakeDisplays = fakeVRDisplays();
+
+vr_test( (t) => {
+ return navigator.getVRDisplays().then( (displays) => {
+ var display = displays[0];
+
+ return display.exitPresent().then( () => {
+ t.step( () => {
+ assert_unreached();
+ }, "exitPresent succeeded unexpectedly");
+ }, (err) => {
+ t.step( () => {
+ assert_true(err instanceof DOMException);
+ assert_equals(err.name, "InvalidStateError");
+ assert_false(display.isPresenting);
+ }, "Request rejected properly");
+ }).then( () => {
+ t.done();
+ });
+ }, (err) => {
+ t.step( () => {
+ assert_unreached(err);
+ }, "getVRDisplays rejected");
+ t.done()
+ });
+}, [fakeDisplays["Pixel"]],
+"Test exitPresent rejects if not presenting");
+
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/vr/exitPresent_resolve.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698