Backed out changeset 143c20a39729 (bug 1345991) for browser_pageinfo_svg_image.js failures caused by a bad rebase.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 29 Mar 2017 15:22:34 -0400
changeset 379329 552e5179a40330e9ae6743ad5275abf9e417cec4
parent 379328 11a9f462cfe4215520756679fa0d4bb6ee41e69a
child 379330 2e3f578bef93f7becb8a2723b0714e54adeac2f7
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1345991
milestone53.0
backs out143c20a397290b3470a978a488bc4206ee65a705
Backed out changeset 143c20a39729 (bug 1345991) for browser_pageinfo_svg_image.js failures caused by a bad rebase.
browser/base/content/content.js
browser/base/content/test/general/browser.ini
browser/base/content/test/general/browser_pageinfo_svg_image.js
browser/base/content/test/general/svg_image.html
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -1221,20 +1221,18 @@ var PageInfoListener = {
     // One swi^H^H^Hif-else to rule them all.
     if (elem instanceof content.HTMLImageElement) {
       addImage(elem.src, strings.mediaImg,
                (elem.hasAttribute("alt")) ? elem.alt : strings.notSet, elem, false);
     } else if (elem instanceof content.SVGImageElement) {
       try {
         // Note: makeURLAbsolute will throw if either the baseURI is not a valid URI
         //       or the URI formed from the baseURI and the URL is not a valid URI.
-        if (elem.href.baseVal) {
-          let href = Services.io.newURI(elem.href.baseVal, null, Services.io.newURI(elem.baseURI)).spec;
-          addImage(href, strings.mediaImg, "", elem, false);
-        }
+        let href = makeURLAbsolute(elem.baseURI, elem.href.baseVal);
+        addImage(href, strings.mediaImg, "", elem, false);
       } catch (e) { }
     } else if (elem instanceof content.HTMLVideoElement) {
       addImage(elem.currentSrc, strings.mediaVideo, "", elem, false);
     } else if (elem instanceof content.HTMLAudioElement) {
       addImage(elem.currentSrc, strings.mediaAudio, "", elem, false);
     } else if (elem instanceof content.HTMLLinkElement) {
       if (elem.rel && /\bicon\b/i.test(elem.rel)) {
         addImage(elem.href, strings.mediaLink, "", elem, false);
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -343,20 +343,16 @@ tags = mcb
 [browser_offlineQuotaNotification.js]
 skip-if = os == "linux" && !debug # bug 1304273
 [browser_feed_discovery.js]
 support-files = feed_discovery.html
 [browser_gZipOfflineChild.js]
 support-files = test_offline_gzip.html gZipOfflineChild.cacheManifest gZipOfflineChild.cacheManifest^headers^ gZipOfflineChild.html gZipOfflineChild.html^headers^
 [browser_overflowScroll.js]
 [browser_pageInfo.js]
-[browser_pageinfo_svg_image.js]
-support-files =
-  svg_image.html
-  ../general/title_test.svg
 [browser_page_style_menu.js]
 [browser_page_style_menu_update.js]
 [browser_parsable_css.js]
 skip-if = debug # no point in running on both opt and debug, and will likely intermittently timeout on debug
 [browser_parsable_script.js]
 skip-if = asan || (os == 'linux' && !debug && (bits == 32)) # disabled on asan because of timeouts, and bug 1172468 for the linux 32-bit pgo issue.
 [browser_permissions.js]
 support-files =
deleted file mode 100644
--- a/browser/base/content/test/general/browser_pageinfo_svg_image.js
+++ /dev/null
@@ -1,37 +0,0 @@
-function test() {
-  waitForExplicitFinish();
-
-  gBrowser.selectedTab = gBrowser.addTab();
-
-  gBrowser.selectedBrowser.addEventListener("load", function() {
-    var pageInfo = BrowserPageInfo(gBrowser.selectedBrowser.currentURI.spec,
-                                   "mediaTab");
-
-    pageInfo.addEventListener("load", function() {
-      pageInfo.onFinished.push(function() {
-        executeSoon(function() {
-          var imageTree = pageInfo.document.getElementById("imagetree");
-          var imageRowsNum = imageTree.view.rowCount;
-
-          ok(imageTree, "Image tree is null (media tab is broken)");
-
-          is(imageRowsNum, 1, "should have one image");
-
-          // Only bother running this if we've got the right number of rows.
-          if (imageRowsNum == 1) {
-            is(imageTree.view.getCellText(0, imageTree.columns[0]),
-               "https://example.com/browser/browser/base/content/test/pageinfo/title_test.svg",
-               "The URL should be the svg image.");
-          }
-
-          pageInfo.close();
-          gBrowser.removeCurrentTab();
-          finish();
-        });
-      });
-    }, {capture: true, once: true});
-  }, {capture: true, once: true});
-
-  content.location =
-    "https://example.com/browser/browser/base/content/test/pageinfo/svg_image.html";
-}
deleted file mode 100644
--- a/browser/base/content/test/general/svg_image.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-  <head>
-    <title>Test for page info svg images</title>
-  </head>
-  <body>
-    <svg width="20" height="20">
-      <image xlink:href="title_test.svg" width="20" height="20">
-    </svg>
-  </body>
-</html>