Bug 545955 - mozmill windows orange bustage fix; assumption is windows tinderbox resolution is limited to 1024x768 or the like. work-around this by collapsing the folder pane so we get enough space. a=bustage-fix
authorAndrew Sutherland <asutherland@asutherland.org>
Thu, 22 Apr 2010 14:58:08 -0700
changeset 5516 d7fdba3f04e3bfb33e59047dff01cf4d5090d4b6
parent 5515 270335f4d429960957361373feb821610f431ed7
child 5517 b4b8c96d6dbdda6ef195b0f4af31f79e5205d97f
push idunknown
push userunknown
push dateunknown
reviewersbustage-fix
bugs545955
Bug 545955 - mozmill windows orange bustage fix; assumption is windows tinderbox resolution is limited to 1024x768 or the like. work-around this by collapsing the folder pane so we get enough space. a=bustage-fix
mail/test/mozmill/quick-filter-bar/test-display-issues.js
mail/test/mozmill/shared-modules/test-folder-display-helpers.js
--- a/mail/test/mozmill/quick-filter-bar/test-display-issues.js
+++ b/mail/test/mozmill/quick-filter-bar/test-display-issues.js
@@ -90,21 +90,25 @@ function test_buttons_collapse_and_expan
       if (qfbCollapsy.hasAttribute("shrink"))
         throw new Error("The collapsy bar should not be shrunk!");
       if (qfbExemplarLabel.clientWidth == 0)
         throw new Error("The exemplar label should not be collapsed!");
     }
 
     // -- GIANT!
     mc.window.resizeTo(1200, 600);
+    // Right, so resizeTo caps us at the display size limit, so we may end up
+    // smaller than we want.  So let's turn off the folder pane too.
+    mc.e("folderpane_splitter").collapsed = true;
     // spin the event loop once
     mc.sleep(0);
     assertExpanded();
 
     // -- tiny.
+    mc.e("folderpane_splitter").collapsed = false;
     mc.window.resizeTo(600, 600);
     // spin the event loop once
     mc.sleep(0);
     assertCollapsed();
 
     // -- GIANT again!
     mc.window.resizeTo(1200, 600);
     // spin the event loop once
--- a/mail/test/mozmill/shared-modules/test-folder-display-helpers.js
+++ b/mail/test/mozmill/shared-modules/test-folder-display-helpers.js
@@ -198,17 +198,22 @@ function setupModule() {
 
 /**
  * Install this module into the provided module.
  */
 function installInto(module) {
   setupModule();
 
   // force the window to be a nice size we all can love.
-  mc.window.resizeTo(1024, 768);
+  // note that we can't resize a window larger than the display it lives on!
+  // (I think the inner window is actually limited to the display size, so since
+  // resizeTo operates on outerWidth/outerHeight, their limit is actually
+  // screen size + window border size)
+  if (mc.window.outerWidth != 1024 || mc.window.outerHeight != 768)
+    mc.window.resizeTo(1024, 768);
 
   // now copy everything into the module they provided to us...
   let us = collector.getModule('folder-display-helpers');
   let self = this;
   for each (let [key, value] in Iterator(us)) {
     if (key in EXPORT_VIA_GETTER_SETTER) {
       // The value of |key| changes between iterations, so it's important to
       // capture the right key in a local variable.