We need a top-level package for tests and support files so that
support modules are importable from subpackages. For example,
previously webdriver/support/inline.py could not be imported from
webdriver/actions/mouse.py.
I'm creating the package in a subdirectory under webdriver in
order to avoid a name-clash with webdriver, the WebDriver client
library. Part of the motivation for adding the subdirectory rather
than renaming the client library is that it's a relatively
isolated change.
MozReview-Commit-ID: BihAKcNLbXK
--HG--
rename : testing/web-platform/meta/webdriver/contexts.py.ini => testing/web-platform/meta/webdriver/tests/contexts.py.ini
rename : testing/web-platform/meta/webdriver/navigation.py.ini => testing/web-platform/meta/webdriver/tests/navigation.py.ini
rename : testing/web-platform/tests/webdriver/actions/__init__.py => testing/web-platform/tests/webdriver/tests/actions/__init__.py
rename : testing/web-platform/tests/webdriver/actions/conftest.py => testing/web-platform/tests/webdriver/tests/actions/conftest.py
rename : testing/web-platform/tests/webdriver/actions/key.py => testing/web-platform/tests/webdriver/tests/actions/key.py
rename : testing/web-platform/tests/webdriver/actions/mouse.py => testing/web-platform/tests/webdriver/tests/actions/mouse.py
rename : testing/web-platform/tests/webdriver/actions/sequence.py => testing/web-platform/tests/webdriver/tests/actions/sequence.py
rename : testing/web-platform/tests/webdriver/actions/special_keys.py => testing/web-platform/tests/webdriver/tests/actions/special_keys.py
rename : testing/web-platform/tests/webdriver/actions/support/__init__.py => testing/web-platform/tests/webdriver/tests/actions/support/__init__.py
rename : testing/web-platform/tests/webdriver/actions/support/keys.py => testing/web-platform/tests/webdriver/tests/actions/support/keys.py
rename : testing/web-platform/tests/webdriver/actions/support/refine.py => testing/web-platform/tests/webdriver/tests/actions/support/refine.py
rename : testing/web-platform/tests/webdriver/actions/support/test_actions_wdspec.html => testing/web-platform/tests/webdriver/tests/actions/support/test_actions_wdspec.html
rename : testing/web-platform/tests/webdriver/conftest.py => testing/web-platform/tests/webdriver/tests/conftest.py
rename : testing/web-platform/tests/webdriver/contexts.py => testing/web-platform/tests/webdriver/tests/contexts.py
rename : testing/web-platform/tests/webdriver/cookies.py => testing/web-platform/tests/webdriver/tests/cookies.py
rename : testing/web-platform/tests/webdriver/navigation.py => testing/web-platform/tests/webdriver/tests/navigation.py
rename : testing/web-platform/tests/webdriver/support/__init__.py => testing/web-platform/tests/webdriver/tests/support/__init__.py
rename : testing/web-platform/tests/webdriver/support/asserts.py => testing/web-platform/tests/webdriver/tests/support/asserts.py
rename : testing/web-platform/tests/webdriver/support/fixtures.py => testing/web-platform/tests/webdriver/tests/support/fixtures.py
rename : testing/web-platform/tests/webdriver/support/http_request.py => testing/web-platform/tests/webdriver/tests/support/http_request.py
rename : testing/web-platform/tests/webdriver/support/inline.py => testing/web-platform/tests/webdriver/tests/support/inline.py
rename : testing/web-platform/tests/webdriver/support/merge_dictionaries.py => testing/web-platform/tests/webdriver/tests/support/merge_dictionaries.py
rename : testing/web-platform/tests/webdriver/window_maximizing.py => testing/web-platform/tests/webdriver/tests/window_maximizing.py
extra : rebase_source : cb2aed22a39fc5b720c70e4b9864ebe20ee8ce40
To retrieve the title of the currently selected content browser
it is not necessary to call into the frame script. Instead just
take the value from the parent process directly.
MozReview-Commit-ID: KEpYKLIydrJ
--HG--
extra : rebase_source : 8b179de7057f8655a81656bd4d95b1562edb9f54
The current webextension in Marionette harness tests doesn't have an
addon id and as such will not be able to be installed outside of
about:debugging. This patch synchronizes the updated webextension
from Puppeteer with Marionette harness.
MozReview-Commit-ID: AjdDQpySnBl
--HG--
extra : rebase_source : c9a498aee2f9ade6dee31971a3b4889d63b19ec6
To support webextensions in Puppeteer the current restartless
extension gets replaced by a webextension. It allow us to test
at least the permission notification. This patch only adds basic
support.
MozReview-Commit-ID: FKq76qcOxKu
--HG--
extra : rebase_source : 1dc81e80c43d3ec61f3ff405fa7807a08ab1d45e
This patch upgrades the GRCOV version being used and changes how it is used in 'codecoverage.py'.
MozReview-Commit-ID: 6fjUB6sV3gy
--HG--
extra : histedit_source : 419133ee55f9a37725845994e0ff16a9c59b2bad
Using /home/worker is the build directory has a 30% talos performance
loss, because test machines has a /home mount directory.
MozReview-Commit-ID: zehcGJrUQX
--HG--
extra : rebase_source : e9ce75ecf18e7d4c829e369f5fbd1df8d6449edf
Unlike python 3, python 2 doesn't have a proper implementation of realpath or
samefile for Windows. However there is a function convert_path in FixTk.py that
was added to python 2 to fix an issue with tcl installations and symlinks, so
we use that as this is just for testing.
The whitelisting function thisTestLeaksUncaughtRejectionsAndShouldBeFixed was replaced by expectUncaughtRejection, and existing calls did not take effect anymore.
MozReview-Commit-ID: 3uOxkgWYWEz
--HG--
extra : rebase_source : 6b27b77da78743880529adae7adf4ec2aa64dfea
extra : intermediate-source : 5809a30a0c4817509beb1078cf336d8367b8107a
extra : source : 6f0394b523a66dab444b8551deb8f3c6c81d8f31
Support OSX Signed nightlies (in the complete.mar too)
MozReview-Commit-ID: 6iPrPhjj34g
--HG--
extra : rebase_source : 55a6bcf1910f1cae084cf32f6cf47ecf44b500aa
The mochitest harness uses testEnd multiple times to log various failures. This can result
in several testEnd messages, which will soon cause mozlog to spit out an error. Instead,
these should be testStatus.
This also starts using mozlog's assertion_count log action to log test assertions (again,
instead of testEnd).
MozReview-Commit-ID: FFsyicSso5Y
--HG--
extra : rebase_source : 5e8d02714fcf24f2b86a9867b0403bbda0d00f91
"Automation Error" is not sufficient to turn a mozharness job orange.
mochitest-plain failures of this type normally cause job failure by not
printing out the test suite summary. This patch uses the same technique
for geckoview tests: If a crash is detected, do not print a test summary,
so that mozharness will subsequently fail the job.
In some cases the click command can trigger the closing of the
currently selected tab or window. To not cause a hang when waiting
for a response from the removed framescript, the tab and window
closing events have to be observed. Also the command has to return
immediately.
MozReview-Commit-ID: 9WeXryrKEJr
--HG--
extra : rebase_source : a7a23cf19e55eecbf957d48c2182a601d63d0909
Beside Errno 57 there is also Errno 107 (Transport endpoint is not
connected) which can happen in case of an unexpected crash/shutdown
of Firefox. Then calling shutdown() on the socket to stop the
communication will fail.
This is most likely a race and can happen after receiving a reply
from the server, and before sending another command.
MozReview-Commit-ID: 3S5Ko4XVUAJ
--HG--
extra : rebase_source : 59d79ab5da2c4e67b64bc90501660a7603a993c8
Tests are causing issues for us due to slow running builds and
delayed creation of minidump files. Also we don't see a value
yet to have those tests running for ASAN. Once bug 1348961 is
fixed we could re-evaluate.
MozReview-Commit-ID: BZHa1O5F6ep
--HG--
extra : rebase_source : 28e1977607eb803c4167315cf32f56e5b2e0ba31
In case of delayed shutdowns of Firefox we currently miss to detect the
created minidump files because the mozcrash mock gets removed right after
the crash causing command has been executed. To prevent this the mock
has to be active from setUp until tearDown.
Also we should not silently ignore the case that the minidump folder
cannot be deleted. Because it means no crash happened, or the folder
has not been created.
MozReview-Commit-ID: KncJ5BHi7M5
--HG--
extra : rebase_source : 63c947b0a7fe16de0eed19a8e0359721d9f4051d
This also adds a utility function for synthesizing native touch
events to Eventutils.js.
I did not add a test for searchbar because of intermittent issues
with showing the contextmenu (that are not reproducible manually).
I believe this is rather related to searchbar functionality than
my patches.
MozReview-Commit-ID: Dqm92Saosxz
--HG--
extra : rebase_source : d5c4333609b68773e62447bd3158cadfa89b803b
This is faster and works better in some cases (e.g. with SVG). However
it doesn't work correctly on Windows yet, so remains disabled there by default.
MozReview-Commit-ID: AXyeFUGfVgx
The internal reftest harness changes some results, but it's not clear
that it's overall better or worse than the old one, so just update the
expectation metadata for now.
MozReview-Commit-ID: KSE2z1Ct72t
This adds a metadata object associated with each test queue, and uses
it to pass cache information into the marionette internal reftest
implementation so that we are able to cache only those canvases that
will be reused.
MozReview-Commit-ID: zASrlvnri3
Initially wptrunner had a single test queue that was shared between
all processes. Then for --run-by-dir it changed to a queue of
queues. This change makes it a queue of deques, which is simpler,
since the test queues themselves are no longer shared between
processes. It also changes the implementation when we aren't using
--run-by-dir but are using multiple processes to pre-group the tests
into N queues rather than sharing a single queue between all
processes. This is necessary to use the deque of course, but
importantly anticipates a change in which we will pre-compute per
queue metdata for each queue; that doesn't work well with one shared
queue. The downside of this change is that there is no work stealing,
so it may be less efficient if we randomly assign many slow jobs to
one particular process.
MozReview-Commit-ID: 7e0Odk7yDwr
Add an InternalReftestImplmentation that runs reftests using the
built-in Marionette reftest primitives rather than screenshots. This
is actiivated using the --internal-reftest switch, although that may
become the default in the future.
MozReview-Commit-ID: 6HxGuBsTITf
This adds commands to start a reftest session, run a test, and end the
session. It as assumed that after you start a reftest session you will
just run reftests until you end the session. When starting a session
the user provides a string indicating when screenshots should be
taken, and an object mapping urls to a count of the number of times
that url is expected to be used in the session, to help with
caching. Running the tests takes a url to a test, an expected status,
a timeout, and a nested list of possible references, in which each
entry at a specific level is combined by OR and nested references are
combined by AND.
The implementation is heavilly inspired by the existing reftest
harness, starting a minimal window with no tabs, and loading the urls
directly in there. In order to get a screenshot in the e10s case we
have to pass the DRAW_VIEW and USE_WIDGET_LAYERS flags when taking the
screenshot.
For performance we heavily cache canvases; for references that will be
repeated we cache the full canvas with image, and we also cache a
single canvas to use for all other screenshots to avoid the overhead
of repeatedly creating a new canvas element.
MozReview-Commit-ID: JOFvtmH7tg
Because this window is a normal Firefox window but doesn't contain any
tabs, the normal Marionette functions for iterating over windows don't
work well. As a sort of hack, identify this window by the id of its
root element, and special case it when finding windows in Marionette.
MozReview-Commit-ID: LxPv13YDXDu
This allows other commands to implicitly change the window handle, by
calling findWindow with appropriate arguments to get a window
properties object and then passing that to setWindowHandle.
MozReview-Commit-ID: 4NpYxjsMM4T
This uses os.path.normcase to fix the current issue on automation.
Ideally we would use os.path.samefile but that's not available in python 2.
os.path.realpath is implemented in python 2, but it doesn't resolve symlinks and junction points
and doesn't normalise case.
This is faster and works better in some cases (e.g. with SVG). However
it doesn't work correctly on Windows yet, so remains disabled there by default.
MozReview-Commit-ID: AXyeFUGfVgx
--HG--
extra : rebase_source : c7d33dc0c92624e05e9e62109606f1ca32bdd288
The internal reftest harness changes some results, but it's not clear
that it's overall better or worse than the old one, so just update the
expectation metadata for now.
MozReview-Commit-ID: KSE2z1Ct72t
--HG--
extra : rebase_source : f1810dd4b9f8dcc115528ceaac4894408d85f935
Reorder imports so that global ones are done before local imports.
MozReview-Commit-ID: 7xA9XQlxlj4
--HG--
extra : rebase_source : b144401c5c6c47e87beab669f76f2b61fb79e5b6
It will help a lot for debugging when the outer window id of the
content window gets logged when the frame script gets registered.
MozReview-Commit-ID: D64A1nPEs6l
--HG--
extra : rebase_source : 0e592e10cb1a0979f4331b92dbfcfc905e737120
The testcase file clicks.html contains a couple of elements which are
not in use, and makes it hard to keep an overview what's actually used.
Lets refactor it to only keep what's really needed.
MozReview-Commit-ID: D9PVWUSmOHr
--HG--
extra : rebase_source : 0ecc3400c7e291f7923db1e93884b1d279a5e6e9
- Set the extensions.legacy.enabled pref for mochitests etc
- Skip a plugin-inside-xpi test for now if legacy extensions
are force-disabled. That test can just be removed once we
get to 57.
MozReview-Commit-ID: As9LtkQTcTS
--HG--
extra : rebase_source : fcc84daef95c453e893cc3b98498fdb87f54b1bb
In bug 1338306, support for optional default values was added to the various
get*Pref APIs on the prefs service. This change exposes that to SpecialPowers
as well.
MozReview-Commit-ID: 6hU73CrQBZQ
--HG--
extra : rebase_source : 316ae4492a61d13ad4717160e97856960679123d
When we get the usre's frequent visting site from UnifiedComplete.js,
and then open a network connection for it before the user hits
the enter key.
MozReview-Commit-ID: 36moBeeUnyZ
--HG--
extra : rebase_source : 4122534b2d21d2a959fd8dbb8533dd3e0ef75621
In safe mode the command line hander arguments are getting parsed
after the safe mode dialog has been closed. As such Marionette is
not getting enabled before, and cannot close the dialog.
To workaround the problem the "command-line-startup" observer
notification can be used, which allows to parse the given
arguments before the dialog.
MozReview-Commit-ID: LWzUKCnM0YK
--HG--
extra : rebase_source : d0113a202c64c1766955d6effd1cdf1af96773c0
In safe mode the command line hander arguments are getting parsed
after the safe mode dialog has been closed. As such Marionette is
not getting enabled before, and cannot close the dialog.
To workaround the problem the "command-line-startup" observer
notification can be used, which allows to parse the given
arguments before the dialog.
MozReview-Commit-ID: LWzUKCnM0YK
--HG--
extra : rebase_source : 5dd538eabbfb76a0d19440eb9fa5ac431bd86f0b
This also starts running the selftests on linux debug builds, since that's the only place that we
can test assertions and leaks.
MozReview-Commit-ID: JTdTLOLWn5r
--HG--
extra : rebase_source : 643f8d15a550fa39f4d3daba75c60560deefc96e
Using /home/worker is the build directory has a 30% talos performance
loss, because test machines has a /home mount directory.
MozReview-Commit-ID: zehcGJrUQX
--HG--
extra : source : feedcde68c2a54da210f03eb287ab5c862fc982b
extra : amend_source : 96a6ad12e8fbb5dd2f7ff97f5ef183b8400475cf
Really the only thing we use it for is generating a counter string
prefix elsewhere in Talos, so let's just create a private function
to do that close to where it's used.
MozReview-Commit-ID: BICrhDAIEHb
--HG--
extra : rebase_source : f3faa1720e69c179b597ca58ee17424182e0cda0
`try-test-paths` is set up to map anything under testing/web-platform
to the web-platform-tests flavour. By default, the web-platform-tests flavour
refers to the testharness test type for wptrunner, so we need to account for
reftest and wdspec test types.
This change causes mozharness to omit the test-type argument to wptrunner when
try-test-paths is being used, therefore making wptrunner determine the
appropriate test type for each requested test.
MozReview-Commit-ID: 7TDAShdDM4g
--HG--
extra : rebase_source : fde6ec219f574cd1e536764c0128a6816834f533
Create an emmpty reference file if one doesn't exist, and open it in
the editor.
MozReview-Commit-ID: 5aBLp2AdnzY
--HG--
extra : rebase_source : bae3df50689895e6ac02cc740acea57be5c24b2e
This confuses people and isn't needed to update the manifest these days.
MozReview-Commit-ID: 4t4zdXLMob5
--HG--
extra : rebase_source : 9c43570073b15d11b3a52c830f9f3fd1f9f063c7
The GetNamedCookie command currently returns a JSON Array of one,
retained cookie, after it has removed the cookies that don't match by
name.
This is in violation of the WebDriver specification, which says it must
return the cookie serialisation directly.
MozReview-Commit-ID: 9yEiarEGBez
--HG--
extra : rebase_source : ad4acfb9510354a86a0b604cacf32cfd5c4f8e5d
The expires property on nsICookie2 does not exist and we are
consequently returning it as undefined, which gets omitted in the JSON
serialisation to the client.
This patch changes it to return the correct property so that the expiry
property is returned as part of the serialised cookie.
MozReview-Commit-ID: IIjf4NWnUoQ
--HG--
extra : rebase_source : 5e2dc27fb550a010dcbe40eee49d9ae31244d749
The url fixture is used to access hosted files on the wptserve instance.
This patch makes it possible to choose between different wptserve HTTPDs
based on the protocol.
The default remains the HTTP protocol.
MozReview-Commit-ID: FvtMMUSlB4M
--HG--
extra : rebase_source : 42a25ebc1a0ca6a3d664ba4949711dd11a6f4007
These tests currently use legacy extensions that won't work in 57,
switch them to webextensions.
MozReview-Commit-ID: 8lZrqjYSrar
--HG--
extra : rebase_source : bf8f6db2daedcddb8c554325498da7cec5159118
extra : source : 75fe2d21cdff9767c9a96682375d261475c284d1
Because we no longer can tag geckodriver releases in mozilla-central,
we need to include build information in the program itself. In the
version information message displayed when passing the --version flag,
we now include the current tip's SHA1 and build date following the
version number.
This patch could be made simpler by dumping this information correctly
formatted into a text file in the output directory, but it was requested
in https://bugzilla.mozilla.org/show_bug.cgi?id=1374977 to also include
the version information in the log output, which means we need to access
it differently and in different places.
MozReview-Commit-ID: CbFQn7IV8ew
--HG--
extra : rebase_source : dcc38ba7b5f209e9878755d5d75b611e22b5253d
A number of places in JS need to drain the current thread's event queue,
which cannot be done with nsIThreadManager::spinEventLoopUntil, since we
need to not wait for an incoming event when attempting to process one.
Loading mozlog from within the executor process makes us prone to
deadlocks since we can't guarantee that the log mutex isn't acquired
when we fork() the parent process, and the python multiprocessing
module doesn't respect posix guidelines about execv()ing a new process
after a fork().
To avoid this specific instance of the probelm we stop pytest loading
the mozlog plugin which we aren't actually using but is loaded by
default when mozlog is available.
MozReview-Commit-ID: IIllNZVOUJz
--HG--
extra : rebase_source : 9281a4d72c82038589937a4f743e1a2447439e95
This should exercise MemoryBlockCache in about 65% of tests, and FileBlockCache
in 35% of tests.
Also media.memory_caches_combined_limit_kb=256KB, to exercise the fallback to
FileBlockCache when MemoryBlockCaches are using too much memory.
MozReview-Commit-ID: A8k3espEg03
--HG--
extra : rebase_source : dd4fcbaa669912fe02098552a8a564d123f76a33
Allow running |mach wpt| on one click loaners in order to run
web-platform-tests tests.
This implementation is just like the one for other testsuites using
thee packaged tests rather than the checkout that we get with wpt, at
least on Linux. That's also where the tests run from so it seems
reasonable for now. Moving to the checkout in the future could remove
some of the logic here by using a fake mozbuild environment so that
the testsuite itself doesn't have to implement anything much.
MozReview-Commit-ID: CaewrdjJ2ef
--HG--
extra : rebase_source : 491b8014d48f06ff5bd41b28cc985608981fbdf4
For a while now it has been making the content process sandbox less strict.
MozReview-Commit-ID: Am6fGzViaLk
--HG--
extra : rebase_source : 0bc037f205896c866559a7ab1f7e2c042c3142db
This import is unnecessary, because the WebIDL interface for
TextEncoder has Exposed=System, so it is available on the JSM
global. I can revert some of the changes from bug 1348103 at the same
time.
I need to remove this import, because it will break with shared JSM
globals.
MozReview-Commit-ID: BKmaH8iTFnI
--HG--
extra : rebase_source : bbb2944245ec2d8040f5138e1c6ee00ea05a52a3
This is faster and works better in some cases (e.g. with SVG). However
it doesn't work correctly on Windows yet, so remains disabled there by default.
MozReview-Commit-ID: AXyeFUGfVgx
The internal reftest harness changes some results, but it's not clear
that it's overall better or worse than the old one, so just update the
expectation metadata for now.
MozReview-Commit-ID: KSE2z1Ct72t
This adds a metadata object associated with each test queue, and uses
it to pass cache information into the marionette internal reftest
implementation so that we are able to cache only those canvases that
will be reused.
MozReview-Commit-ID: zASrlvnri3
Initially wptrunner had a single test queue that was shared between
all processes. Then for --run-by-dir it changed to a queue of
queues. This change makes it a queue of deques, which is simpler,
since the test queues themselves are no longer shared between
processes. It also changes the implementation when we aren't using
--run-by-dir but are using multiple processes to pre-group the tests
into N queues rather than sharing a single queue between all
processes. This is necessary to use the deque of course, but
importantly anticipates a change in which we will pre-compute per
queue metdata for each queue; that doesn't work well with one shared
queue. The downside of this change is that there is no work stealing,
so it may be less efficient if we randomly assign many slow jobs to
one particular process.
MozReview-Commit-ID: 7e0Odk7yDwr
Add an InternalReftestImplmentation that runs reftests using the
built-in Marionette reftest primitives rather than screenshots. This
is actiivated using the --internal-reftest switch, although that may
become the default in the future.
MozReview-Commit-ID: 6HxGuBsTITf
This adds commands to start a reftest session, run a test, and end the
session. It as assumed that after you start a reftest session you will
just run reftests until you end the session. When starting a session
the user provides a string indicating when screenshots should be
taken, and an object mapping urls to a count of the number of times
that url is expected to be used in the session, to help with
caching. Running the tests takes a url to a test, an expected status,
a timeout, and a nested list of possible references, in which each
entry at a specific level is combined by OR and nested references are
combined by AND.
The implementation is heavilly inspired by the existing reftest
harness, starting a minimal window with no tabs, and loading the urls
directly in there. In order to get a screenshot in the e10s case we
have to pass the DRAW_VIEW and USE_WIDGET_LAYERS flags when taking the
screenshot.
For performance we heavily cache canvases; for references that will be
repeated we cache the full canvas with image, and we also cache a
single canvas to use for all other screenshots to avoid the overhead
of repeatedly creating a new canvas element.
MozReview-Commit-ID: JOFvtmH7tg
Because this window is a normal Firefox window but doesn't contain any
tabs, the normal Marionette functions for iterating over windows don't
work well. As a sort of hack, identify this window by the id of its
root element, and special case it when finding windows in Marionette.
MozReview-Commit-ID: LxPv13YDXDu
This allows other commands to implicitly change the window handle, by
calling findWindow with appropriate arguments to get a window
properties object and then passing that to setWindowHandle.
MozReview-Commit-ID: 4NpYxjsMM4T
SpecialPowers.loadChromeScript() sends a script to the child process,
then creates a sandbox, and runs the script in that sandbox. There are
various sandboxOptions that can be passed when creating a sandbox, and
it would be nice to have that functionality for loadChromeScript.
I just need this for wantGlobalProperties, but I might as well make it
as general as possible. I'm not sure all of the types it can take can
actually be serialized across processes, but I guess that's okay.
MozReview-Commit-ID: GoJjXdjizFk
--HG--
extra : rebase_source : 9c2bc190dbf5a080978953cffd64205e8b816367
This patch adds grcov to linux64-ccov. Grcov is then used after code coverage collection to process the .gcno and .gcda files into a .info (LCOV-style) file. It also uses the 'linked-files-map.json' to rewrite symbolic links to the path that they point to. The .info file that is produced is called 'grcov_lcov_output_stdout' and is stored in the zip file 'code-coverage-grcov.zip'.
MozReview-Commit-ID: 5WhD289N6Fs
--HG--
extra : rebase_source : 9ed60bd96f5e9a479771357e38b0b3b16abd351e
This adds a metadata object associated with each test queue, and uses
it to pass cache information into the marionette internal reftest
implementation so that we are able to cache only those canvases that
will be reused.
MozReview-Commit-ID: zASrlvnri3
--HG--
extra : rebase_source : feb714ec04c44f6b6d2709ae1acbb621f8b0771d
Initially wptrunner had a single test queue that was shared between
all processes. Then for --run-by-dir it changed to a queue of
queues. This change makes it a queue of deques, which is simpler,
since the test queues themselves are no longer shared between
processes. It also changes the implementation when we aren't using
--run-by-dir but are using multiple processes to pre-group the tests
into N queues rather than sharing a single queue between all
processes. This is necessary to use the deque of course, but
importantly anticipates a change in which we will pre-compute per
queue metdata for each queue; that doesn't work well with one shared
queue. The downside of this change is that there is no work stealing,
so it may be less efficient if we randomly assign many slow jobs to
one particular process.
MozReview-Commit-ID: 7e0Odk7yDwr
--HG--
extra : rebase_source : 8dbe7321a41d79f9bca1efa90494b514d16f07db
Add an InternalReftestImplmentation that runs reftests using the
built-in Marionette reftest primitives rather than screenshots. This
is actiivated using the --internal-reftest switch, although that may
become the default in the future.
MozReview-Commit-ID: 6HxGuBsTITf
--HG--
extra : rebase_source : 7b5416cfc1a26c54432346de3822a2685b41f9c9
This adds commands to start a reftest session, run a test, and end the
session. It as assumed that after you start a reftest session you will
just run reftests until you end the session. When starting a session
the user provides a string indicating when screenshots should be
taken, and an object mapping urls to a count of the number of times
that url is expected to be used in the session, to help with
caching. Running the tests takes a url to a test, an expected status,
a timeout, and a nested list of possible references, in which each
entry at a specific level is combined by OR and nested references are
combined by AND.
The implementation is heavilly inspired by the existing reftest
harness, starting a minimal window with no tabs, and loading the urls
directly in there. In order to get a screenshot in the e10s case we
have to pass the DRAW_VIEW and USE_WIDGET_LAYERS flags when taking the
screenshot.
For performance we heavily cache canvases; for references that will be
repeated we cache the full canvas with image, and we also cache a
single canvas to use for all other screenshots to avoid the overhead
of repeatedly creating a new canvas element.
MozReview-Commit-ID: JOFvtmH7tg
--HG--
extra : rebase_source : ab5a2ef2e450b9bbdc6bc3c9487ed5dfda2c1d4b
Because this window is a normal Firefox window but doesn't contain any
tabs, the normal Marionette functions for iterating over windows don't
work well. As a sort of hack, identify this window by the id of its
root element, and special case it when finding windows in Marionette.
MozReview-Commit-ID: LxPv13YDXDu
--HG--
extra : rebase_source : 8c0aa7a4aeff69e1d7c86ba7cbb6c421abd0c31d
This allows other commands to implicitly change the window handle, by
calling findWindow with appropriate arguments to get a window
properties object and then passing that to setWindowHandle.
MozReview-Commit-ID: 4NpYxjsMM4T
--HG--
extra : rebase_source : 9b53d8b10e2341624c3add5e9975aab47e0b320f
On bug 1373635 the restart keyword has been removed from
GeckoInstance.close(), but it was missed for FennecInstance,
which calls this method.
MozReview-Commit-ID: 5cEFJ6JXIVl
--HG--
extra : rebase_source : 057db73615fa59107bc37585a8cc516e693ea851
In some cases the click command can trigger the closing of the
currently selected tab or window. To not cause a hang when waiting
for a response from the removed framescript, the tab and window
closing events have to be observed. Also the command has to return
immediately.
MozReview-Commit-ID: 9WeXryrKEJr
--HG--
extra : rebase_source : 682d67d51109c57a6de1a129492ebb5b635d7c56
Beside Errno 57 there is also Errno 107 (Transport endpoint is not
connected) which can happen in case of an unexpected crash/shutdown
of Firefox. Then calling shutdown() on the socket to stop the
communication will fail.
This is most likely a race and can happen after receiving a reply
from the server, and before sending another command.
MozReview-Commit-ID: 3S5Ko4XVUAJ
--HG--
extra : rebase_source : f808ee62188255ae1aaabac8e1fd3691eba6b2e6
In case of delayed shutdowns of Firefox we currently miss to detect the
created minidump files because the mozcrash mock gets removed right after
the crash causing command has been executed. To prevent this the mock
has to be active from setUp until tearDown.
Also we should not silently ignore the case that the minidump folder
cannot be deleted. Because it means no crash happened, or the folder
has not been created.
MozReview-Commit-ID: KncJ5BHi7M5
--HG--
extra : rebase_source : 63c947b0a7fe16de0eed19a8e0359721d9f4051d
Reorder imports so that global ones are done before local imports.
MozReview-Commit-ID: 7xA9XQlxlj4
--HG--
extra : rebase_source : b144401c5c6c47e87beab669f76f2b61fb79e5b6
It will help a lot for debugging when the outer window id of the
content window gets logged when the frame script gets registered.
MozReview-Commit-ID: D64A1nPEs6l
--HG--
extra : rebase_source : 0e592e10cb1a0979f4331b92dbfcfc905e737120
The testcase file clicks.html contains a couple of elements which are
not in use, and makes it hard to keep an overview what's actually used.
Lets refactor it to only keep what's really needed.
MozReview-Commit-ID: D9PVWUSmOHr
--HG--
extra : rebase_source : 0ecc3400c7e291f7923db1e93884b1d279a5e6e9
The cookie service relies on the current document's
domain which is accessible from chrome space through
this.curBrowser.contentBrowser.contentURI.host.
As it is implemented currently, Marionette's cookie service jumps
between chrome- and content space more than necessary. This incurs
significant serialisation and IPC overhead, considering that the domain,
hostname, and current path information is readily available in chrome
space.
This patch removes all cookie-related functionality from
testing/marionette/listener.js, and implements a pure chrome-only
version of the service. It does, however, not try to fix conformance
issues with the WebDriver specification, of which there are many.
Some of the algorithms, especially to do with iteration over cookies,
implemented in cookie.iter, is also highly suboptimal. I have not
fundamentally changed any algorithms, and so my recommendation is to
address this later when addressing potential conformance bugs.
MozReview-Commit-ID: Fgs8ocbDJxb
--HG--
extra : rebase_source : 16470d5341459e40b1ceed12728451d517bbc490
The last commit discovered a bug that one assertion's error message was
not being propagated. This adds extensive tests for this, for all the
remaining assertions to ensure this does not regress in the future.
MozReview-Commit-ID: EK91mUPeweG
--HG--
extra : rebase_source : f429a4cdd420c8d078419754d3cb0c39ac418ef1
The err argument to assert.object is currently being dropped, which
means we loose the specialised and the custom error message.
This patch propagates the error message like we do for all other
assertions in this module.
MozReview-Commit-ID: GwuBSbqKfk1
--HG--
extra : rebase_source : 86c57aaaf60526eaf65345b9d5e38378920419e3
Marionette uses singular module names. Make the cookie module
fall in line by renaming it from testing/marionette/cookies.js to
testing/marionette/cookie.js.
MozReview-Commit-ID: H4jyvI3lFxz
--HG--
rename : testing/marionette/cookies.js => testing/marionette/cookie.js
extra : rebase_source : 6da48d3d9215de34ccb97823c0430766538fb45f
Instead of returning a string representation of the current locaton from
GeckoDriver#currentURL, we encode it as a URL object.
browser.Context#currentURL is also renamed to currentURI to reflect that
it now returns an nsIURI object.
The motivation behind this change is that we need to access a URL's port,
protocol, pathname, and hostname separately.
MozReview-Commit-ID: DM7gkrHhFpb
--HG--
extra : rebase_source : 1c8c3535bebc1e91a7f8ddaa88278cc78f66cf56
We want to namespace the WebDriver commands so that we in the future can
use Marionette without activating the WebDriver functionality. Today,
Marionette sets up a lot of state which is not needed if the client only
needs Marionette for installing an addon.
Namespacing the WebDriver commands is the first step towards a future
where features can be enabled and disabled at runtime.
MozReview-Commit-ID: E2lAGKb833F
--HG--
extra : rebase_source : 2d72274e4d85506f3af319e2ca36600128faa6f6
We don't want to support multiple namespaces in service endpoints as it
will add unecessary complexity when we in the future support enabling-
and disabling services on an individual level. This patch drops the
"localization" namespace and exposes "L10n:*".
MozReview-Commit-ID: IhqG72vMohJ
--HG--
extra : rebase_source : 9d675e2915f8ae25bcc9fdedab3e2095038990f0
The Marionette service provides commands that are specific to Marionette
operation, such as setting the target (context) for all other commands,
deciding whether to accept new connections, and quitting the browser.
MozReview-Commit-ID: 7NIbaAUzybx
--HG--
extra : rebase_source : c46395d87fb60214a9bd434e71dd2d622f050d91
The "timeouts" command could have been removed in Firefox 55, and
"quitApplication" can be removed with Firefox 56.
MozReview-Commit-ID: Fe7x8Yy0vSb
--HG--
extra : rebase_source : fc8b2c3c27f76a472cbdd8681efff06ca60e00f7
The getMarionetteID, sayHello, and setTestName commands are not
implemented but defined in the command list.
MozReview-Commit-ID: 7Yzgrp9qpeX
--HG--
extra : rebase_source : e34d2ef599525b3fc751a43a6edcd917a72b6725
The mochitest harness uses testEnd multiple times to log various failures. This can result
in several testEnd messages, which will soon cause mozlog to spit out an error. Instead,
these should be testStatus.
This also starts using mozlog's assertion_count log action to log test assertions (again,
instead of testEnd).
MozReview-Commit-ID: FFsyicSso5Y
--HG--
extra : rebase_source : f6f3ab02e1c9ef693ea6a857f3e6dc863a075135
As of bug 1373150, l10n repacks do not require a anything to compile, so
they can stop downloading most toolchains from tooltool. However some
tools are still required, such as mozmake on Windows and DMG-related
tools on cross OSX.
--HG--
extra : rebase_source : f46e851c7941491530ce65490d0cfce4f9f02e35
In automation we should combine the standard logging and
the gecko log by default to ease the investigation of test
failures. It will also provide crash/assertion output
without having to search for it in other log files.
Also the custom error list has been replaced with the
default base and harness error lists as used by other
harnesses, which prevents false assumptions by the parser
when the trace log contains returns of expected errors.
MozReview-Commit-ID: 1rQ6maOqD3V
--HG--
extra : rebase_source : 77e94ffc6b77ac0467214321ed566f58c4e46f0e
The quitApplication command was accidentally removed in 1e96a289d28a.
This adds it back as a recognised command alias in order to not break
geckodriver.
MozReview-Commit-ID: IZ0h8dv9ILt
--HG--
extra : rebase_source : 61550dae3a71973a2028d6384bc3eab388c17c21
When linting the Marionette server code,
https://searchfox.org/mozilla-central/commit/de001d80b777ff0fcfa823a52e8d49b4981af040
accidentally removed the missing window check from the
Marionette:GetWindowRect command. This change reintroduces the
check that was accidentally removed.
MozReview-Commit-ID: FkDOUKR2dIi
--HG--
extra : rebase_source : abc32aec9b005f341d1e1deb1bbc9a3132dd35cb
The Marionette setWindowRect command is meant to provide a blocking API
for resizing and moving the window. This currently has an intermittent
rate of ~0.254 with the WPT conformance test.
The main issue in providing a blocking API is that the DOM resize
event fires at a high rate and needs to be throttled. We are able to
throttle this successfully with requestAnimationFrame, and before that,
a hard-coded 60 fps setTimeout delay. To the naked eye, this appears to
synchronise window resizing before returning the resposne to the client.
However, occasionally the response contains the wrong window size.
window.outerWidth and window.outerHeight do not appear to be
deterministic as DOM properties are not synchronously populated.
Calls to ChromeWindow.outerWidth and ChromeWindow.outerHeight sometimes
also returns inconsistent values. Tests, document in the bug, have
shown that somtimes, the returned window size from the setWindowRect
command is correct, and that the size from the subsequent getWindowRect
command is not.
By using a combination of Services.tm.mainThread.idleDispatch and a
blocking promise on not returning a response until the window size has
changed, we are able to reduce the intermittent rate significantly (by
over an order of magnitude).
As one would expect, delaying computation allows DOM property values to
populate, and as such does not address the underlying problem or make it
inconceivable that the race described above could re-appear, but it does
seem to be more reliable than the current approach.
MozReview-Commit-ID: Lf2yeeXH082
--HG--
extra : rebase_source : e27912fdcb6edbf825bf3168f3542ff2b4551b8b
(For Landing more OSX Nightly Support from date to central)
MozReview-Commit-ID: FSbQZ1Fbdcs
--HG--
extra : rebase_source : 3651dd368f032ae9f17cba42010902f850a64700