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 350006 da952731c13a02a15cddb4d2971a1500f9a46000
parent 350005 01a9a573e78df6fc97702c2d3d32a541f9107c31
child 350007 d594e43c1011e2041da94b9efc60cf36200b2bcc
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley, test-only
bugs1134307, 592641
milestone50.0a2
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();