Bug 1229481 - Part 1: Move VR mochitest to its subfolder; r=kip
authorDaosheng Mu <daoshengmu@gmail.com>
Thu, 04 May 2017 12:31:51 +0800
changeset 410171 7c13bf6be43e4af673ad9a53838233db45cd8fc2
parent 410170 d3888af691ae559bce34f856075e6be7f36111b5
child 410172 bce41e33bffd069768eba7acb4cb121f1613307a
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskip
bugs1229481
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1229481 - Part 1: Move VR mochitest to its subfolder; r=kip MozReview-Commit-ID: IK9f7aepBgw
dom/vr/moz.build
dom/vr/test/VRSimulationDriver.js
dom/vr/test/WebVRHelpers.js
dom/vr/test/mochitest.ini
dom/vr/test/mochitest/VRSimulationDriver.js
dom/vr/test/mochitest/WebVRHelpers.js
dom/vr/test/mochitest/mochitest.ini
dom/vr/test/mochitest/requestPresent.js
dom/vr/test/mochitest/runVRTest.js
dom/vr/test/mochitest/test_vrDisplay_canvas2d.html
dom/vr/test/mochitest/test_vrDisplay_exitPresent.html
dom/vr/test/mochitest/test_vrDisplay_getFrameData.html
dom/vr/test/mochitest/test_vrDisplay_onvrdisplaydeactivate_crosscontent.html
dom/vr/test/mochitest/test_vrDisplay_requestPresent.html
dom/vr/test/requestPresent.js
dom/vr/test/runVRTest.js
dom/vr/test/test_vrDisplay_canvas2d.html
dom/vr/test/test_vrDisplay_exitPresent.html
dom/vr/test/test_vrDisplay_getFrameData.html
dom/vr/test/test_vrDisplay_onvrdisplaydeactivate_crosscontent.html
dom/vr/test/test_vrDisplay_requestPresent.html
--- a/dom/vr/moz.build
+++ b/dom/vr/moz.build
@@ -23,9 +23,9 @@ UNIFIED_SOURCES = [
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/dom/base'
 ]
 
-MOCHITEST_MANIFESTS += ['test/mochitest.ini']
\ No newline at end of file
+MOCHITEST_MANIFESTS += ['test/mochitest/mochitest.ini']
\ No newline at end of file
rename from dom/vr/test/VRSimulationDriver.js
rename to dom/vr/test/mochitest/VRSimulationDriver.js
rename from dom/vr/test/WebVRHelpers.js
rename to dom/vr/test/mochitest/WebVRHelpers.js
rename from dom/vr/test/mochitest.ini
rename to dom/vr/test/mochitest/mochitest.ini
rename from dom/vr/test/requestPresent.js
rename to dom/vr/test/mochitest/requestPresent.js
rename from dom/vr/test/runVRTest.js
rename to dom/vr/test/mochitest/runVRTest.js
new file mode 100644
--- /dev/null
+++ b/dom/vr/test/mochitest/test_vrDisplay_canvas2d.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>VRDisplay Canvas2D</title>
+    <meta name="timeout" content="long"/>
+    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <script src="runVRTest.js"></script>
+  </head>
+  <body>
+    <script>
+      "use strict";
+      var vrDisplay;
+
+      function requestPresentTest() {
+        async_test(function (test) {
+          vrDisplay.requestAnimationFrame(callback);
+
+          function callback() {
+            vrDisplay.resetPose();
+            vrDisplay.getLayers();
+            vrDisplay.submitFrame();
+            vrDisplay.getEyeParameters("right");
+            test.done();
+          }
+        }, "Finish WebVR Canvas2D requestPresentTest.");
+      }
+
+      function startTest() {
+        promise_test((test) => {
+          var canvas = document.createElement('canvas');
+          (document.body || document.documentElement).appendChild(canvas);
+          var context = canvas.getContext('2d');
+          var img = document.createElement('img');
+          img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACw=";
+
+          return navigator.getVRDisplays().then((displays) => {
+            assert_equals(displays.length, 1, "displays.length must be one after attach.");
+            vrDisplay = displays[0];
+            var frameData = new VRFrameData();
+            return vrDisplay.requestPresent([{source: canvas}]).then(() => {
+              requestPresentTest();
+            });
+          });
+        }, "Finish running WebVR Canvas2D test.");
+      }
+
+      runVRTest(startTest);
+    </script>
+  </body>
+</html>
\ No newline at end of file
rename from dom/vr/test/test_vrDisplay_exitPresent.html
rename to dom/vr/test/mochitest/test_vrDisplay_exitPresent.html
rename from dom/vr/test/test_vrDisplay_getFrameData.html
rename to dom/vr/test/mochitest/test_vrDisplay_getFrameData.html
rename from dom/vr/test/test_vrDisplay_onvrdisplaydeactivate_crosscontent.html
rename to dom/vr/test/mochitest/test_vrDisplay_onvrdisplaydeactivate_crosscontent.html
rename from dom/vr/test/test_vrDisplay_requestPresent.html
rename to dom/vr/test/mochitest/test_vrDisplay_requestPresent.html
deleted file mode 100644
--- a/dom/vr/test/test_vrDisplay_canvas2d.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <title>VRDisplay Canvas2D</title>
-    <meta name="timeout" content="long"/>
-    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <script src="runVRTest.js"></script>
-  </head>
-  <body>
-    <script>
-      var vrDisplay;
-
-      function requestPresentTest() {
-        async_test(function (test) {
-          vrDisplay.requestAnimationFrame(callback);
-
-          function callback() {
-            vrDisplay.resetPose();
-            vrDisplay.getLayers();
-            vrDisplay.submitFrame();
-            vrDisplay.getEyeParameters("right");
-            test.done();
-          }
-        }, "Finish WebVR Canvas2D requestPresentTest.");
-      }
-
-      function startTest() {
-        promise_test((test) => {
-          var canvas = document.createElement('canvas');
-          (document.body || document.documentElement).appendChild(canvas);
-          var context = canvas.getContext('2d');
-          var img = document.createElement('img');
-          img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACw=";
-
-          return navigator.getVRDisplays().then((displays) => {
-            assert_equals(displays.length, 1, "displays.length must be one after attach.");
-            vrDisplay = displays[0];
-            var frameData = new VRFrameData();
-            return vrDisplay.requestPresent([{source: canvas}]).then(() => {
-              requestPresentTest();
-            });
-          });
-        }, "Finish running WebVR Canvas2D test.");
-      }
-
-      runVRTest(startTest);
-    </script>
-  </body>
-</html>
\ No newline at end of file