Commit Graph

1031 Commits

Author SHA1 Message Date
Gregory Szorc
cb927ab20b Bug 808336 - Part 1: Refactor mach command handler management; r=jhammel
Previously we were tighly coupled with MozbuildObject. This was not in
the spirit of mach being a generic tool. Now, instead of passing multiple
arguments to __init__ of the class providing the mach command we either
pass 0 or 1. The number of arguments is detected when processing the
@CommandProvider decorator. The optional argument is a named tuple
containing mach run-time state.

Capturing of mach command provider information is now captured in a
class (as opposed to an anoymous tuple). We also capture these in a rich
data structure which is passed as part of the run-time data to the
command provider class. This allows mach commands to inspect the mach
environment.

Mach decorators have been moved to mach.decorators. mach.base is
reserved for generic mach data/container classes.

Existing mach command classes derived from MozbuildObject have been
replaced with either object or mozbuild.base.MachCommandBase. This
latter class translates the mach context instance passed to __init__
into the constructor arguments for MozbuildObject.__init__.

Support for registering function handlers with mach has been removed.
All handlers must be inside classes.

--HG--
rename : python/mach/mach/base.py => python/mach/mach/decorators.py
2012-11-06 16:57:41 -08:00
Andrew Halberstadt
638ef460b8 Bug 798580 - Run mochitests from within test-container app's oop iframe, r=jgriffin 2012-10-31 09:37:22 -04:00
Ed Morley
33e0ad4927 Bug 536603 - Disable test_css_cross_domain.html on Android for too many intermittent failures 2012-11-06 22:26:56 +00:00
Ed Morley
157e0ef0a7 Bug 808417 - Make runTests() exception reporting consistent across test harnesses; r=jmaher 2012-11-05 13:03:55 +00:00
Jonathan Griffin
f59e1aeec2 Bug 808441 - Enable dom/base mochitests for B2G, a=test-only 2012-11-04 15:24:53 -08:00
Ryan VanderMeulen
d716366c32 Merge m-c to inbound. 2012-11-02 16:11:46 -04:00
Dão Gottwald
5b3ee5260f Bug 756313 - Don't load the homepage before the first paint. r=enn 2012-11-02 03:46:56 +01:00
Josh Aas
4c7422ffc4 Back out both patches for bug 647216 due to regression documented in bug 806244. 2012-11-01 09:19:24 -04:00
Jonathan Griffin
916b4da168 Bug 807137 - Exclude test_innerWidthHeight from B2G testruns, since it times out, a=test-only, DONTBUILD(NPOTB) 2012-10-30 15:55:11 -07:00
Gregory Szorc
eb2701ecef Bug 807861 - Ensure state directory is present before running tests; r=rnewman
DONTBUILD (NPOTB)

--HG--
extra : rebase_source : fd66449c11968269d33eff3f686f22a8767b6898
2012-11-02 10:32:40 -07:00
Ryan VanderMeulen
043db7616b Backout e35f252ca573 for mochitest-other orange.
CLOSED TREE

--HG--
extra : rebase_source : 62e15f7306c4443d91daf6af66be9b7012ada9cc
2012-11-01 19:31:02 -04:00
Ryan VanderMeulen
0aa6d668d3 Merge m-c to inbound. 2012-11-01 19:23:07 -04:00
Dão Gottwald
6d4b82ba46 Bug 756313 - Don't load the homepage before the first paint. r=enn 2012-11-01 22:00:35 +01:00
Jonathan Griffin
c9a2af4575 Bug 805430 - Install mochitest extensions in B2G as app bundles, r=ahal, DONTBUILD(NPOTB) 2012-10-25 09:53:19 -07:00
Markus Stange
9e63676c33 Bug 647216: Allow testing of MozMouseHittest window dragging. r=enndeakin 2012-10-26 15:40:11 -04:00
William Lachance
e5adaff9ff Bug 801652 - Make sure we print logcat, device info on remote mochitest/reftest failure;r=jmaher 2012-10-24 13:34:33 -04:00
Ben Turner
1493ea2ca6 Bug 786295 - 'Delete IndexedDB related to an app when uninstalled'. r=bz+khuey+sicking. 2012-10-23 09:31:19 -07:00
Jonathan Griffin
72eff332fd Bug 803745 - Package b2g.json in tests.zip, r=jmaher 2012-10-19 17:19:22 -07:00
Ryan VanderMeulen
a1972707e0 Merge the last PGO-green inbound changeset to m-c. 2012-10-17 22:10:08 -04:00
Jonathan Griffin
f1b8efd548 Bug 793045 - B2G mochitest manifest for harness stabilization, r=jmaher, DONTBUILD(NPOTB) 2012-10-17 15:32:46 -07:00
Joel Maher
7217f498ae Bug 799107 - minidumps not being generated from robocop test crashes (breakpad environment variables not being set properly). r=kats 2012-10-16 13:25:23 -04:00
Masayuki Nakano
8217ef94b6 Bug 705057 part.1 Ensure a set of composition events is fired on same content r=smaug 2012-09-26 14:47:45 +09:00
Joel Maher
55205d9eef Backout e814e12508af (bug 799107), 45863b00372b (bug 801633), 2012-10-15 13:33:37 -04:00
Joel Maher
c321e288af Bug 799107 - minidumps not being generated from robocop test crashes (breakpad environment variables not being set properly). r=kats 2012-10-15 11:13:44 -04:00
William Lachance
3d699579d7 Bug 756440 - Only warn when we fail cleanup steps with mobile mochitest/reftest;r=jmaher
Before we were outright failing if the test logfile was missing when cleaning
up these tests. But that's generally a sign that the app failed to start
up properly, which is the true issue we should be trying to catch / diagnose.
Let's just print a warning here and move on.
2012-10-15 10:15:19 -04:00
Joel Maher
b8e9d0187b Backout f271acb304c2 (bug 799107), 2012-10-15 09:08:41 -04:00
Joel Maher
2229b63364 Bug 799107 - minidumps not being generated from robocop test crashes (breakpad environment variables not being set properly). r=kats 2012-10-15 07:10:49 -04:00
Jeff Hammel
884b0385b0 Bug 800110 - Mirror mozbase -> m-c for bug 800097 @ da60c88b8c ;r=ahal,r=wlach 2012-10-12 10:24:35 -07:00
Gregory Szorc
2bb5606ff3 Bug 799291 - Part 3: Move mozbuild.testing into testing/; r=jhammel
--HG--
rename : python/mozbuild/mozbuild/testing/test.py => testing/moztesting/util.py
2012-10-10 11:08:09 -07:00
Gregory Szorc
97cce3a53e Bug 799291 - Part 1: Move mach commands for test running into test runners; r=jhammel
The code interacting with the test runners now resides in closer
proximity to the code it is invoking. We also purge testing
functionality from mozbuild, which is where it never really belonged.

--HG--
rename : python/mozbuild/mozbuild/testing/reftest.py => layout/tools/reftest/mach_commands.py
rename : python/mozbuild/mozbuild/testing/mochitest.py => testing/mochitest/mach_commands.py
rename : python/mozbuild/mozbuild/testing/xpcshell.py => testing/xpcshell/mach_commands.py
2012-10-10 11:08:09 -07:00
Ms2ger
3ed6579510 Bug 798806 - Disable permaorange test_bug511075.html on Android. 2012-10-06 20:37:25 +02:00
Brian Nicholson
ea3698b8de Bug 769145 - Part 6: Update test cases for layout changes. r=mfinkle 2012-10-05 17:27:12 -07:00
Simon Montagu
25e8f55bc0 Make SimpleTest.is* functions less verbose on pass. Bug 797827, r=jmaher 2012-10-04 08:57:50 -07:00
William Lachance
54d781abf7 Bug 795496 - Make mozdevice raise exceptions on error;r=ahal,jmaher
It turns out that relying on the user to check return codes for every
command was non-intuitive and resulted in many hard to trace bugs.
Now most functinos just return "None", and raise a DMError when there's an
exception. The exception to this are functions like dirExists, which now return
booleans, and throw exceptions on error. This is a fairly major refactor,
and also involved the following internal changes:

* Removed FileError and AgentError exceptions, replaced with DMError
  (having to manage three different types of exceptions was confusing,
  all the more so when we're raising them)
* Docstrings updated to remove references to return values where no
  longer relevant
* pushFile no longer will create a directory to accomodate the file
  if it doesn't exist (this makes it consistent with devicemanagerADB)
* dmSUT we validate the file, but assume that we get something back
  from the agent, instead of falling back to manual validation in the
  case that we didn't
* isDir and dirExists had the same intention, but different
  implementations for dmSUT. Replaced the dmSUT impl of getDirectory
  with that of isDir's (which was much simpler). Removed
  isDir from devicemanager.py, since it wasn't used externally
* killProcess modified to check for process existence before running
  (since the actual internal kill command will throw an exception
  if the process doesn't exist)

In addition to all this, more unit tests have been added to test these
changes for devicemanagerSUT.
2012-10-04 11:28:07 -04:00
Justin Lebar
851ff7842d Bug 789392 - Allow mozapp frames to window.close() themselves. r=bz 2012-10-04 00:44:50 -04:00
Matthew Noorenberghe
c704d186dc Disable test_notifications_popup.html from bug 784028 on android since it's lacking PopupNotifications 2012-10-03 20:54:37 -07:00
Ryan VanderMeulen
b3a7522e9a Backout 99caa1f41fe1 (bug 797515) and a04b83c53297 (bug 789392) for M2 orange. 2012-10-03 21:59:41 -04:00
Justin Lebar
30b2ea29e8 Bug 789392 - Allow mozapp frames to window.close() themselves. r=bz 2012-10-03 20:45:40 -04:00
Ryan VanderMeulen
325089208a Merge m-c to inbound. 2012-10-03 18:19:17 -04:00
David Chan
7991baddb3 Bug 797177 - Unbreak b2g mochitests, r=ahal 2012-10-02 15:43:19 -07:00
Patrick Wang
253d71a38a Bug 777384 - Test case r=jlebar
--HG--
extra : rebase_source : 777580f0a22bfb3d9d447097b0f4a379f2b7416b
2012-09-27 01:47:57 +08:00
Joel Maher
d37007e0cd Bug 797112 - we have a call to dm.checkCmd and that api doesn't exist anymore. r=wlach 2012-10-03 11:07:31 -04:00
Justin Lebar
0763b41739 Back out bbf94917f0ec (bug 789392) on strong suspicion of causing assertions in debug mochitest-2 on a CLOSED TREE.
The assertion encountered is:

Assertion failure: !gAppContentParents || !gAppContentParents->Get(mAppManifestURL), at ../../../dom/ipc/ContentParent.cpp:774
TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_oop_CloseFromOpener.html | Exited with code 11 during test run
PROCESS-CRASH | /tests/dom/browser-element/mochitest/test_browserElement_oop_CloseFromOpener.html | application crashed (minidump found)
Thread 0 (crashed)
2012-10-02 18:20:20 -04:00
Justin Lebar
774351fff4 Bug 789392 - Allow mozapp frames to window.close() themselves. r=bz 2012-10-02 13:55:52 -04:00
Vladimir Vukicevic
2864c47b46 b=683143,792462; Some tests call SimpleTest.finish() twice/guard against that; r=ehsan 2012-10-01 17:51:10 -04:00
Phil Ringnalda
8aa24b1c1a Merge last PGO-green changeset of mozilla-inbound to mozilla-central 2012-09-28 22:06:29 -07:00
Jonathan Griffin
5cad8381bb Bug 795100 - Add a --gecko-path argument to the B2G mochitest testrunner, r=ahal, DONTBUILD(NPOTB) 2012-09-28 10:04:03 -07:00
Isaac Aggrey
b33410feb2 Bug 789847 - Remove PR_CALLBACK usage from tree 2012-09-25 11:18:38 -05:00
Bob Clary
9f3fa1ad30 Bug 789086 - use unique temporary filename for robotium.config file in mochitest/runtestsremote.py, r=jmaher. 2012-09-28 12:25:46 -07:00
Mounir Lamouri
45c2bff831 Bug 773373 part 6 - Disable tests on Android. r=sicking 2012-09-25 23:33:02 +01:00
Andrea Marchesini
b13172b91d Bug 779982 - Change behaviour of getSelf and add amInstalled function. r=sicking 2012-09-25 11:04:24 -04:00
Bobby Holley
7f912ddc79 Bug 792036 - Fix up tests to avoid relying on the existence of window.Components (MANUAL). r=mccr8
These are the manual fixes that the ensuing auto-generation can't deal with. Some of them
just fix up formatting (such as Components.\nFoo, so that subsequent auto-generation can
work better).
2012-09-24 14:46:28 +02:00
Bobby Holley
515994bfb3 Bug 792036 - Add a SpecialPowers API to provide access to the Components object in various forms. r=mrbkap,ted
Now that window.Components is no longer acccessible to page JS, we need a way
to access it in mochitests. So this patch provides SpecialPowers.Components,
which is the bonafide Components object for the window upon which SpecialPowers
is defined. It also provides SpecialPowers.{Cc,Ci,Cr,Cu}, which are SpecialPowers-wrapped
versions of their respective sub-objects (with the exception of Ci, which is unwrapped).
2012-09-24 14:46:27 +02:00
Joel Maher
c3c481579d Bug 762908 - Rip enablePrivilege out of spidermonkey tests. r=ted
--HG--
rename : testing/mochitest/specialpowers/Makefile.in => testing/specialpowers/Makefile.in
rename : testing/mochitest/specialpowers/chrome.manifest => testing/specialpowers/chrome.manifest
rename : testing/mochitest/specialpowers/components/SpecialPowersObserver.js => testing/specialpowers/components/SpecialPowersObserver.js
rename : testing/mochitest/MockFilePicker.jsm => testing/specialpowers/content/MockFilePicker.jsm
rename : testing/mochitest/tests/SimpleTest/MozillaLogger.js => testing/specialpowers/content/MozillaLogger.js
rename : testing/mochitest/tests/SimpleTest/SpecialPowersObserverAPI.js => testing/specialpowers/content/SpecialPowersObserverAPI.js
rename : testing/mochitest/specialpowers/content/specialpowers.js => testing/specialpowers/content/specialpowers.js
rename : testing/mochitest/tests/SimpleTest/specialpowersAPI.js => testing/specialpowers/content/specialpowersAPI.js
rename : testing/mochitest/specialpowers/install.rdf => testing/specialpowers/install.rdf
rename : testing/mochitest/specialpowers/jar.mn => testing/specialpowers/jar.mn
2012-09-20 09:06:50 -04:00
Gregor Wagner
f7fc6f1852 Bug 792536 - Enable contacts and settings tests on mobile. r=fabrice 2012-09-19 21:37:05 -07:00
Gregor Wagner
a3f5338aff Bug 770731 - Expose JS API for modifying app permissions. r=sicking 2012-09-19 11:19:00 -07:00
Graeme McCutcheon
5855c286f2 Merge last PGO green changeset from mozilla-inbound to mozilla-central 2012-09-19 15:15:34 +01:00
Ehsan Akhgari
6b89c15794 Improve the failure message when a mochitest ends without a call to SimpleTest.finish, no bug, irc-r=vlad
DONTBUILD
2012-09-18 21:54:53 -04:00
David Clarke
ac0fc975da Bug 790546 - Add sdcard option to emulator, r=jgriffin, DONTBUILD because NPOTB 2012-09-17 18:44:07 -07:00
Christian Holler
49974c5e53 Bug 787916 - Hide Mochitest test table with --close-when-done option. r=jmaher 2012-09-19 01:28:39 +02:00
Gregor Wagner
da64ed1681 Backout bug 770731 2012-09-18 16:19:56 -07:00
Gregor Wagner
6ff65c4c09 Bug 770731 - Expose JS API for modifying app permissions. r=sicking 2012-09-18 14:52:39 -07:00
Tanvi Vyas
29c1c82c22 Bug 62178 - Mochitest - iframe, stylesheet, object, script, image, media, xhr (Disabled on android until ssl is supported), r=smaug 2012-09-16 20:53:01 -07:00
Adam Dane [:hobophobe]
d70d5d201f Bug 787624 - Test for bug 787624. r=roc 2012-09-14 15:00:21 -05:00
Kartikaya Gupta
e240f0d40d Bug 767449 - Allow robotium tests to put files in places other than /mnt/sdcard. r=jmaher 2012-09-12 07:56:31 -04:00
Georg Fritzsche
cf33482a3e Bug 784145 - When submitting hang reports, submit the browser report as a field of the plugin report instead of as a completely separate report. r=ted 2012-09-08 19:20:59 +02:00
William Lachance
6a7b472377 Bug 723107 - Re-add mozdevice to testing/mozbase, remove duplicate files in build/mobile;r=jmaher 2012-09-07 16:00:31 -04:00
Boris Zbarsky
06092f65fb Bug 767931. Make drawWindow and asyncDrawXULElement ChromeOnly. r=roc 2012-09-07 01:29:47 -04:00
Masayuki Nakano
08b5649f75 Bug 788401 Avoid JS warnings in EventUtils.synthesizeWheel() r=smaug 2012-09-07 09:53:27 +09:00
Scott Johnson
1ccadb6e74 Bug 780258: Add an interface to set the maximum line box width, accessible from chrome script. [r=dbaron] 2012-09-05 16:39:34 -05:00
Myk Melez
5c26a10f81 bug 785545 - unrefactor mozApps tests for maximum readability/reliability; r=fabrice 2012-09-05 10:08:54 -07:00
Masayuki Nakano
652c834ce7 Bug 786898 part.2 Add overflow delta value tests r=smaug, sr=smaug 2012-09-04 17:39:28 +09:00
Brian R. Bondy
695f096c60 Bug 785744 - Async file picker cleanup. r=neil 2012-08-29 14:37:43 -04:00
Mounir Lamouri
62167af904 Bug 756645 - Implement IndexedDB apps isolation. r=bent 2012-08-28 09:46:46 -03:00
Philipp von Weitershausen
5801c8b2ab Bug 776825 - Separate message managers into senders and broadcasters. r=smaug
--HG--
rename : content/base/public/nsIFrameMessageManager.idl => content/base/public/nsIMessageManager.idl
2012-08-27 11:13:02 -03:00
Ryan VanderMeulen
a1afd087e9 Merge m-c to inbound. 2012-08-23 19:50:46 -04:00
Mounir Lamouri
26b6f2ff4a Bug 775815 - Use new Permission Manager API in SpecialPowers. r=sicking 2012-08-23 11:23:48 -07:00
Kyle Machulis
ee26c8d64a Backout of c129811b87ef due to mochi bustage 2012-08-23 12:00:51 -07:00
Bobby Holley
270cd28810 Bug 785162 - Disable test_bug760802.html on android. r=smaug,dougt 2012-08-23 11:45:28 -07:00
Kyle Machulis
b48c1bd763 Bug 783426: Patch 2 - Async DOMRequest Firing Tests; r=sicking 2012-08-23 09:52:54 -07:00
Ehsan Akhgari
0fd9123eac Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Kyle Machulis
750960ea54 Backout be6da7f8989c due to bustage 2012-08-22 18:11:52 -07:00
Kyle Machulis
404d0e527c Bug 783426: Patch 2 - Tests for Async DOMRequest Firing; r=sicking 2012-08-22 18:04:01 -07:00
Kyle Machulis
6184ec9c96 Backing out 542abbd15139 due to incorrect commit messages 2012-08-22 18:00:57 -07:00
Kyle Machulis
37e48ad8a8 Bug 783426: Patch 2 - Tests for Async DOMRequest Firing 2012-08-22 17:58:05 -07:00
Ian Melven
66e72cf921 Bug 341604 - tests for iframe sandbox - plugins r=jst 2012-08-20 11:34:33 -07:00
Bobby Holley
a4ec7a6646 Bug 695292 - Port SimpleTest.executeSoon() to SpecialPowers. r=mrbkap
If we just naively use the thread manager to dispatch the event via SpecialPowers,
we cannot avoid the XPCWrappedJS for the runnable being in chrome scope (even if
we pass a content object, we make the call in chrome scope, so we pass a cross-
compartment wrapper). This means that the machinery in
nsXPCWrappedJSClass::CheckForException ends up calling the error reporter for the
SpecialPowers scope, which isn't what we want.

Messing around with the implementation of CheckForException is playing with fire.
So we work around this with an explicit Cu API. :-(
2012-08-17 15:13:23 -07:00
Brian R. Bondy
6ae40bb347 Bug 731307 - Async filepicker test changes. r=roc 2012-08-17 11:35:01 -04:00
Ed Morley
5cd53d0556 Bug 783515 - Re-enable falsely blamed native Android M3 tests now dom/indexedDB/ipc/test_ipc.html is disabled; r=gbrown,jmaher 2012-08-17 14:42:26 +01:00
Ed Morley
f445c9ab9f Bug 783509 - Disable the newly created test_browserElement_inproc_AppWindowNamespace.html on Android for permaorange timeouts; r=jmaher 2012-08-17 14:42:26 +01:00
Ed Morley
acc72a5471 Bug 783513 - Disable dom/indexedDB/ipc/test_ipc.html on Android for mochitest-3 permaorange due to OOMs; r=jmaher 2012-08-17 14:42:26 +01:00
Phil Ringnalda
8c55938528 Back out e6761635f9cf (bug 695292) for Android mochitest bustage on a CLOSED TREE 2012-08-16 21:35:53 -07:00
Bobby Holley
773b674a05 Bug 695292 - Port SimpleTest.executeSoon() to SpecialPowers. r=mrbkap
If we just naively use the thread manager to dispatch the event via SpecialPowers,
we cannot avoid the XPCWrappedJS for the runnable being in chrome scope (even if
we pass a content object, we make the call in chrome scope, so we pass a cross-
compartment wrapper). This means that the machinery in
nsXPCWrappedJSClass::CheckForException ends up calling the error reporter for the
SpecialPowers scope, which isn't what we want.

Messing around with the implementation of CheckForException is playing with fire.
So we work around this with an explicit Cu API. :-(
2012-08-16 18:33:27 -07:00
Myk Melez
f121b94dfd bug 783391 - NS_ERROR_FILE_IS_DIRECTORY on mochitest-chrome runs; r=adw 2012-08-16 15:20:29 -07:00
Myk Melez
782fce224f bug 770770: refactor webapp runtime test harness to reduce complexity/special-casing; r=adw
--HG--
extra : rebase_source : 183331b565d8c0577c9ba60a89f3c1ea6b11af9a
2012-08-14 15:27:26 -07:00
Bobby Holley
79e4222127 Bug 781521 - Fix test_SpecialPowersExtension. r=Ms2ger
The constructor function lives in content, but it's being invoked from chrome, so the |this| object is actually privileged.
2012-08-14 20:54:33 -07:00
David Keeler
a941bdf2bd Bug 749257 - Improve test plugin. r=josh, r=bsmedberg 2012-08-13 10:40:15 -07:00
Ed Morley
80640388d7 Bug 782431 - Disable dom/imptests/editing/selecttest/* on Android for being permaorange 2012-08-13 23:09:29 +01:00
Ed Morley
2fe00b3d6e Bug 782328 - Disable dom/imptests/webapps/DOMCore/tests/approved/* on Android for being permaorange; r=Ms2ger 2012-08-13 18:44:25 +01:00
Ed Morley
8c6269ec53 Bug 782275 - Disable devicestorage tests on Android; r=dougt 2012-08-13 18:44:25 +01:00