[Pkg-mozext-commits] [compactheader] 330/441: Remove bugs in toolbar.js and buttonsOverlay (check for elements before reference them). Fix bug toolbar testcase (only test if toolbar is moveable).

David Prévot taffit at moszumanska.debian.org
Wed Mar 18 12:29:14 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository compactheader.

commit 8a18936c2c27a9c1a1d3311e4152cc0764377557
Author: Joachim.Herb at gmx.de <Joachim.Herb at gmx.de>
Date:   Mon Feb 6 20:51:35 2012 +0100

    Remove bugs in toolbar.js and buttonsOverlay (check for elements before reference them). Fix bug toolbar testcase (only test if toolbar is moveable).
    
    Update versions of lightning used in mozmill tests.
---
 chrome/CompactHeader/content/buttonsOverlay.js   |  5 ++-
 chrome/CompactHeader/content/toolbar.js          |  2 +-
 install.rdf                                      |  2 +-
 test/compactheader/test-compactheader-toolbar.js | 41 ++++++++++++------------
 test/executeTests.pl                             |  2 +-
 test/testapps.csv                                | 12 +++----
 6 files changed, 34 insertions(+), 30 deletions(-)

diff --git a/chrome/CompactHeader/content/buttonsOverlay.js b/chrome/CompactHeader/content/buttonsOverlay.js
index 902f985..d8038b2 100644
--- a/chrome/CompactHeader/content/buttonsOverlay.js
+++ b/chrome/CompactHeader/content/buttonsOverlay.js
@@ -96,7 +96,10 @@ org.mozdev.compactHeader.buttons = function() {
       switch (command) {
       case "CompactHeader_button_singlemessage":
           var tabmail = document.getElementById("tabmail");
-          return ((tabmail.selectedTab.mode.name == "folder") && (gFolderDisplay.selectedCount == 1)) || (tabmail.selectedTab.mode.name == "message");
+          return (tabmail == null) ||
+                 ((tabmail.selectedTab.mode.name == "folder") &&
+                  (gFolderDisplay.selectedCount == 1)
+                  ) || (tabmail.selectedTab.mode.name == "message");
       }
       return false;
     },
diff --git a/chrome/CompactHeader/content/toolbar.js b/chrome/CompactHeader/content/toolbar.js
index d2bc407..f4ff5b2 100644
--- a/chrome/CompactHeader/content/toolbar.js
+++ b/chrome/CompactHeader/content/toolbar.js
@@ -550,7 +550,7 @@ org.mozdev.compactHeader.toolbar = function() {
       multiBBox.removeAttribute("collapsed");
     }
 
-    if (singleMessage.getAttribute("hidden")) {
+    if (singleMessage && singleMessage.getAttribute("hidden")) {
       // The multi message view is visible
       org.mozdev.compactHeader.debug.log("move to multibuttonhbox");
       var targetToolbox = getToolbarTarget(targetPos, "");
diff --git a/install.rdf b/install.rdf
index 6d7388a..9f2c388 100644
--- a/install.rdf
+++ b/install.rdf
@@ -24,7 +24,7 @@
 			<RDF:Description>
 				<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
 				<em:minVersion>8.0</em:minVersion>
-				<em:maxVersion>12.0a1</em:maxVersion>
+				<em:maxVersion>13.0a1</em:maxVersion>
 			</RDF:Description>
 		</em:targetApplication>
 	</RDF:Description>
diff --git a/test/compactheader/test-compactheader-toolbar.js b/test/compactheader/test-compactheader-toolbar.js
index 2529c8d..8e5336a 100644
--- a/test/compactheader/test-compactheader-toolbar.js
+++ b/test/compactheader/test-compactheader-toolbar.js
@@ -102,34 +102,35 @@ function setupModule(module) {
  *  Test header pane toolbar position
  */
 function test_button_visibility() {
-  be_in_folder(folder2);
-  select_click_row(0);
-  set_and_assert_toolbox_position(mc, 'right');
-  restore_and_check_default_buttons(mc);
-  let ctc = open_header_pane_toolbar_customization(mc);
-  let palette = ctc.e("palette-box");
+  if (canMoveToolbox()) {
+    be_in_folder(folder2);
+    select_click_row(0);
+    set_and_assert_toolbox_position(mc, 'right');
+    restore_and_check_default_buttons(mc);
+    let ctc = open_header_pane_toolbar_customization(mc);
+    let palette = ctc.e("palette-box");
 
-  let button1 = ctc.e("wrapper-CompactHeader_button-starMessages");
-  let button2 = mc.e("wrapper-hdrJunkButton");
-  drag_n_drop_element(button1, ctc.window, button2, mc.window, 0.25, 0.0, palette);
-  close_header_pane_toolbar_customization(ctc);
+    let button1 = ctc.e("wrapper-CompactHeader_button-starMessages");
+    let button2 = mc.e("wrapper-hdrJunkButton");
+    drag_n_drop_element(button1, ctc.window, button2, mc.window, 0.25, 0.0, palette);
+    close_header_pane_toolbar_customization(ctc);
 
-  button1 = mc.e("CompactHeader_button-starMessages");
-  assert_false(button1.hasAttribute("disabled"));
+    button1 = mc.e("CompactHeader_button-starMessages");
+    assert_false(button1.hasAttribute("disabled"));
 
-  make_display_threaded();
-  toggle_thread_row(0);
+    make_display_threaded();
+    toggle_thread_row(0);
 
-  assert_true(button1.hasAttribute("disabled"));
-  assert_equals(button1.getAttribute("disabled"), "true");
+    assert_true(button1.hasAttribute("disabled"));
+    assert_equals(button1.getAttribute("disabled"), "true");
 
-  select_message_in_folder(folder1, 0, mc);
-  assert_false(button1.hasAttribute("disabled"));
+    select_message_in_folder(folder1, 0, mc);
+    assert_false(button1.hasAttribute("disabled"));
 
-  restore_and_check_default_buttons(mc);
+    restore_and_check_default_buttons(mc);
+  }
 }
 
-
 /**
  *  Make sure that opening the header toolbar customization dialog
  *  does not break the get messages button in main toolbar
diff --git a/test/executeTests.pl b/test/executeTests.pl
index b31945f..84a1b01 100644
--- a/test/executeTests.pl
+++ b/test/executeTests.pl
@@ -211,7 +211,7 @@ foreach my $pid (@children) {
   }
 
   my @compatibility_apps = (
-    "../../ftp//$ostype-$hosttype-$version/lightning.xpi",
+    glob("../../ftp//$ostype-$hosttype-$version/lightning*.xpi"),
     "../../$dispMUAfile"
   );
   my $comp_apps = join(",", @compatibility_apps);
diff --git a/test/testapps.csv b/test/testapps.csv
index d3fa07c..45ccf57 100644
--- a/test/testapps.csv
+++ b/test/testapps.csv
@@ -1,10 +1,10 @@
-"msys","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-release/unsigned/win32/en-US/","thunderbird-_VER_.zip","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.1/win32/lightning.xpi"
-"linux","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-release/linux-i686/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.1/linux/lightning.xpi"
-"linux","x86_64","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-release/linux-x86_64/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.1/linux/lightning.xpi"
+"msys","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-release/unsigned/win32/en-US/","thunderbird-_VER_.zip","thunderbird-_VER_.tests.zip",".checksums","https://addons.mozilla.org/thunderbird/downloads/latest/2313/platform:5/addon-2313-latest.xpi"
+"linux","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-release/linux-i686/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip",".checksums","https://addons.mozilla.org/thunderbird/downloads/latest/2313/platform:2/addon-2313-latest.xpi"
+"linux","x86_64","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-release/linux-x86_64/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip",".checksums","https://addons.mozilla.org/thunderbird/downloads/latest/2313/platform:2/addon-2313-latest.xpi"
 
-"msys","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-beta/unsigned/win32/en-US/","thunderbird-_VER_.zip","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.1/win32/lightning.xpi"
-"linux","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-beta/linux-i686/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.1/linux/lightning.xpi"
-"linux","x86_64","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-beta/linux-x86_64/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.1/linux/lightning.xpi"
+"msys","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-beta/unsigned/win32/en-US/","thunderbird-_VER_.zip","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/1.3b1-candidates/build1/win32/lightning.xpi"
+"linux","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-beta/linux-i686/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/1.3b1-candidates/build1/linux/lightning.xpi"
+"linux","x86_64","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-beta/linux-x86_64/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/1.3b1-candidates/build1/linux/lightning.xpi"
 
 "msys","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-comm-aurora/","thunderbird-_VER_.en-US.win32.zip","thunderbird-_VER_.en-US.win32.tests.zip",".en-US.win32.checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/latest-comm-aurora/win32-xpi/lightning.xpi"
 "linux","i686""https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-comm-aurora/","thunderbird-_VER_.en-US.linux-i686.tar.bz2","thunderbird-_VER_.en-US.linux-i686.tests.zip",".en-US.linux-i686.checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/latest-comm-miramar/linux-xpi/lightning.xpi"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/compactheader.git



More information about the Pkg-mozext-commits mailing list