Commit Graph

2112 Commits

Author SHA1 Message Date
Andrew McCreight
5bb1645a39 Bug 1139021 - Don't run extra collections in the parent process for the mochitest window leak detector. r=jmaher 2015-03-04 14:00:24 -08:00
Wes Kocher
50789ffa1a Merge m-c to fx-team a=merge CLOSED TREE 2015-03-02 13:07:53 -08:00
Wes Kocher
c4ac9859cf Merge fx-team to m-c a=merge 2015-03-02 12:41:37 -08:00
Steven MacLeod
877c5f3df7 Bug 1093566 - Migrate BrowserUITestUtils into BrowserTestUtils; r=Unfocused r=paolo 2015-02-23 12:48:54 -05:00
Steven MacLeod
519d688bf0 Bug 1093566 - Add Cc, Ci, Cu, Cr to scope of spawned ContentTasks; r=Gijs r=paolo 2015-02-26 11:49:36 -05:00
Steven MacLeod
36304cb7ff Bug 1093566 - Add modules for sharing mochitest-browser test code; r=Gijs r=paolo
Currently code used by many mochitest-browser tests is scattered
throughout the tree in various head.js files. Many similar or identical
helper methods are repeated throughout these files.

This commit introduces a BrowserTestUtils.jsm module and includes it in
the mochitest scope; the idea being these frequently re-implemented
methods can live in a central place.

A TestUtils.jsm module has also been introduced to contain code useful to
all types of tests.
2015-02-22 23:11:22 -05:00
Giovanny Andres Gongora Granada
ca31523446 Bug 1126057 - Provide better error when ./mach robocop is run without MOZ_HOST_BIN. r=nalexander
DONTBUILD because NPOTB
2015-02-26 10:28:00 -08:00
Geoff Brown
13732aa60f Bug 1084614 - Improve error message on bind failure in ssltunnel; r=ted 2015-02-26 14:56:47 -07:00
Nathan Froyd
b43a2b110d Bug 1136700 - enable tweaking of the maximum number of timeouts for mochitests; r=jmaher
When running tests locally, it's occasionally useful to be able to
increase the number of tests permitted to timeout before declaring the
test run a failure.  This patch adds the necessary bits to SimpleTest
and the appropriate amount of plumbing to runtests.py and mach to make
that so.
2015-02-25 09:23:54 -05:00
Andrew McCreight
70d5a0bb34 Bug 1073352, part 1 - Make the DOMWINDOW and DOCSHELL leak detector work with e10s. r=jmaher
This reworks how the Mochitest DOMWINDOW and DOCSHELL leak detector works. Rather than
collecting immediately in the top-level script, it sends a message to all processes
telling them to carry out collections. Each process prints out a message when it has
finished the collections. This message is used by the test harness to decide when windows
and docshells for that process should be have been destroyed.

In non-e10s mode, the shutdown leak detector is only run in the parent process, to work
around various issues with leak detection in the thumbnail process tests.
2015-02-24 13:00:54 -08:00
Geoff Brown
3e990e689d Bug 1134245 - Improve formatting of devicemanager getInfo() data; r=bc 2015-02-27 13:15:00 -07:00
Alessio Placitelli
45327633a8 Bug 1111022 - Tests for the SelfSupport backend. r=gfritzsche 2015-01-09 11:18:00 +01:00
Anish
48094b2951 Bug 1056851 - Change existing callers of SpecialPowers.setBoolPref/setIntPref/setCharPref to SpecialPowers.pushPrefEnv. r=jmaher,mwargers 2015-02-19 11:53:01 -05:00
Carsten "Tomcat" Book
b6ef20bdf0 Backed out changeset 6885e993936a (bug 1056851) for crashtest failures 2015-02-19 15:02:05 +01:00
Anish
bbc6a8a249 Bug 1056851 - Change existing callers of SpecialPowers.setBoolPref/setIntPref/setCharPref to SpecialPowers.pushPrefEnv. r=jmaher 2015-02-19 07:26:41 -05:00
Masayuki Nakano
483fbc830f Bug 1119609 part.18 Add nsITextInputProcessor.commitCompositionWith() and drop aCommitString from nsITextInputProcessor.commitComposition() r=smaug, sr=smaug 2015-02-19 15:50:21 +09:00
Masayuki Nakano
f1fce37659 Bug 1119609 part.14 Reimplement/redesign EventUtils.synthesizeKey() with nsITextInputProcessor r=smaug 2015-02-19 15:50:20 +09:00
Masayuki Nakano
d837b657fd Bug 1119609 part.13 EventUtils.synthesizeComposition() and synthesizeCompositionChange() should take KeyboardEvent for emulating composition state change caused by a key operation rs=smaug 2015-02-19 15:50:20 +09:00
Masayuki Nakano
60d702a190 Bug 1119609 part.12 nsITextInputProcessor should take KeyboardEvent as an argument of composition releated methods for dispatching key events around composition events r=smaug, sr=smaug 2015-02-19 15:50:20 +09:00
Masayuki Nakano
be3248be75 Bug 1119609 part.6 TextInputProcessor should manage modifier key state and set it to dispatching key events automatically r=smaug, sr=smaug 2015-02-19 15:50:19 +09:00
Andrew McCreight
32ed7a2bf6 Backout 1ffecdc47c6d for OSX and Windows docShell leaks. CLOSED TREE 2015-02-15 21:26:19 -08:00
Andrew McCreight
eb177fe773 Bug 1073352, part 1 - Make the DOMWINDOW and DOCSHELL leak detector work with e10s. r=jmaher
This reworks how the Mochitest DOMWINDOW and DOCSHELL leak detector works. Rather than
collecting immediately in the top-level script, it sends a message to all processes
telling them to carry out collections. Each process prints out a message when it has
finished the collections. This message is used by the test harness to decide when windows
and docshells for that process should be have been destroyed.
2015-02-14 11:43:45 -08:00
Andrew Halberstadt
4095e521c8 Bug 1127376 - PEP8-ify all mochitest .py files (auto-generated), r=ted
This change was generated using the `autopep8` module [1]. To replicate:

    $ pip install --upgrade autopep8
    $ cd gecko
    $ autopep8 -i -a -a -r testing/mochitest --exclude 'testing/mochitest/pywebsocket/*'

[1] https://github.com/hhatto/autopep8

--HG--
extra : rebase_source : fb127187cd488b977981338373d66cc8c735214f
2015-02-13 14:42:02 -05:00
Steven MacLeod
848a47b780 Bug 1107609 - Implement ContentTask.spawn; r=Gijs r=mconley
This introduces a new medule ContentTask, which includes a spawn method.
This new method can be used to spawn a task in the content process of a
browser. When called, a promise will be returned which resolves to the
value returned by the task.

This allows you to quickly write test code which can touch the content
and return information without having to write custom framescripts all
the time (The content code can be written inline as a simple generator
definition). ContentTask is automatically included in the scope of
mochitests.

An example use follows:

yield ContentTask.spawn(browser, {}, function* gen_replaceState() {
  content.window.history.replaceState({}, "", 'test-entry/');
  return "Value that the promise will resolve with";
});

--HG--
extra : rebase_source : 9b6ae71407da582cdaa8087b5e367c72fa08a337
2015-02-11 17:28:44 -05:00
Andrew Halberstadt
ba271f3c89 Bug 1123763 - [manifestparser] Implement filter system for manifest.active_tests(), r=ted
A filter is a callable that accepts an iterable of tests and a dictionary of values (e.g mozinfo.info) and returns an iterable of tests. Note filtering can mean modifying tests in addition to removing them. For example, this implements a "timeout-if" tag in the manifest:

    from manifestparser import expression
    import mozinfo

    def timeout_if(tests, values):
        for test in tests:
            if 'timeout-if' in test:
                timeout, condition = test['timeout-if'].split(',', 1)
                if expression.parse(condition, **values):
                    test['timeout'] = timeout
        yield test

    tests = mp.active_tests(filters=[timeout_if], **mozinfo.info)

--HG--
extra : rebase_source : adead90910811e71e8ea2bb862f2b8e92f2c1bee
2015-02-10 09:38:29 -05:00
Alexandre Lissy
8529e5ac6b Bug 1129173 - Properly detect B2G for workers interface tests. r=bent
Make use of SpecialPowers.isB2G to do the proper detection, and fix
mochitest execution for Mulet to include some B2G-specific prefs.

--HG--
extra : rebase_source : 2683f17794204cdb8b17248c9469f2498085ee81
2015-02-10 06:51:00 +01:00
Ryan VanderMeulen
817924eff7 Merge inbound to m-c. a=merge
CLOSED TREE
2015-02-10 16:03:15 -05:00
Joel Maher
5e4d59e6da Bug 1110982 - [backout] tracking bug to get --run-by-dir enabled for 'oth' job on trunk. r=RyanVM 2015-02-10 09:07:32 -05:00
Alexandre Lissy
2a69c8a3f7 Bug 1130287 - Expose isB2G in SpecialPowers. r=sicking
Some mochitests needs to behave differently when ran on B2G Desktop.
Currently, this is implemented using user agent string detection,
mostly relying on "Mobile" being present and "Android" being absent.
This is only true on B2G Desktop when ran on Try because the mozconfig
defined FXOS_SIMULATOR and that, per bug 1115935, this substring is only
added in this case, but not if just MOZ_B2G is defined. A better
approach is to expose 'isB2G' in SpecialPowers for this kind of
detection.
2015-02-08 10:09:00 +01:00
Joel Maher
33d8eaf66d Bug 1110982 - Disabled tests for oth chunk and leaks (run-by-dir). r=RyanVM 2014-12-27 00:44:52 +05:30
Masayuki Nakano
6cea2a629c Bug 1131026 Rename nsITextInputProcessor.init() and .initForTests() to .beginInputTransaction() and .beginInputTransactionForTests() r=smaug, sr=smaug 2015-02-10 17:09:29 +09:00
Wes Kocher
aee29f654f Backed out changeset ea625e85c72a (bug 1123763) for checktest orange on a CLOSED TREE 2015-02-09 14:00:13 -08:00
Andrew Halberstadt
1d45a432c8 Bug 1123763 - [manifestparser] Implement filter system for manifest.active_tests(), r=ted
A filter is a callable that accepts an iterable of tests and a dictionary of values (e.g mozinfo.info) and returns an iterable of tests. Note filtering can mean modifying tests in addition to removing them. For example, this implements a "timeout-if" tag in the manifest:

    from manifestparser import expression
    import mozinfo

    def timeout_if(tests, values):
        for test in tests:
            if 'timeout-if' in test:
                timeout, condition = test['timeout-if'].split(',', 1)
                if expression.parse(condition, **values):
                    test['timeout'] = timeout
            yield test

    tests = mp.active_tests(filters=[timeout_if], **mozinfo.info)

--HG--
extra : rebase_source : 7afc5d677717279e477d420899ba839073de2d8f
2015-02-09 16:13:00 -05:00
Andrew McCreight
458a644324 Bug 1128486 - Increase tab process leak threshold a little. r=erahm
The GeckoMediaPluginService leak slowly grows, so hide it for a little longer.
2015-02-09 11:42:20 -08:00
Dave Townsend
1590ebd9cf Bug 1083281: Use flags to determine which chrome and about URIs are loaded in the content process. r=mconley, r=bsmedberg, r=jduell, r=mratcliffe
--HG--
extra : rebase_source : beda0088e7715eeb41525b0123f308068745bd80
2015-02-05 08:09:15 -08:00
Patrick McManus
a81485bc2f bug 1129146 - Fix Mochitest NSPR logging upload r=ted 2015-02-04 09:58:37 -05:00
Ms2ger
69c01f4e71 Bug 1127943 - Make testharness.js the default template for gen_template.pl; r=bz (NPOTB, DONTBUILD) 2015-01-30 20:38:45 +01:00
Andrew McCreight
2c8f67882a Bug 1127013 - Use unix file endings in mochitest-e10s-utils. r=jmaher 2015-01-30 10:59:02 -08:00
Ehsan Akhgari
02c440fe0b Bug 1125383 - Unbreak running single mochitests using the runtests.py script directly; r=ted
Without this, the following exception is thrown:

TEST-UNEXPECTED-FAIL | unknown test url | uncaught exception - TypeError: SimpleTest.harnessParameters is undefined at http://mochi.test:8888/tests/SimpleTest/SimpleTest.js:624
2015-01-28 12:08:21 -05:00
Masayuki Nakano
f1abe83b3f Bug 936313 part.1 Remove DOM_KEY_LOCATION_MOBILE and DOM_KEY_LOCATION_JOYSTICK r=smaug+mwu+cpeterson, sr=smaug 2015-01-28 22:36:53 +09:00
Tooru Fujisawa
6331e61d9e Bug 917322 part.23 Store nsITextInputProcessor instance into WeakMap instead of window r=smaug 2015-01-27 19:12:23 +09:00
Masayuki Nakano
e7e94f66c7 Bug 917322 part.20 Add tests of async commit at requesting to commit a composition r=smaug 2015-01-28 15:27:33 +09:00
Masayuki Nakano
c2b3803f80 Bug 917322 part.16 Rename COMPOSITION_ATTR_* in EventUtils.js with new constants of nsITextInputProcessor r=smaug 2015-01-28 15:27:33 +09:00
Masayuki Nakano
f2d5b42188 Bug 917322 part.15 Create TextEventDispatcherListener abstract class for listening notifications to IME r=smaug, sr=smaug 2015-01-28 15:27:32 +09:00
Masayuki Nakano
8b50f36970 Bug 917322 part.12 EventUtils.js should use nsITextInputProcessor for synthesizing composition r=smaug 2015-01-28 15:27:32 +09:00
J. Ryan Stinnett
c67bbb5241 Bug 1123945 - Fix --no-autorun harness option. r=jmaher 2015-01-21 15:22:16 -06:00
Andrew McCreight
984fd1005a Bug 1121263 - Bump the leak threshold again for test_ipc. r=RyanVM
CLOSED TREE
2015-01-16 09:30:43 -08:00
Wes Kocher
83176f0a30 Merge fx-team to m-c a=merge 2015-01-15 17:06:55 -08:00
Joel Maher
aaa33b4337 Bug 1041500 - Enable run-by-dir mode for mochitest-devtools. r=RyanVM
CLOSED TREE
2015-01-15 10:00:00 -05:00
Andrew McCreight
44acd4a649 Bug 1121263 - Increase tab process leak threshold on OSX to paper over intermittent leak. r=jmaher 2015-01-14 10:06:46 -08:00