Bug 1224873 - part 2 - remove SVG background image tests from browser_use_counters.js; r=dholbert
authorNathan Froyd <froydnj@mozilla.com>
Thu, 29 Sep 2016 17:56:33 -0400
changeset 315840 fe97a239ab5a2c8111712ca86a9ed3fdb5f4e942
parent 315839 19a1bd113a836e589c65acad8e677e0e0ed36ec1
child 315841 7de1a998b12ee384adec77550f7364eef1283660
push id20634
push usercbook@mozilla.com
push dateFri, 30 Sep 2016 10:10:13 +0000
treeherderfx-team@afe79b010d13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1224873
milestone52.0a1
Bug 1224873 - part 2 - remove SVG background image tests from browser_use_counters.js; r=dholbert These tests are racy, as we can receive all the data for the SVG image, thereby unblocking the onload event, but the actual SVG image may not be fully decoded, which means that we're not getting the use counters updated that we need for the test. Other SVG image tests should go through the same codepaths as rendering SVG images for backgrounds, though, so these tests are superfluous.
dom/base/test/browser_use_counters.js
--- a/dom/base/test/browser_use_counters.js
+++ b/dom/base/test/browser_use_counters.js
@@ -35,16 +35,27 @@ add_task(function* () {
   // Check that use counters are incremented by SVGs loaded directly in iframes.
   yield check_use_counter_iframe("file_use_counter_svg_getElementById.svg",
                                  "SVGSVGELEMENT_GETELEMENTBYID");
   yield check_use_counter_iframe("file_use_counter_svg_currentScale.svg",
                                  "SVGSVGELEMENT_CURRENTSCALE_getter");
   yield check_use_counter_iframe("file_use_counter_svg_currentScale.svg",
                                  "SVGSVGELEMENT_CURRENTSCALE_setter");
 
+  // Check that even loads from the imglib cache update use counters.  The
+  // images should still be there, because we just loaded them in the last
+  // set of tests.  But we won't get updated counts for the document
+  // counters, because we won't be re-parsing the SVG documents.
+  yield check_use_counter_iframe("file_use_counter_svg_getElementById.svg",
+                                 "SVGSVGELEMENT_GETELEMENTBYID", false);
+  yield check_use_counter_iframe("file_use_counter_svg_currentScale.svg",
+                                 "SVGSVGELEMENT_CURRENTSCALE_getter", false);
+  yield check_use_counter_iframe("file_use_counter_svg_currentScale.svg",
+                                 "SVGSVGELEMENT_CURRENTSCALE_setter", false);
+
   // Check that use counters are incremented by SVGs loaded as images.
   // Note that SVG images are not permitted to execute script, so we can only
   // check for properties here.
   yield check_use_counter_img("file_use_counter_svg_getElementById.svg",
                               "PROPERTY_FILL");
   yield check_use_counter_img("file_use_counter_svg_currentScale.svg",
                               "PROPERTY_FILL");
 
@@ -59,29 +70,18 @@ add_task(function* () {
                                  "PROPERTY_FILLOPACITY");
   // data: URLs don't correctly propagate to their referring document yet.
   //yield check_use_counter_direct("file_use_counter_svg_fill_pattern_data.svg",
   //                               "PROPERTY_FILL_OPACITY");
 
   // Check that use counters are incremented by SVGs loaded as CSS images in
   // pages loaded in iframes.  Again, SVG images in CSS aren't permitted to
   // execute script, so we need to use properties here.
-  yield check_use_counter_iframe("file_use_counter_svg_background.html",
-                                 "PROPERTY_FILL");
   yield check_use_counter_iframe("file_use_counter_svg_list_style_image.html",
                                  "PROPERTY_FILL");
-
-  // Check that even loads from the imglib cache update use counters.  The
-  // background images should still be there, because we just loaded them
-  // in the last set of tests.  But we won't get updated counts for the
-  // document counters, because we won't be re-parsing the SVG documents.
-  yield check_use_counter_iframe("file_use_counter_svg_background.html",
-                                 "PROPERTY_FILL", false);
-  yield check_use_counter_iframe("file_use_counter_svg_list_style_image.html",
-                                 "PROPERTY_FILL", false);
 });
 
 add_task(function* () {
   let Telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry);
   Telemetry.canRecordExtended = gOldParentCanRecord;
 
   yield ContentTask.spawn(gBrowser.selectedBrowser, { oldCanRecord: gOldContentCanRecord }, function (arg) {
     Cu.import("resource://gre/modules/PromiseUtils.jsm");