[Pkg-mozext-commits] [compactheader] 236/441: When building a new XPI file, copy the current version into the test script Separate shared-module of mozmill tests Active test for get new messages button
David Prévot
taffit at moszumanska.debian.org
Wed Mar 18 12:29:03 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 a8ebc81533c545ad9845b4a35d9e7d12f07738d4
Author: joachim <none at none>
Date: Sat Jul 30 16:44:17 2011 +0200
When building a new XPI file, copy the current version into the test script
Separate shared-module of mozmill tests
Active test for get new messages button
--HG--
branch : mozmill
rename : test/compactheader/test-mouse-event-helpers.js => test/shared-modules/test-mouse-event-helpers.js
---
build.xml | 47 ++++++++++--------
test/compactheader/test-compactheader-toolbar.js | 58 +++++++++++-----------
test/download.sh | 16 ++++--
.../test-mouse-event-helpers.js | 0
4 files changed, 68 insertions(+), 53 deletions(-)
diff --git a/build.xml b/build.xml
index 260e0c7..92d1115 100644
--- a/build.xml
+++ b/build.xml
@@ -6,36 +6,37 @@
<property name="dist.dir" value="${mozdev.dir}/downloads/"/>
<property name="AMOdist.dir" value="${src.dir}/AMO/"/>
<property name="www.dir" value="${mozdev.dir}/www/"/>
+ <property name="test.dir" value="${src.dir}/test/"/>
<property name="mccoy.cmd" value='c:/Program Files (x86)/mccoy/mccoy.exe'/>
<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"/>
-
+
<xmltask source="./install.rdf">
- <copy path="//em:version/text()" property="app.version"/>
- <copy path="//em:name/text()" property="app.name"/>
- <copy path="//em:id/text()" property="app.id"/>
+ <copy path="//em:version/text()" property="app.version"/>
+ <copy path="//em:name/text()" property="app.name"/>
+ <copy path="//em:id/text()" property="app.id"/>
</xmltask>
<target name="dist" depends="spreadVersion,buildAMO,buildMozdev">
</target>
-
+
<target name="clean">
<delete file="${dist.dir}/${app.name}-${app.version}.xpi" />
</target>
-
-
+
+
<target name="buildAMO">
<copy file="${src.dir}/install.rdf" tofile="${AMOdist.dir}/install.rdf"/>
- <replaceregexp file="${AMOdist.dir}/install.rdf"
+ <replaceregexp file="${AMOdist.dir}/install.rdf"
byline="true"
match=".*update.*"
- replace=""/>
+ replace=""/>
<zip destfile="${AMOdist.dir}/${app.name}-${app.version}.xpi">
<fileset dir="${src.dir}">
<include name="chrome.manifest" />
<include name="defaults/**" />
- <include name="chrome/**" />
+ <include name="chrome/**" />
<exclude name="**/.*" />
<exclude name="**/CVS/**" />
</fileset>
@@ -51,22 +52,22 @@
<include name="chrome.manifest" />
<include name="install.rdf" />
<include name="defaults/**" />
- <include name="chrome/**" />
+ <include name="chrome/**" />
<exclude name="**/.*" />
<exclude name="**/CVS/**" />
</fileset>
</zip>
<xmltask source="${www.dir}/update.rdf" dest="${www.dir}/update.rdf.new">
- <replace path="/RDF:RDF/RDF:Description/@em:version" withText="${app.version}"/>
- <replace path="/RDF:RDF/RDF:Description/@em:updateLink" withText="http://downloads.mozdev.org/compactheader/CompactHeader-${app.version}.xpi"/>
+ <replace path="/RDF:RDF/RDF:Description/@em:version" withText="${app.version}"/>
+ <replace path="/RDF:RDF/RDF:Description/@em:updateLink" withText="http://downloads.mozdev.org/compactheader/CompactHeader-${app.version}.xpi"/>
</xmltask>
<move file="${www.dir}/update.rdf.new" tofile="${www.dir}/update.rdf"/>
<property name="absUpdate" location="${www.dir}/update.rdf"/>
<property name="absXPI" location="${dist.dir}/${app.name}-${app.version}.xpi"/>
-
+
<echo message="absUpdate ${absUpdate}"/>
<echo message="absUpdate ${absXPI}"/>
-
+
<exec executable="${mccoy.cmd}">
<arg value="-command"/>
<arg value="update"/>
@@ -82,21 +83,25 @@
<target name="spreadVersion">
<!--
<xmltask source="${www.dir}/availableVersion.xml" dest="${www.dir}/availableVersion.xml.new">
- <replace path="/updates/update[1]/version" withXml="<version>${app.version}</version>"/>
+ <replace path="/updates/update[1]/version" withXml="<version>${app.version}</version>"/>
</xmltask>
<move file="${www.dir}/availableVersion.xml.new" tofile="${www.dir}/availableVersion.xml"/>
-->
- <!--
+ <!--
<xmltask source="${www.dir}/availVersion.xml" dest="${www.dir}/availVersion.xml.new">
- <replace path="/updates/update[@server='mozdev']/@version" withText="${app.version}"/>
+ <replace path="/updates/update[@server='mozdev']/@version" withText="${app.version}"/>
</xmltask>
<move file="${www.dir}/availVersion.xml.new" tofile="${www.dir}/availVersion.xml"/>
-->
- <replaceregexp file="${www.dir}/installation.html"
+ <replaceregexp file="${www.dir}/installation.html"
byline="true"
match="(.*update the version.*CompactHeader-).*(.xpi">Version ).*( of Co.*)"
- replace="\1${app.version}\2${app.version}\3"/>
+ replace="\1${app.version}\2${app.version}\3"/>
- </target>
+ <replaceregexp file="${test.dir}/download.sh"
+ byline="true"
+ match="(export XPI=.*CompactHeader-).*(.xpi)"
+ replace="\1${app.version}\2"/>
+ </target>
</project>
diff --git a/test/compactheader/test-compactheader-toolbar.js b/test/compactheader/test-compactheader-toolbar.js
index bf072af..c92f5f9 100644
--- a/test/compactheader/test-compactheader-toolbar.js
+++ b/test/compactheader/test-compactheader-toolbar.js
@@ -96,35 +96,35 @@ function setupModule(module) {
* Make sure that opening the header toolbar customization dialog
* does not break the get messages button in main toolbar
*/
-//function test_get_msg_button_customize_header_toolbar(){
-// select_message_in_folder(0);
-//
-// // It is necessary to press the Get Message Button to get the popup menu populated
-// mc.click(mc.aid("button-getmsg", {class: "toolbarbutton-menubutton-dropmarker"}));
-// mc.ewait("button-getAllNewMsgSeparator");
-//
-// var getMailButtonPopup = mc.eid("button-getMsgPopup").node;
-// var originalServerCount = getMailButtonPopup.childElementCount;
-//
-// // Open customization dialog, because it broke the Get Message Button popup menu
-// // see https://bugzilla.mozilla.org/show_bug.cgi?id=565045
-// let ctc = open_header_pane_toolbar_customization(mc);
-// close_header_pane_toolbar_customization(ctc);
-//
-// // Press the Get Message Button to populate popup menu again
-// mc.click(mc.aid("button-getmsg", {class: "toolbarbutton-menubutton-dropmarker"}));
-// mc.ewait("button-getAllNewMsgSeparator");
-//
-// getMailButtonPopup = mc.eid("button-getMsgPopup").node;
-// var finalServerCount = getMailButtonPopup.childElementCount;
-//
-// if (originalServerCount != finalServerCount) {
-// throw new Error("number of entries in Get Message Button popup menu after " +
-// "header toolbar customization " +
-// finalServerCount + " <> as before: " +
-// originalServerCount);
-// }
-//}
+function test_get_msg_button_customize_header_toolbar(){
+ select_message_in_folder(0);
+
+ // It is necessary to press the Get Message Button to get the popup menu populated
+ mc.click(mc.aid("button-getmsg", {class: "toolbarbutton-menubutton-dropmarker"}));
+ mc.ewait("button-getAllNewMsgSeparator");
+
+ var getMailButtonPopup = mc.eid("button-getMsgPopup").node;
+ var originalServerCount = getMailButtonPopup.childElementCount;
+
+ // Open customization dialog, because it broke the Get Message Button popup menu
+ // see https://bugzilla.mozilla.org/show_bug.cgi?id=565045
+ let ctc = open_header_pane_toolbar_customization(mc);
+ close_header_pane_toolbar_customization(ctc);
+
+ // Press the Get Message Button to populate popup menu again
+ mc.click(mc.aid("button-getmsg", {class: "toolbarbutton-menubutton-dropmarker"}));
+ mc.ewait("button-getAllNewMsgSeparator");
+
+ getMailButtonPopup = mc.eid("button-getMsgPopup").node;
+ var finalServerCount = getMailButtonPopup.childElementCount;
+
+ if (originalServerCount != finalServerCount) {
+ throw new Error("number of entries in Get Message Button popup menu after " +
+ "header toolbar customization " +
+ finalServerCount + " <> as before: " +
+ originalServerCount);
+ }
+}
/**
* Test header pane toolbar customization: Check for default button sets
diff --git a/test/download.sh b/test/download.sh
index 23dbdaf..96a3efe 100644
--- a/test/download.sh
+++ b/test/download.sh
@@ -3,6 +3,7 @@
export FTP_DIR=https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/5.0-candidates/build1/unsigned/win32/en-US/
export APP=thunderbird-5.0.zip
export TESTS=thunderbird-5.0.tests.zip
+export XPI=../../../AMO/CompactHeader-1.4.2beta3.xpi
wget -P ftp -N $FTP_DIR/$APP
wget -P ftp -N $FTP_DIR/$TESTS
@@ -13,8 +14,17 @@ mkdir -p $TESTDIR
unzip -o ftp/$APP -d $TESTDIR
unzip -o ftp/$TESTS -d $TESTDIR -x "*mochitest*" "*xpcshell*"
-junction $TESTDIR/mozmill/compactheader compactheader
+if [ $OSTYPE="msys" ] ; then
+ junction -d $TESTDIR/mozmill/compactheader
+ junction $TESTDIR/mozmill/compactheader compactheader
+else
+ ln -sfn compactheader $TESTDIR/mozmill/compactheader
+fi
+
# copy drag'n'drop helpers to shared-modules until they are added to thunderbird source
-cp $TESTDIR/mozmill/compactheader/test-mouse-event-helpers.js $TESTDIR/mozmill/shared-modules
+cp -v shared-modules/test-mouse-event-helpers.js $TESTDIR/mozmill/shared-modules
+
+cd $TESTDIR/mozmill
-# python runtest.py --binary=../thunderbird/thunderbird.exe -a ../../../AMO/CompactHeader-1.4.2beta3.xpi -l log -t compactheader/test-compactheader-toolbar.js
\ No newline at end of file
+# run all tests
+python runtest.py --binary=../thunderbird/thunderbird.exe -a $XPI -l log -t compactheader
diff --git a/test/compactheader/test-mouse-event-helpers.js b/test/shared-modules/test-mouse-event-helpers.js
similarity index 100%
rename from test/compactheader/test-mouse-event-helpers.js
rename to test/shared-modules/test-mouse-event-helpers.js
--
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