Bug 1090563 - Fix shared iframe use in Loop. r=jaws, a=lsblakk
authorShane Caraveo <scaraveo@mozilla.com>
Thu, 06 Nov 2014 11:09:00 -0500
changeset 233692 de2f99c42f9863bc9a206bbe7c8505f3db659aa9
parent 233691 46d0ef8ca0daad69c122465c284d020ce8a83062
child 233693 43dcdc7f4626e253134525dc95506ff9b66598dd
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, lsblakk
bugs1090563
milestone35.0a2
Bug 1090563 - Fix shared iframe use in Loop. r=jaws, a=lsblakk
browser/base/content/browser-social.js
browser/base/content/browser.js
browser/modules/PanelFrame.jsm
browser/modules/SharedFrame.jsm
browser/modules/moz.build
browser/modules/test/chrome/chrome.ini
browser/modules/test/chrome/sharedframe.xul
browser/modules/test/chrome/test_sharedframe.xul
--- a/browser/base/content/browser-social.js
+++ b/browser/base/content/browser-social.js
@@ -7,19 +7,16 @@ let SocialUI,
     SocialFlyout,
     SocialMarks,
     SocialShare,
     SocialSidebar,
     SocialStatus;
 
 (function() {
 
-XPCOMUtils.defineLazyModuleGetter(this, "SharedFrame",
-  "resource:///modules/SharedFrame.jsm");
-
 XPCOMUtils.defineLazyModuleGetter(this, "PanelFrame",
   "resource:///modules/PanelFrame.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "OpenGraphBuilder", function() {
   let tmp = {};
   Cu.import("resource:///modules/Social.jsm", tmp);
   return tmp.OpenGraphBuilder;
 });
@@ -1262,17 +1259,16 @@ SocialStatus = {
       document.getElementById("social-notification-panel").hidePopup();
     this._removeFrame(origin);
   },
 
   _removeFrame: function(origin) {
     let notificationFrameId = "social-status-" + origin;
     let frame = document.getElementById(notificationFrameId);
     if (frame) {
-      SharedFrame.forgetGroup(frame.id);
       frame.parentNode.removeChild(frame);
     }
   },
 
   get _toolbarHelper() {
     delete this._toolbarHelper;
     this._toolbarHelper = new ToolbarHelper("social-status-button",
                                             CreateSocialStatusWidget,
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -3701,17 +3701,17 @@ var XULBrowserWindow = {
       return true;
 
     let browser = aDocShell.QueryInterface(Ci.nsIDocShellTreeItem)
                            .sameTypeRootTreeItem
                            .QueryInterface(Ci.nsIDocShell)
                            .chromeEventHandler;
 
     // Ignore loads that aren't in the main tabbrowser
-    if (browser.localName != "browser" || browser.getTabBrowser() != gBrowser)
+    if (browser.localName != "browser" || !browser.getTabBrowser || browser.getTabBrowser() != gBrowser)
       return true;
 
     if (!E10SUtils.shouldLoadURI(aDocShell, aURI, aReferrer)) {
       E10SUtils.redirectLoad(aDocShell, aURI, aReferrer);
       return false;
     }
 
     return true;
--- a/browser/modules/PanelFrame.jsm
+++ b/browser/modules/PanelFrame.jsm
@@ -9,18 +9,16 @@ this.EXPORTED_SYMBOLS = ["PanelFrame"];
 
 const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI", "resource:///modules/CustomizableUI.jsm");
 
-XPCOMUtils.defineLazyModuleGetter(this, "SharedFrame", "resource:///modules/SharedFrame.jsm");
-
 XPCOMUtils.defineLazyModuleGetter(this, "DynamicResizeWatcher", "resource:///modules/Social.jsm");
 
 // The minimum sizes for the auto-resize panel code.
 const PANEL_MIN_HEIGHT = 100;
 const PANEL_MIN_WIDTH = 330;
 
 let PanelFrameInternal = {
   /**
@@ -43,54 +41,54 @@ let PanelFrameInternal = {
    * @param {String} aOrigin Optional, the origin to use for the iframe.
    * @param {String} aSrc The url to load into the iframe.
    * @param {String} aSize The initial size of the panel (width and height are the same
    *                       if specified).
    */
   _attachNotificatonPanel: function(aWindow, aParent, aButton, aType, aOrigin, aSrc, aSize) {
     aParent.hidden = false;
     let notificationFrameId = aOrigin ? aType + "-status-" + aOrigin : aType;
-    let frame = aWindow.document.getElementById(notificationFrameId);
+    let doc = aWindow.document;
+    let frame = doc.getElementById(notificationFrameId);
 
     // If the button was customized to a new location, destroy the
     // iframe and start fresh.
     if (frame && frame.parentNode != aParent) {
-      SharedFrame.forgetGroup(frame.id);
       frame.parentNode.removeChild(frame);
       frame = null;
     }
 
     if (!frame) {
       let {width, height} = aSize ? aSize : {width: PANEL_MIN_WIDTH, height: PANEL_MIN_HEIGHT};
+      frame = doc.createElement("browser");
+      let attrs = {
+        "type": "content",
+        "mozbrowser": "true",
+        // All frames use social-panel-frame as the class.
+        "class": "social-panel-frame",
+        "id": notificationFrameId,
+        "tooltip": "aHTMLTooltip",
+        "context": "contentAreaContextMenu",
+        "flex": "1",
 
-      frame = SharedFrame.createFrame(
-        notificationFrameId, /* frame name */
-        aParent, /* parent */
-        {
-          "type": "content",
-          "mozbrowser": "true",
-          // All frames use social-panel-frame as the class.
-          "class": "social-panel-frame",
-          "id": notificationFrameId,
-          "tooltip": "aHTMLTooltip",
-          "context": "contentAreaContextMenu",
-          "flex": "1",
+        // work around bug 793057 - by making the panel roughly the final size
+        // we are more likely to have the anchor in the correct position.
+        "style": "width: " + width + "px; height: " + height + "px;",
+        "dynamicresizer": !aSize,
 
-          // work around bug 793057 - by making the panel roughly the final size
-          // we are more likely to have the anchor in the correct position.
-          "style": "width: " + width + "px; height: " + height + "px;",
-          "dynamicresizer": !aSize,
-
-          "origin": aOrigin,
-          "src": aSrc
-        }
-      );
+        "origin": aOrigin,
+        "src": aSrc
+      };
+      for (let [k, v] of Iterator(attrs)) {
+        frame.setAttribute(k, v);
+      }
+      aParent.appendChild(frame);
     } else {
       frame.setAttribute("origin", aOrigin);
-      SharedFrame.updateURL(notificationFrameId, aSrc);
+      frame.setAttribute("src", aSrc);
     }
     aButton.setAttribute("notificationFrameId", notificationFrameId);
   }
 };
 
 /**
  * The exported PanelFrame object
  */
@@ -151,17 +149,16 @@ let PanelFrame = {
       if (dynamicResizer)
         dynamicResizer.stop();
       notificationFrame.docShell.isActive = false;
       dispatchPanelEvent(aType + "FrameHide");
     });
 
     panel.addEventListener("popupshown", function onpopupshown() {
       panel.removeEventListener("popupshown", onpopupshown);
-      SharedFrame.setOwner(notificationFrameId, notificationFrame);
       let initFrameShow = () => {
         notificationFrame.docShell.isActive = true;
         notificationFrame.docShell.isAppTab = true;
         if (dynamicResizer)
           dynamicResizer.start(panel, notificationFrame);
         dispatchPanelEvent(aType + "FrameShow");
       };
       // This attribute is needed on both the button and the
deleted file mode 100644
--- a/browser/modules/SharedFrame.jsm
+++ /dev/null
@@ -1,221 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-this.EXPORTED_SYMBOLS = [ "SharedFrame" ];
-
-const Ci = Components.interfaces;
-const Cu = Components.utils;
-
-/**
- * The purpose of this module is to create and group various iframe
- * elements that are meant to all display the same content and only
- * one at a time. This makes it possible to have the content loaded
- * only once, while the other iframes can be kept as placeholders to
- * quickly move the content to them through the swapFrameLoaders function
- * when another one of the placeholder is meant to be displayed.
- * */
-
-let Frames = new Map();
-
-/**
- * The Frames map is the main data structure that holds information
- * about the groups being tracked. Each entry's key is the group name,
- * and the object holds information about what is the URL being displayed
- * on that group, and what is the active element on the group (the frame that
- * holds the loaded content).
- * The reference to the activeFrame is a weak reference, which allows the
- * frame to go away at any time, and when that happens the module considers that
- * there are no active elements in that group. The group can be reactivated
- * by changing the URL, calling preload again or adding a new element.
- *
- *
- *  Frames = {
- *    "messages-panel": {
- *      url: string,
- *      activeFrame: weakref
- *    }
- *  }
- *
- * Each object on the map is called a _SharedFrameGroup, which is an internal
- * class of this module which does not automatically keep track of its state. This
- * object should not be used externally, and all control should be handled by the
- * module's functions.
- */
-
-function UNLOADED_URL(aStr) "data:text/html;charset=utf-8,<!-- Unloaded frame " + aStr + " -->";
-
-
-this.SharedFrame = {
-  /**
-   * Creates an iframe element and track it as part of the specified group
-   * The module must create the iframe itself because it needs to do some special
-   * handling for the element's src attribute.
-   *
-   * @param aGroupName        the name of the group to which this frame belongs
-   * @param aParent           the parent element to which the frame will be appended to
-   * @param aFrameAttributes  an object with a list of attributes to set in the iframe
-   *                          before appending it to the DOM. The "src" attribute has
-   *                          special meaning here and if it's not blank it specifies
-   *                          the URL that will be initially assigned to this group
-   * @param aPreload          optional, tells if the URL specified in the src attribute
-   *                          should be preloaded in the frame being created, in case
-   *                          it's not yet preloaded in any other frame of the group.
-   *                          This parameter has no meaning if src is blank.
-   */
-  createFrame: function (aGroupName, aParent, aFrameAttributes, aPreload = true) {
-    let frame = aParent.ownerDocument.createElement("iframe");
-
-    for (let [key, val] of Iterator(aFrameAttributes)) {
-      frame.setAttribute(key, val);
-    }
-
-    let src = aFrameAttributes.src;
-    if (!src) {
-      aPreload = false;
-    }
-
-    let group = Frames.get(aGroupName);
-
-    if (group) {
-      // If this group has already been created
-
-      if (aPreload && !group.isAlive) {
-        // If aPreload is set and the group is not already loaded, load it.
-        // This can happen if:
-        // - aPreload was not used while creating the previous frames of this group, or
-        // - the previously active frame went dead in the meantime
-        group.url = src;
-        this.preload(aGroupName, frame);
-      } else {
-        // If aPreload is not set, or the group is already loaded in a different frame,
-        // there's not much that we need to do here: just create this frame as an
-        // inactivate placeholder
-        frame.setAttribute("src", UNLOADED_URL(aGroupName));
-      }
-
-    } else {
-      // This is the first time we hear about this group, so let's start tracking it,
-      // and also preload it if the src attribute was set and aPreload = true
-      group = new _SharedFrameGroup(src);
-      Frames.set(aGroupName, group);
-
-      if (aPreload) {
-        this.preload(aGroupName, frame);
-      } else {
-        frame.setAttribute("src", UNLOADED_URL(aGroupName));
-      }
-    }
-
-    aParent.appendChild(frame);
-    return frame;
-
-  },
-
-  /**
-   * Function that moves the loaded content from one active frame to
-   * another one that is currently a placeholder. If there's no active
-   * frame in the group, the content is loaded/reloaded.
-   *
-   * @param aGroupName   the name of the group
-   * @param aTargetFrame the frame element to which the content should
-   *                     be moved to.
-   */
-  setOwner: function (aGroupName, aTargetFrame) {
-    let group = Frames.get(aGroupName);
-    let frame = group.activeFrame;
-
-    if (frame == aTargetFrame) {
-      // nothing to do here
-      return;
-    }
-
-    if (group.isAlive) {
-      // Move document ownership to the desired frame, and make it the active one
-      frame.QueryInterface(Ci.nsIFrameLoaderOwner).swapFrameLoaders(aTargetFrame);
-      group.activeFrame = aTargetFrame;
-    } else {
-      // Previous owner was dead, reload the document at the new owner and make it the active one
-      aTargetFrame.setAttribute("src", group.url);
-      group.activeFrame = aTargetFrame;
-    }
-  },
-
-  /**
-   * Updates the current URL in use by this group, and loads it into the active frame.
-   *
-   * @param aGroupName  the name of the group
-   * @param aURL        the new url
-   */
-  updateURL: function (aGroupName, aURL) {
-    let group = Frames.get(aGroupName);
-    group.url = aURL;
-
-    if (group.isAlive) {
-      group.activeFrame.setAttribute("src", aURL);
-    }
-  },
-
-  /**
-   * Loads the group's url into a target frame, if the group doesn't have a currently
-   * active frame.
-   *
-   * @param aGroupName    the name of the group
-   * @param aTargetFrame  the frame element which should be made active and
-   *                      have the group's content loaded to
-   */
-  preload: function (aGroupName, aTargetFrame) {
-    let group = Frames.get(aGroupName);
-    if (!group.isAlive) {
-      aTargetFrame.setAttribute("src", group.url);
-      group.activeFrame = aTargetFrame;
-    }
-  },
-
-  /**
-   * Tells if a group currently have an active element.
-   *
-   * @param aGroupName  the name of the group
-   */
-  isGroupAlive: function (aGroupName) {
-    return Frames.get(aGroupName).isAlive;
-  },
-
-  /**
-   * Forgets about this group. This function doesn't need to be used
-   * unless the group's name needs to be reused.
-   *
-   * @param aGroupName  the name of the group
-   */
-  forgetGroup: function (aGroupName) {
-    Frames.delete(aGroupName);
-  }
-}
-
-
-function _SharedFrameGroup(aURL) {
-  this.url = aURL;
-  this._activeFrame = null;
-}
-
-_SharedFrameGroup.prototype = {
-  get isAlive() {
-    let frame = this.activeFrame;
-    return !!(frame &&
-              frame.contentDocument &&
-              frame.contentDocument.location);
-  },
-
-  get activeFrame() {
-    return this._activeFrame &&
-           this._activeFrame.get();
-  },
-
-  set activeFrame(aActiveFrame) {
-    this._activeFrame = aActiveFrame
-                        ? Cu.getWeakReference(aActiveFrame)
-                        : null;
-  }
-}
--- a/browser/modules/moz.build
+++ b/browser/modules/moz.build
@@ -1,16 +1,15 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
-MOCHITEST_CHROME_MANIFESTS += ['test/chrome/chrome.ini']
 XPCSHELL_TESTS_MANIFESTS += [
     'test/unit/social/xpcshell.ini',
     'test/xpcshell/xpcshell.ini',
 ]
 
 EXTRA_JS_MODULES += [
     'BrowserNewTabPreloader.jsm',
     'BrowserUITelemetry.jsm',
@@ -24,17 +23,16 @@ EXTRA_JS_MODULES += [
     'E10SUtils.jsm',
     'Feeds.jsm',
     'FormSubmitObserver.jsm',
     'FormValidationHandler.jsm',
     'NetworkPrioritizer.jsm',
     'offlineAppCache.jsm',
     'PanelFrame.jsm',
     'RemotePrompt.jsm',
-    'SharedFrame.jsm',
     'SitePermissions.jsm',
     'Social.jsm',
     'TabCrashReporter.jsm',
     'WebappManager.jsm',
 ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     EXTRA_JS_MODULES += [
deleted file mode 100644
--- a/browser/modules/test/chrome/chrome.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[DEFAULT]
-support-files = sharedframe.xul
-
-[test_sharedframe.xul]
deleted file mode 100644
--- a/browser/modules/test/chrome/sharedframe.xul
+++ /dev/null
@@ -1,174 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
-                 type="text/css"?>
-
-<!--
-  Any copyright is dedicated to the Public Domain.
-  http://creativecommons.org/publicdomain/zero/1.0/
--->
-<window title="Test SharedFrame - Bug 811247"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        onload="runTest();">
-
-  <script type="application/javascript"
-          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-  <script type="application/javascript"
-          src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-  <script type="application/javascript">
-  <![CDATA[
-
-    function is(a,b,c) opener.wrappedJSObject.is(a,b,c);
-    function ok(a,b) opener.wrappedJSObject.ok(a,b);
-    function done() opener.wrappedJSObject.done();
-
-    Components.utils.import("resource:///modules/SharedFrame.jsm");
-    ok(SharedFrame, "SharedFrame module exists");
-
-    let box, gGen;
-    function runTest() {
-      box = document.getElementById("frames-container");
-      gGen = test_module();
-      gGen.next();
-    }
-
-    function test_module() {
-      // note: no 'src' attribute means aPreload = false;
-      let frame1 = SharedFrame.createFrame("group1", box, {id: "group1-frame1", type: "content"});
-      let frame2 = SharedFrame.createFrame("group1", box, {id: "group1-frame2", type: "content"});
-      let frame3 = SharedFrame.createFrame("group1", box, {id: "group1-frame3", type: "content"});
-
-      // Check proper attribute assignment
-      is(frame1.id, "group1-frame1", "correct id");
-      is(frame2.id, "group1-frame2", "correct id");
-      is(frame3.id, "group1-frame3", "correct id");
-
-      is(frame1.getAttribute("type"), "content", "correct type");
-      is(frame2.getAttribute("type"), "content", "correct type");
-      is(frame3.getAttribute("type"), "content", "correct type");
-
-      //--------------------------
-      yield waitForLoad([frame1, frame2, frame3]);
-
-      // Check for unloaded in the src URL
-      ok(/Unloaded/.test(frame1.contentDocument.location), "frame 1 is unloaded");
-      ok(/Unloaded/.test(frame2.contentDocument.location), "frame 2 is unloaded");
-      ok(/Unloaded/.test(frame3.contentDocument.location), "frame 3 is unloaded");
-
-      // Check that there is no frame alive in the group
-      ok(!SharedFrame.isGroupAlive("group1"), "group 1 is not alive");
-
-      // Set the URL and load the group
-      SharedFrame.updateURL("group1", "http://www.example.com");
-      SharedFrame.preload("group1", frame1);
-
-      //--------------------------
-      yield waitForLoad([frame1]);
-
-      // Check that frame 1 was properly loaded and the group is alive
-      ok(SharedFrame.isGroupAlive("group1"), "group 1 is now alive");
-      ok(!/Unloaded/.test(frame1.contentDocument.location), "frame 1 is now loaded");
-      ok(/Unloaded/.test(frame2.contentDocument.location), "frame 2 is unloaded");
-      ok(/Unloaded/.test(frame3.contentDocument.location), "frame 3 is unloaded");
-
-      // Move content to frame 2
-      SharedFrame.setOwner("group1", frame2);
-
-      ok(/Unloaded/.test(frame1.contentDocument.location), "frame 1 is unloaded");
-      ok(!/Unloaded/.test(frame2.contentDocument.location), "content was transfered to frame 2");
-      ok(/Unloaded/.test(frame3.contentDocument.location), "frame 3 is unloaded");
-
-      // Update URL and check that new content got loaded
-      SharedFrame.updateURL("group1", "http://www.example.com/new");
-
-      //--------------------------
-      yield waitForLoad([frame2]);
-
-      ok(/new$/.test(frame2.contentDocument.location), "new url loaded");
-
-      // Now remove the loaded content and check if the group is properly reported as unloaded
-      box.removeChild(frame2);
-      ok(!SharedFrame.isGroupAlive("group1"), "group 1 is not alive");
-
-      // And see if setOwnering will reload the group
-      SharedFrame.setOwner("group1", frame3);
-
-      //--------------------------
-      yield waitForLoad([frame3]);
-
-      ok(SharedFrame.isGroupAlive("group1"), "group 1 is alive");
-      ok(/new$/.test(frame3.contentDocument.location), "content was transfered to frame 3");
-
-      // Create a second group to verify it doesn't interact with the first one. Also test
-      // that preloading works
-      let frame4 = SharedFrame.createFrame("group2", box, {src: "http://www.example.com/group2", type: "content"});
-      let frame5 = SharedFrame.createFrame("group2", box, {src: "http://www.example.com/group2", type: "content"});
-
-      //--------------------------
-      yield waitForLoad([frame4, frame5]);
-
-      ok(SharedFrame.isGroupAlive("group2"), "group 2 was preloaded due to the src attribute");
-
-      // Check for unloaded in the src URL
-      ok(/group2$/.test(frame4.contentDocument.location), "frame 4 is loaded");
-      ok(/Unloaded/.test(frame5.contentDocument.location), "frame 5 is unloaded");
-
-      SharedFrame.setOwner("group2", frame5);
-
-      ok(/Unloaded/.test(frame4.contentDocument.location), "frame 4 is unloaded");
-      ok(/group2$/.test(frame5.contentDocument.location), "frame 5 is loaded");
-
-      SharedFrame.updateURL("group2", "http://www.example.com/new2");
-
-      //--------------------------
-      yield waitForLoad([frame5]);
-
-      ok(/new2$/.test(frame5.contentDocument.location), "frame 5 changed");
-      ok(/Unloaded/.test(frame1.contentDocument.location), "frame 1 still has its previous value");
-      ok(/new$/.test(frame3.contentDocument.location), "frame 3 still has its previous value");
-
-      //And now check that aPreload parameter works
-      let frame7 = SharedFrame.createFrame("group3", box, {src: "http://www.example.com/group3", type: "content"}, false);
-
-      //--------------------------
-      yield waitForLoad([frame7]);
-
-      ok(!SharedFrame.isGroupAlive("group3"), "aPreload = false works");
-      ok(/Unloaded/.test(frame7.contentDocument.location), "frame 7 is unloaded");
-
-      let frame8 = SharedFrame.createFrame("group3", box, {src: "http://www.example.com/group3", type: "content"});
-
-      //--------------------------
-      yield waitForLoad([frame8]);
-
-      ok(SharedFrame.isGroupAlive("group3"), "aPreload defauls to true");
-      ok(/group3/.test(frame8.contentDocument.location), "aPreload + src loads/reloads group");
-
-      done();
-    }
-
-
-    function waitForLoad(frames) {
-      let count = frames.length;
-      for (let frame of frames) {
-        let f = frame;
-        f.addEventListener("DOMContentLoaded", function frameloaded(event) {
-          f.removeEventListener("DOMContentLoaded", frameloaded, false);
-          if (--count == 0) {
-            try { gGen.next() } catch (ex if ex instanceof StopIteration) { }
-          }
-        }, false);
-      }
-    }
-  ]]>
-  </script>
-
-  <box id="frames-container"/>
-
-  <body xmlns="http://www.w3.org/1999/xhtml">
-    <p id="display"></p>
-    <div id="content" style="display:none;"></div>
-    <pre id="test"></pre>
-  </body>
-  <label id="test-result"/>
-</window>
deleted file mode 100644
--- a/browser/modules/test/chrome/test_sharedframe.xul
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
-                 type="text/css"?>
-
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=811247
--->
-<window title="Mozilla Bug 811247"
-  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript"
-          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-  <!-- test results are displayed in the html:body -->
-  <body xmlns="http://www.w3.org/1999/xhtml">
-  <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=811247"
-     target="_blank">Mozilla Bug 811247</a>
-  </body>
-
-  <script type="application/javascript"><![CDATA[
-
-  /* Test for Bug 811247
-   *
-   * The test must run on a separate window becase .swapFrameLoaders currently won't swap
-   * iframes that are inside frames with history enabled, which is the case of the test running
-   * in the content area of a regular browser window; so we need a blank xul window for that
-   */
-  SimpleTest.waitForExplicitFinish();
-
-  let testWin;
-
-  function done() {
-    testWin.close();
-    SimpleTest.finish();
-  }
-
-  addLoadEvent(function() {
-    testWin = window.open("sharedframe.xul", "", "chrome,dialog,width=400,height=400");
-  });
-  ]]></script>
-</window>