Commit Graph

1367 Commits

Author SHA1 Message Date
Geoff Brown
e6206ca070 Bug 1432246 - Update some safe-browsing prefs for reftests; r=jmaher 2018-02-15 07:55:13 -07:00
Brendan Dahl
5bcf337440 Bug 1434381 - Inline the layout debug overlay into browser menu bar. r=dbaron
This is part of the work to remove XUL overlays. This overlay is only
used once and can be inlined.

MozReview-Commit-ID: 1SE1nobgehE

--HG--
extra : rebase_source : 33d73fa8538da9af626feb53267278ac97554710
2018-01-30 11:18:48 -08:00
abhinav
7a69b1dac9 Bug 1434018 - Remove references to old (SeaMonkey) overlays from layoutdebug code. r=dbaron
--HG--
extra : rebase_source : a4d0bdae9b9c776707ebaa17aaa0d3e715233554
2018-01-30 18:13:00 +05:30
Geoff Brown
cd78045019 Bug 1434423 - Check for installation of correct test application when --app is passed to mach; r=jmaher 2018-02-09 14:34:20 -07:00
Mike Hommey
934828f009 Bug 1434765 - Properly reject invalid variables in #if{,n}def. r=froydnj,nalexander
The invalid variable test for #if{,n}def was only checking that the
first character in the variable was alphanumeric or underscore, not
the other characters.

More generally, preprocessor instructions were also cut out such that
whitespaces before and after arguments were part of the arguments.
Subtly, some legitimate strings end with what, in ISO-8859-1, is
considered as whitespaces, and because the preprocessor largely works
on byte strings (str), and because the regexps are using re.U, those
characters (e.g. 0xa0) that can legitimately appear in byte strings of
UTF-8 encoding, are treated as whitespaces. So we remove the re.U from
the instruction regexp, so that only plain ascii whitespaces only are
stripped out.

There's one place in layout/tools/reftest/manifest.jsm that was using
a broken pattern, making the test never true, which, once fixed, unveils
broken tests, so the branch that was never used is removed.

--HG--
extra : rebase_source : b695dec025c55aee0e50f2a0047278fe9c849c9e
2018-02-01 10:40:59 +09:00
Andrew Halberstadt
d8bcda3f29 Bug 1392391 - [reftest] Add debug statements to clarify which path in ReadTests is being used, r=jmaher
This is also to improve a race condition (bug 1416125), which can happen in the
manifest parsing code on Android jsreftests. For more details, see:
https://bugzilla.mozilla.org/show_bug.cgi?id=1392391#c39

MozReview-Commit-ID: 8qLm1t8agZG

--HG--
extra : rebase_source : 260cbfef9d3bf4be959783f750ca427b34e64486
2018-02-06 17:19:13 -05:00
Andrew Halberstadt
36e355c6d8 Bug 1392391 - [reftest] Perform chunking with manifestparser, r=jmaher
This replaces reftest's homebrewed chunking algorithm with the one that
all the other test harnesses use in manifestparser.

For now Android will continue to use the reftest based algorithm.

MozReview-Commit-ID: AfUBmQpx3Zz

--HG--
extra : rebase_source : ddc93e7f04e133668a98f050259559a58ff9923c
2018-01-25 17:46:46 -05:00
Andrew Halberstadt
2faf25828e Bug 1392391 - [reftest] Pre-parse the manifests in a separate Firefox instance, r=jmaher
Instead of parsing the manifests and running the tests all in one go, this will
spawn an extra Firefox instance at the beginning that does nothing but parse the
manifest and dump them to a file.

This will allow the python harness to load and manipulate the test objects, before
sending them back to the JS harness as a list of tests to run. The main motivation
for this change is to implement run-by-manifest, a mode where we restart the
browser in between every test manifest. But there are other benefits as well, like
sharing the chunking logic used by other harnesses and the ability for the python
harness to stuff arbitrary metadata into the test objects.

For now, Android will continue to parse the manifests and run the tests all in one
go. Converting Android to this new mechanism will be left to a follow-up bug.


MozReview-Commit-ID: AfUBmQpx3Zz

--HG--
extra : rebase_source : 82e611e8795150daf01d791ea16517ec1ffb2896
2018-02-01 14:18:00 -05:00
Andrew Halberstadt
f8c901da0f Bug 1392391 - [reftest] Parse manifests from a new ReadTests method, r=jmaher
Currently manifest parsing happens within the StartTests method. This method is
already quite large, and this commit series about to make the logic around
gathering tests a lot more complicated.

This commit pulls the manifest parsing out into a new 'ReadTests' method which
is responsible for retrieving the list of tests (however that may be) and then
calling StartTests.

MozReview-Commit-ID: 6ijOqhNaig

--HG--
extra : rebase_source : d494a8665d5019f73631ab8283b6d0c7759ac3bf
2018-02-01 16:24:25 -05:00
Andrew Halberstadt
d75648cfac Bug 1392391 - [reftest] Factor out code for creating nsIUri objects to isolated function, r=jmaher
This is a simple refactor of manifest.jsm.

We'd like to access the test objects from the parsed manifest in python. This
will allow us implement things like runByManifest (to improve intermittent
stability), share the chunking logic used by other harnesses, and much more.

To do this, we need to JSON serialize all of the test objects and dump them
to a file. The python side can then load the file, make modifications, and
send it back to the JS side to run.

The problem is that we turn the test urls into nsIURI objects as soon as they
are parsed, which isn't JSON serializable. This commit is a simple refactor to
delay this from happening. Instead, we will create the urls in reftest.jsm,
after the modified test objects have been loaded from python. This step will
be implemented by the next commit.

MozReview-Commit-ID: 6ijOqhNaig

--HG--
extra : rebase_source : fbfa259121a8d79bfc44695397d0d1ce08123558
2018-02-01 16:22:55 -05:00
Gurzau Raul
9c39f70c0f Backed out 5 changesets (bug 1392391) for frequently failing jsreftests on Android. a=backout
Backed out changeset 50df56a0cebf (bug 1392391)
Backed out changeset 406806a088d5 (bug 1392391)
Backed out changeset 6bd3abc55ea8 (bug 1392391)
Backed out changeset 846d50ea8403 (bug 1392391)
Backed out changeset b9e9374af9a1 (bug 1392391)
2018-02-07 02:20:38 +02:00
Andrew McCreight
5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Andrew Halberstadt
c7970b0b86 Bug 1392391 - [reftest] Perform chunking with manifestparser, r=jmaher
This replaces reftest's homebrewed chunking algorithm with the one that
all the other test harnesses use in manifestparser.

For now Android will continue to use the reftest based algorithm.

MozReview-Commit-ID: AfUBmQpx3Zz

--HG--
extra : rebase_source : cb513d1b3a54ddeb95ce5861d858aad4492de2a6
2018-01-25 17:46:46 -05:00
Andrew Halberstadt
00015fe0a8 Bug 1392391 - [reftest] Pre-parse the manifests in a separate Firefox instance, r=jmaher
Instead of parsing the manifests and running the tests all in one go, this will
spawn an extra Firefox instance at the beginning that does nothing but parse the
manifest and dump them to a file.

This will allow the python harness to load and manipulate the test objects, before
sending them back to the JS harness as a list of tests to run. The main motivation
for this change is to implement run-by-manifest, a mode where we restart the
browser in between every test manifest. But there are other benefits as well, like
sharing the chunking logic used by other harnesses and the ability for the python
harness to stuff arbitrary metadata into the test objects.

For now, Android will continue to parse the manifests and run the tests all in one
go. Converting Android to this new mechanism will be left to a follow-up bug.


MozReview-Commit-ID: AfUBmQpx3Zz

--HG--
extra : rebase_source : 955966c07bb650946c7c0e5706856f028335e850
2018-02-01 14:18:00 -05:00
Andrew Halberstadt
33d2269419 Bug 1392391 - [reftest] Parse manifests from a new ReadTests method, r=jmaher
Currently manifest parsing happens within the StartTests method. This method is
already quite large, and this commit series about to make the logic around
gathering tests a lot more complicated.

This commit pulls the manifest parsing out into a new 'ReadTests' method which
is responsible for retrieving the list of tests (however that may be) and then
calling StartTests.

MozReview-Commit-ID: 6ijOqhNaig

--HG--
extra : rebase_source : 16d4e2debcbe95765c4355b9964f62c7e7a417f1
2018-02-01 16:24:25 -05:00
Andrew Halberstadt
d01bc13f7f Bug 1392391 - [reftest] Factor out code for creating nsIUri objects to isolated function, r=jmaher
This is a simple refactor of manifest.jsm.

We'd like to access the test objects from the parsed manifest in python. This
will allow us implement things like runByManifest (to improve intermittent
stability), share the chunking logic used by other harnesses, and much more.

To do this, we need to JSON serialize all of the test objects and dump them
to a file. The python side can then load the file, make modifications, and
send it back to the JS side to run.

The problem is that we turn the test urls into nsIURI objects as soon as they
are parsed, which isn't JSON serializable. This commit is a simple refactor to
delay this from happening. Instead, we will create the urls in reftest.jsm,
after the modified test objects have been loaded from python. This step will
be implemented by the next commit.

MozReview-Commit-ID: 6ijOqhNaig

--HG--
extra : rebase_source : 06acb038a4d3e35b3a4158b81b361a9a0ae54337
2018-02-01 16:22:55 -05:00
Andrew Halberstadt
f354075c7a Bug 1434430 - [flake8] Fix blank 'except' statements r=rwood
This is a new issue that gets linted with flake8 3.5.0. Basically you should
never use a blank except: statement.

This will catch all exceptions, including KeyboardInterrupt and SystemExit
(which is likely not intended). If a catch all is needed, use
`except: Exception`.  If you *really* mean to also catch KeyboardInterrupt et
al, use `except: BaseException`.

Of course, being specific is often better than a catch all.

MozReview-Commit-ID: FKx80MLO4RN

--HG--
extra : rebase_source : 7c74a7d0d81f2c984b47aff3a0ee3448b791177b
2018-01-31 14:32:08 -05:00
Gurzau Raul
1315ffda06 Merge inbound to mozilla-central. a=merge 2018-02-02 00:22:39 +02:00
Sebastian Hengst
0d4ebdcd4e Backed out changeset d4582a286d6a (bug 1434765) for breaking build of Catalan language pack due to altered output. a=backout 2018-02-01 23:04:25 +02:00
Florian Quèze
2b1c8dccb6 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
Mike Hommey
355ab37a8f Bug 1434765 - Properly reject invalid variables in #if{,n}def. r=froydnj
The invalid variable test for #if{,n}def was only checking that the
first character in the variable was alphanumeric or underscore, not
the other characters.

More generally, preprocessor instructions were also cut out such that
whitespaces before and after arguments were part of the arguments.

There's one place in layout/tools/reftest/manifest.jsm that was using
a broken pattern, making the test never true, which, once fixed, unveils
broken tests, so the branch that was never used is removed.

--HG--
extra : rebase_source : d1fe8a299203a29c0906ff99054c326acd135000
2018-02-01 10:40:59 +09:00
Boris Zbarsky
c62e23596a Bug 1434318 part 2. Stop using nsIContentViewer::GetDOMDocument in C++. r=mystor
MozReview-Commit-ID: FoMoVgCngGR
2018-01-31 15:18:09 -05:00
Geoff Brown
b3a5f2f49c Bug 1434123 - Enable marionette trace log for reftests; r=whimboo
This should only add a little more logging on application startup. I am
hoping it will aid diagnosis of reftest startup hangs.
2018-01-30 17:45:59 -07:00
Sebastian Hengst
732cb1d98b merge mozilla-inbound to mozilla-central. r=merge a=merge 2018-01-31 00:22:27 +02:00
Kris Maglione
918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou
9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian
af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Andreas Tolfsen
7bcc9c5128 Bug 1434219 - Use current Marionette prefs in reftest harness. r=gbrown
The marionette.defaultPrefs.port and marionette.logging preferences
have been deprecated for some time.  We want to move the reftest
harness to use marionette.port and marionette.log.level.

All officially recognised preferences are listed in
testing/marionette/prefs/marionette.js.

MozReview-Commit-ID: H1MHO7Iik4X

--HG--
extra : rebase_source : 883ee2eed272f1a64015cbaaebcfa5dbb45d91bf
2018-01-30 14:01:58 +00:00
Kartikaya Gupta
d4774c8857 Bug 1429580 - Remove now-unnecessary inherited_status argument. r=dbaron
Because of the previous patch, the inherited_status is now always
EXPECTED_PASS so we don't need to actually pass it around.

MozReview-Commit-ID: pgMkLgNCOE

--HG--
extra : rebase_source : fce3c66ad7ccaf458befc7c41c9a2a4cdea87875
2018-01-11 09:53:10 -05:00
Kartikaya Gupta
01ae4bfffa Bug 1429580 - Change the semantics of skipping reftest includes. r=dbaron
Without this patch, putting something like
  skip-if(Android) include foo/reftest.list
behaves unexpectedly. Instead of skipping the foo/reftest.list file
on Android, it instead "inherits" the skip-if condition down into each
reftest inside foo/reftest.list. If any of those reftests then have a
fuzzy or fuzzy-if(Android,...) annotation, that will override the
skip-if annotation, and the test will still run.

Based on the occurrences of this pattern in the codebase, I believe the
more intuitive semantics of "skip the foo/reftest.list file completely,
on Android" is more desirable. This patch implements the change in
semantics. It also disallows inheriting other statuses down into
included reftest.list files, such as from a fails or fuzzy annotation on
the include statement. These cases don't currently exist in the tree,
but any attempt to do so will now throw an error.

MozReview-Commit-ID: HLJuSYNHvU5

--HG--
extra : rebase_source : d0d31ab63413aeee31d78226e55726836cd6bebf
2018-01-11 09:53:10 -05:00
Sylvestre Ledru
4b189b7baf Bug 1278282 - Update of the tests to reflect the removal of the gtk2 r=lsalzman
MozReview-Commit-ID: Htgc44dCEjX

--HG--
extra : rebase_source : 55ce6a6a72c36cbfdbeef08fe58d11f2053dc35f
2018-01-10 08:55:38 +01:00
Cosmin Sabou
81a8319b46 Merge mozilla-central to autoland. r=merge a=merge on a CLOSED TREE
--HG--
rename : dom/xul/templates/nsXULSortService.cpp => dom/xul/nsXULSortService.cpp
2018-01-03 23:59:59 +02:00
Geoff Brown
8e192994f8 Bug 1423771 - Suppress error when no reftests verified; r=jmaher
There are some edge cases in test verification where mozharness requests
reftest verification of a non-reftest. In this case, it is best for the
reftest harness to figure out that the requested file is not a test,
do no work and exit cleanly without complaint.
2018-01-03 09:29:32 -07:00
Andrew Halberstadt
5b6ee32372 Bug 1421799 - [reftest] Log 'GECKO(<pid>)' instead of 'ProcessReader' for process_output log actions r=gbrown
MozReview-Commit-ID: FsKg5Gtwx9Z

--HG--
extra : rebase_source : 9b29b44fcec93ade12bc7147a04226a234f1d730
2017-12-06 14:11:55 -05:00
Sebastian Hengst
e6dbbae0aa Backed out 5 changesets (bug 1421799) for failing firefox ui functional tests. r=backout on a CLOSED TREE
Backed out changeset f9f32474fdaf (bug 1421799)
Backed out changeset 18b4fa241936 (bug 1421799)
Backed out changeset 88dca5c8cfac (bug 1421799)
Backed out changeset 8c1f1ab754a5 (bug 1421799)
Backed out changeset e028f677bc80 (bug 1421799)
2018-01-03 20:21:28 +02:00
Andrew Halberstadt
0b44c941df Bug 1421799 - [reftest] Log 'GECKO(<pid>)' instead of 'ProcessReader' for process_output log actions r=gbrown
MozReview-Commit-ID: FsKg5Gtwx9Z

--HG--
extra : rebase_source : 0b012271e1673b641c4514714f0ab68b42d2bd0d
2017-12-06 14:11:55 -05:00
Florian Quèze
032c961e0a Bug 1421992 - script-generated patch to replace do_check_* functions with their Assert.* equivalents, rs=Gijs. 2017-12-21 11:08:17 +01:00
Dorel Luca
61983e9ada Backed out 5 changesets (bug 1421799) for failing browser-chrome on Linux and OSX and for failing autophone-mochitest on Android r=backout on a CLOSED TREE
Backed out changeset 7fb20bced076 (bug 1421799)
Backed out changeset 629e467a07be (bug 1421799)
Backed out changeset 2de335c0287a (bug 1421799)
Backed out changeset afe14ec646ab (bug 1421799)
Backed out changeset bbe4d2292f86 (bug 1421799)
2017-12-14 15:41:22 +02:00
Andrew Halberstadt
b59244590b Bug 1421799 - [reftest] Log 'GECKO(<pid>)' instead of 'ProcessReader' for process_output log actions r=gbrown
MozReview-Commit-ID: FsKg5Gtwx9Z

--HG--
extra : rebase_source : 3bb118c510be08bb8716d553beeae09c7d60d82b
2017-12-06 14:11:55 -05:00
Andrew Halberstadt
3e46924759 Bug 1209463 - [test] Use a common logger across suites from |mach test| and other test commands, r=gbrown
In order for |mach test| and |mach mochitest| to log an overall summary,
every test harness invocation they make needs to use the same structured
logger (otherwise the affected suite will be missing from the summary).

MozReview-Commit-ID: 8LJw7r8SItk

--HG--
extra : rebase_source : 1417dce3817bae94ad61a5250065c6cbc35857e4
2017-11-23 13:04:19 -05:00
Andrew Halberstadt
7f664cfdaf Bug 1209463 - [test] Log suite names in test harnesses, r=gbrown
Suite names are currently only used by formatters to print out
an overall summary from |mach test| and |mach mochitest|. So
this doesn't need to be exact and can be tweaked further at a
later date.

If multiple test invocations have the same suite name, their
results will be merged in the overall summary. If a suite name
is missing, the summary will contain a placeholder name.

MozReview-Commit-ID: K1xpb9hUQRX

--HG--
extra : rebase_source : cc8cc8b36255d939dd5dffd3c5444c34951ac8e2
2017-11-27 17:20:06 -05:00
Xidorn Quan
85f0c3af39 Bug 1267890 part 2 - Add test for -moz-bool-pref(). r=emilio
MozReview-Commit-ID: AFTVgwbi9M

--HG--
extra : source : 8344dd1d7234e4950dd62aaed737dea8197c3406
2017-12-08 20:03:34 -06:00
Narcis Beleuzu
fd0b701b6f Backed out 4 changesets (bug 1417251) for reftest failures in abs-pos-non-replaced-vrl* on Windows and in box-sizing-replaced* on Android. r=backout a=backout
Backed out changeset 66d4e6df73d2 (bug 1417251)
Backed out changeset 5f8edbddf6b5 (bug 1417251)
Backed out changeset bf26cbb99b6a (bug 1417251)
Backed out changeset 2374657677b7 (bug 1417251)

--HG--
extra : amend_source : 9e00f8873f41a7aa6a98e6ccb6528e0c3c19eb05
2017-12-08 14:31:03 +02:00
Jonathan Watt
3e61847b92 Bug 1417251, part 2 - Make the reftest harness support loading of consecutive URIs differing only by hash. r=dbaron,bz
MozReview-Commit-ID: 6VVJrtX1KZa
2017-11-14 15:58:30 +00:00
Emilio Cobos Álvarez
13a91fa9f6 Bug 1417200: Make -moz-border-colors chrome only. r=xidorn
On a CLOSED TREE, since the servo patch managed to get in.

This also makes the border longhand no longer reset them.

MozReview-Commit-ID: KNais1e5FnE
2017-12-01 23:25:01 +01:00
Noemi Erli
d96f41a437 Merge inbound to mozilla-central r=merge a=merge 2017-11-18 00:01:46 +02:00
Jan de Mooij
3a57a1a466 Bug 1417844 part 5 - Stop passing -v 170 to xpcshell. r=jmaher 2017-11-17 12:14:04 +01:00
Jonathan Watt
08a7a8b80b Bug 1382427 - Support running reftest in a mode that runs the test with Retained Display lists on, and references with it off. r=mattwoodrow
This change adds a pref reftest.compareRetainedDisplayLists to enable
this mode.

MozReview-Commit-ID: JxSkJrQifQx
2017-10-31 09:44:17 +00:00