Bug 1134307 - Access the title of the loaded page by using ctx.tab2Browser.contentTitle in browser_bug592641.js to avoid CPOW usage. r=mconley, a=test-only
authorKevin Chan <kevchan85@yahoo.com>
Fri, 26 Aug 2016 09:59:00 -0400
changeset 342520 009ea36672be7651bcb0223f0112a501fcf82ac6
parent 342519 ae09dea17424b3686ab8e0c59b4b6d4ea6087abd
child 342521 4e78a1131df04cca842c7bf1fcb6b873f8a0a0e9
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley, test-only
bugs1134307, 592641
milestone49.0
Bug 1134307 - Access the title of the loaded page by using ctx.tab2Browser.contentTitle in browser_bug592641.js to avoid CPOW usage. r=mconley, a=test-only
dom/html/test/browser_bug592641.js
--- a/dom/html/test/browser_bug592641.js
+++ b/dom/html/test/browser_bug592641.js
@@ -25,17 +25,17 @@ function load1Soon() {
   ctx.tab1Browser.removeEventListener("load", load1Soon, true);
   // onload is fired in OnStopDecode, so let's use executeSoon() to make sure
   // that any other OnStopDecode event handlers get the chance to fire first.
   executeSoon(load1Done);
 }
 
 function load1Done() {
   // Check the title
-  var title = ctx.tab1Browser.contentWindow.document.title;
+  var title = ctx.tab1Browser.contentTitle;
   checkTitle(title);
 
   // Try loading the same image in a new tab to make sure things work in
   // the cached case.
   ctx.tab2 = gBrowser.addTab(testPath + "bug592641_img.jpg");
   ctx.tab2Browser = gBrowser.getBrowserForTab(ctx.tab2);
   ctx.tab2Browser.addEventListener("load", load2Soon, true);
 }
@@ -44,17 +44,17 @@ function load2Soon() {
   ctx.tab2Browser.removeEventListener("load", load2Soon, true);
   // onload is fired in OnStopDecode, so let's use executeSoon() to make sure
   // that any other OnStopDecode event handlers get the chance to fire first.
   executeSoon(load2Done);
 }
 
 function load2Done() {
   // Check the title
-  var title = ctx.tab2Browser.contentWindow.document.title;
+  var title = ctx.tab2Browser.contentTitle;
   checkTitle(title);
 
   // Clean up
   gBrowser.removeTab(ctx.tab1);
   gBrowser.removeTab(ctx.tab2);
 
   // Test done
   finish();