Bug 1177276 - Pref on canvas.captureStream by default. r=smaug,mt
authorAndreas Pehrson <pehrsons@gmail.com>
Thu, 17 Sep 2015 22:09:24 +0800
changeset 296088 e92fa2dcd9df9c4f63f50dc18fe0e32e8f0e7200
parent 296087 fa5be14d26e5adf896324d91b73cc628bf18b8db
child 296089 3f9843c4493986cadab5b8435c233a8e43d9e9bb
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, mt
bugs1177276
milestone43.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 1177276 - Pref on canvas.captureStream by default. r=smaug,mt
dom/canvas/test/crossorigin/test_canvas2d_crossorigin.html
dom/canvas/test/crossorigin/test_video_crossorigin.html
dom/canvas/test/reftest/reftest.list
dom/canvas/test/test_capture.html
dom/canvas/test/webgl-mochitest/test_capture.html
dom/media/tests/mochitest/head.js
dom/tests/mochitest/general/test_interfaces.html
modules/libpref/init/all.js
--- a/dom/canvas/test/crossorigin/test_canvas2d_crossorigin.html
+++ b/dom/canvas/test/crossorigin/test_canvas2d_crossorigin.html
@@ -200,17 +200,13 @@ function beginTest() {
           }
         }
         testImage(url, attrValData[0], expected_error);
       }
     }
   }
 }
 
-var prefs = [
-  [ "canvas.capturestream.enabled", true ],
-];
-SpecialPowers.pushPrefEnv({ "set" : prefs }, beginTest);
-
+beginTest();
 </script>
 </pre>
 </body>
 </html>
--- a/dom/canvas/test/crossorigin/test_video_crossorigin.html
+++ b/dom/canvas/test/crossorigin/test_video_crossorigin.html
@@ -206,19 +206,14 @@ function beginTest() {
   try {
     document.gl = createCanvas(16, 16).getContext("experimental-webgl");
   } catch (ex) {
     // Mac OS X 10.5 doesn't support WebGL, so we won't run the WebGL tests
   }
   document.manager.runTests(corsTests, startTest);
 }
 
-var prefs = [
-  [ "canvas.capturestream.enabled", true ],
-];
-
 SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({ "set" : prefs }, beginTest);
-
+beginTest();
 </script>
 </pre>
 </body>
 </html>
--- a/dom/canvas/test/reftest/reftest.list
+++ b/dom/canvas/test/reftest/reftest.list
@@ -15,17 +15,17 @@ pref(webgl.force-layers-readback,true)  
 == webgl-clear-test.html?depth wrapper.html?green.png
 == webgl-clear-test.html?stencil wrapper.html?green.png
 == webgl-clear-test.html?depth&stencil wrapper.html?green.png
 
 # Check that resize works:
 == webgl-resize-test.html  wrapper.html?green.png
 
 # Check that captureStream() displays in a local video element
-pref(canvas.capturestream.enabled,true) skip-if(winWidget&&layersGPUAccelerated&&d2d) == webgl-capturestream-test.html?preserve wrapper.html?green.png
+skip-if(winWidget&&layersGPUAccelerated&&d2d) == webgl-capturestream-test.html?preserve wrapper.html?green.png
 
 # Some of the failure conditions are a little crazy. I'm (jgilbert) setting these based on
 # failures encountered when running on Try, and then targetting the Try config by
 # differences in the `sandbox` contents. That is, I'm labeling based on symptoms rather
 # than cause.
 # Lin-R-e10s: gtkWidget && browserIsRemote
 # WinXP-R: winWidget && layersGPUAccelerated && !d2d
 # Win7+-R: winWidget && layersGPUAccelerated && d2d
@@ -152,11 +152,11 @@ skip-if(!winWidget) pref(webgl.disable-a
 # Bug 815648
 == stroketext-shadow.html stroketext-shadow-ref.html
 
 # focus rings
 pref(canvas.focusring.enabled,true) skip-if(B2G) skip-if(Android&&AndroidVersion<15,8,500) skip-if(winWidget) needs-focus == drawFocusIfNeeded.html drawFocusIfNeeded-ref.html
 pref(canvas.customfocusring.enabled,true) skip-if(B2G) skip-if(Android&&AndroidVersion<15,8,500) skip-if(winWidget) needs-focus == drawCustomFocusRing.html drawCustomFocusRing-ref.html
 
 # Check that captureStream() displays in a local video element
-pref(canvas.capturestream.enabled,true) skip-if(winWidget&&layersGPUAccelerated&&d2d) == capturestream.html wrapper.html?green.png
+skip-if(winWidget&&layersGPUAccelerated&&d2d) == capturestream.html wrapper.html?green.png
 
 fuzzy-if(Android,3,40) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),1,1) == 1177726-text-stroke-bounds.html 1177726-text-stroke-bounds-ref.html
--- a/dom/canvas/test/test_capture.html
+++ b/dom/canvas/test/test_capture.html
@@ -102,14 +102,11 @@ function beginTest() {
     .then(checkRequestFrameOrderGuarantee)
     .then(checkDrawColorGreen) // Restore video elements to green.
     .then(checkDrawImageNotCleanRed)
     .then(finish);
 }
 
 SimpleTest.waitForExplicitFinish();
 
-var prefs = [
-  [ "canvas.capturestream.enabled", true ],
-];
-SpecialPowers.pushPrefEnv({ "set" : prefs }, beginTest);
+beginTest();
 </script>
 
--- a/dom/canvas/test/webgl-mochitest/test_capture.html
+++ b/dom/canvas/test/webgl-mochitest/test_capture.html
@@ -166,14 +166,11 @@ function beginTest() {
     .then(checkDrawColorGreen)
     .then(checkClearColorRed)
     .then(checkRequestFrameOrderGuarantee)
     .then(finish);
 }
 
 SimpleTest.waitForExplicitFinish();
 
-var prefs = [
-  [ "canvas.capturestream.enabled", true ],
-];
-SpecialPowers.pushPrefEnv({ "set" : prefs }, beginTest);
+beginTest();
 </script>
 
--- a/dom/media/tests/mochitest/head.js
+++ b/dom/media/tests/mochitest/head.js
@@ -229,17 +229,16 @@ function setupEnvironment() {
     return;
   }
 
   // Running as a Mochitest.
   SimpleTest.requestFlakyTimeout("WebRTC inherently depends on timeouts");
   window.finish = () => SimpleTest.finish();
   SpecialPowers.pushPrefEnv({
     'set': [
-      ['canvas.capturestream.enabled', true],
       ['media.peerconnection.enabled', true],
       ['media.peerconnection.identity.enabled', true],
       ['media.peerconnection.identity.timeout', 120000],
       ['media.peerconnection.ice.stun_client_maximum_transmits', 14],
       ['media.peerconnection.ice.trickle_grace_period', 30000],
       ['media.navigator.permission.disabled', true],
       ['media.navigator.streams.fake', FAKE_ENABLED],
       ['media.getusermedia.screensharing.enabled', true],
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -265,17 +265,17 @@ var interfaceNamesInGlobalScope =
     {name: "CameraRecorderProfile", b2g: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "CameraRecorderProfiles", b2g: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "CameraRecorderVideoProfile", b2g: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "CameraStateChangeEvent", b2g: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    {name: "CanvasCaptureMediaStream", disabled: true},
+    {name: "CanvasCaptureMediaStream"},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "CanvasGradient",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "CanvasPattern",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "CanvasRenderingContext2D",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "CaretPosition",
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -731,18 +731,17 @@ pref("ui.scrollToClick", 0);
 
 // provide ability to turn on support for canvas focus rings
 pref("canvas.focusring.enabled", true);
 pref("canvas.customfocusring.enabled", false);
 pref("canvas.hitregions.enabled", false);
 pref("canvas.filters.enabled", false);
 // Add support for canvas path objects
 pref("canvas.path.enabled", true);
-// captureStream() on canvas disabled by default
-pref("canvas.capturestream.enabled", false);
+pref("canvas.capturestream.enabled", true);
 
 // We want the ability to forcibly disable platform a11y, because
 // some non-a11y-related components attempt to bring it up.  See bug
 // 538530 for details about Windows; we have a pref here that allows it
 // to be disabled for performance and testing resons.
 // See bug 761589 for the crossplatform aspect.
 //
 // This pref is checked only once, and the browser needs a restart to