Bug 1156939 - Don't stash a reference to a CPOW and then spin the event loop. r=mconley, a=test-only
authorBlake Kaplan <mrbkap@gmail.com>
Thu, 23 Apr 2015 13:24:56 -0700
changeset 260261 0efa961d5162
parent 260258 8a2c933394da
child 260262 b29a45098630
push id731
push userryanvm@gmail.com
push date2015-04-24 19:52 +0000
treeherdermozilla-release@38ff61772a2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley, test-only
bugs1156939
milestone38.0
Bug 1156939 - Don't stash a reference to a CPOW and then spin the event loop. r=mconley, a=test-only
browser/base/content/test/general/browser_bug710878.js
--- a/browser/base/content/test/general/browser_bug710878.js
+++ b/browser/base/content/test/general/browser_bug710878.js
@@ -1,29 +1,26 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function test()
 {
   waitForExplicitFinish();
 
-  let doc;
-
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.selectedBrowser.addEventListener("load", function onload() {
     gBrowser.selectedBrowser.removeEventListener("load", onload, true);
-    doc = content.document;
     waitForFocus(performTest, content);
   }, true);
 
-  content.location = "data:text/html,<a href='%23xxx'><span>word1 <span> word2 </span></span><span> word3</span></a>";
+  content.location = "data:text/html;charset=utf-8,<a href='%23xxx'><span>word1 <span> word2 </span></span><span> word3</span></a>";
 
   function performTest()
   {
+    let doc = content.document;
     let link = doc.querySelector("a");;
     let text = gatherTextUnder(link);
     is(text, "word1 word2 word3", "Text under link is correctly computed.");
-    doc = null;
     gBrowser.removeCurrentTab();
     finish();
   }
 }