Bug 844323 - Follow-up: Fix typo in BrowserElementChildPreload that was breaking bg --> fg transitions in childVisibilityChanged. r=khuey
authorJustin Lebar <justin.lebar@gmail.com>
Mon, 29 Apr 2013 14:56:53 -0400
changeset 130235 a2e4282b32c0a7d4e3593b0868088c4db7878fd1
parent 130234 5e2db92c9675ffb512f1c477b48eada8fa0dc0a7
child 130236 f9969228d97363ff224df38032e8a4f6376d2dc0
push id24608
push useremorley@mozilla.com
push dateTue, 30 Apr 2013 09:38:03 +0000
treeherdermozilla-central@60e522be9d08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs844323
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 844323 - Follow-up: Fix typo in BrowserElementChildPreload that was breaking bg --> fg transitions in childVisibilityChanged. r=khuey Also modify the test so it catches this mistake.
dom/browser-element/BrowserElementChildPreload.js
dom/browser-element/mochitest/priority/test_NestedFrames.html
--- a/dom/browser-element/BrowserElementChildPreload.js
+++ b/dom/browser-element/BrowserElementChildPreload.js
@@ -693,17 +693,17 @@ BrowserElementChild.prototype = {
     this._ownerVisible = data.json.visible;
     this._updateVisibility();
   },
 
   _updateVisibility: function() {
     var visible = this._forcedVisible && this._ownerVisible;
     if (docShell.isActive !== visible) {
       docShell.isActive = visible;
-      sendAsyncMsg('visibility-change', {visibility: visible});
+      sendAsyncMsg('visibility-change', {visible: visible});
     }
   },
 
   _recvSendMouseEvent: function(data) {
     let json = data.json;
     let utils = content.QueryInterface(Ci.nsIInterfaceRequestor)
                        .getInterface(Ci.nsIDOMWindowUtils);
     utils.sendMouseEvent(json.type, json.x, json.y, json.button,
--- a/dom/browser-element/mochitest/priority/test_NestedFrames.html
+++ b/dom/browser-element/mochitest/priority/test_NestedFrames.html
@@ -56,16 +56,20 @@ function runTest() {
        expectMozbrowserEvent(iframe, 'loadend')]
     );
   }).then(function() {
     // Send the outer iframe into the background.  This should change the
     // priority of the inner frame's process to BACKGROUND.
     var p = expectPriorityChange(childID, 'BACKGROUND');
     iframe.setVisible(false);
     return p;
+  }).then(function() {
+    var p = expectPriorityChange(childID, 'FOREGROUND');
+    iframe.setVisible(true);
+    return p;
   }).then(SimpleTest.finish);
 
   document.body.appendChild(iframe);
 }
 
 addEventListener('testready', runTest);
 
 </script>