svg tests not working in the wpt harness

NEW
Unassigned

Status

Testing
web-platform-tests
5 months ago
4 months ago

People

(Reporter: louis, Unassigned)

Tracking

Version 3
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

I remove the expected fail of the svg test under tests/svg/shapes/rect-01.svg and do a try run. But the reftest analyzer can not show the image [1].

[1] https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=https://queue.taskcluster.net/v1/task/avjb62zPRyq6EV_I3xvABw/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1
I think marionette is not waiting for the SVG to load in this case, or the options that we send to drawWindow prevent us capturing SVG. ato: is that a known issue? A quick search didn't turn anything up.

As it happens I have a branch designed to make the reftest runner faster, and on that branch this test passes. So this will be solved soon in any case.
Depends on: 1363428
(In reply to James Graham [:jgraham] from comment #1)
> I think marionette is not waiting for the SVG to load in this case, or the
> options that we send to drawWindow prevent us capturing SVG. ato: is that a
> known issue? A quick search didn't turn anything up.

Marionette is known to work on image documents, plain text files, and HTML
documents.  We may not be waiting for the correct events for SVG documents.
Cc’ing whimboo, who has done work recently on the page load algorithm in 
Marionette.
What I need is a test job with Marionette trace logs enabled. Then I could have a look if there is something bogus with page loads, but as far as I can think of it shouldn't be the case here for SVG images.
louis, could you please attach a trace-level log from geckodriver?
Flags: needinfo?(lochang)
(Reporter)

Comment 6

4 months ago
Created attachment 8875107 [details]
trace-level log of svg in wpt test

I am not sure how to get trace-level log from geckodriver...
But I try to get the log by using
|./mach wpt --webdriver-arg="--log trace" svg/shapes/rect-01.svg|
not sure if it is what you want?
Flags: needinfo?(lochang)
Attachment #8875107 - Attachment mime type: text/x-log → text/plain
The log is actually not a trace log but a debug log. So "Marionette TRACE" entries are missing, or it's because the harness doesn't use any commands of Marionette. Anyway I checked the following with Marionette directly (I hope those are the correct files):

    def test_testcase(self):
        self.marionette.navigate("https://hg.mozilla.org/mozilla-central/raw-file/5801aa478de12a62b2b2982659e787fcc4268d67/testing/web-platform/tests/tools/wptrunner/wptrunner/testharness_runner.html")
        self.marionette.navigate("https://hg.mozilla.org/mozilla-central/raw-file/5801aa478de12a62b2b2982659e787fcc4268d67/testing/web-platform/tests/svg/shapes/rect-01.svg")
        self.marionette.navigate("https://hg.mozilla.org/mozilla-central/raw-file/5801aa478de12a62b2b2982659e787fcc4268d67/testing/web-platform/tests/svg/shapes/rect-01-ref.html")

Here the trace log output:

0:06.75 PROCESS_OUTPUT: ProcessReader (pid:99077) "1496807469370	Marionette	DEBUG	Received DOM event "beforeunload" for "http://web-platform.test:8000/testharness_runner.html""
 0:06.76 PROCESS_OUTPUT: ProcessReader (pid:99077) "1496807469384	Marionette	DEBUG	Received DOM event "pagehide" for "http://web-platform.test:8000/testharness_runner.html""
 0:06.77 PROCESS_OUTPUT: ProcessReader (pid:99077) "1496807469385	Marionette	DEBUG	Received DOM event "unload" for "http://web-platform.test:8000/testharness_runner.html""

The test harness runner page correctly gets unloaded.

 0:06.77 PROCESS_OUTPUT: ProcessReader (pid:99077) "++DOMWINDOW == 8 (0x12769a000) [pid = 99079] [serial = 8] [outer = 0x1276a7000]"
 0:06.78 PROCESS_OUTPUT: ProcessReader (pid:99077) "1496807469401	Marionette	DEBUG	Received DOM event "DOMContentLoaded" for "http://web-platform.test:8000/svg/shapes/rect-01.svg""
 0:06.79 PROCESS_OUTPUT: ProcessReader (pid:99077) "1496807469407	Marionette	DEBUG	Received DOM event "pageshow" for "http://web-platform.test:8000/svg/shapes/rect-01.svg""

And we wait for the `pageshow` event of the SVG image. The next load:

 0:06.85 PROCESS_OUTPUT: ProcessReader (pid:99077) "MARIONETTE LOG: INFO: classList:"
 0:06.91 PROCESS_OUTPUT: ProcessReader (pid:99077) "1496807469536	Marionette	DEBUG	Received DOM event "beforeunload" for "http://web-platform.test:8000/svg/shapes/rect-01.svg""
 0:06.93 PROCESS_OUTPUT: ProcessReader (pid:99077) "1496807469552	Marionette	DEBUG	Received DOM event "pagehide" for "http://web-platform.test:8000/svg/shapes/rect-01.svg""
 0:06.93 PROCESS_OUTPUT: ProcessReader (pid:99077) "1496807469552	Marionette	DEBUG	Received DOM event "unload" for "http://web-platform.test:8000/svg/shapes/rect-01.svg""
 0:06.93 PROCESS_OUTPUT: ProcessReader (pid:99077) "++DOMWINDOW == 9 (0x1279e2000) [pid = 99079] [serial = 9] [outer = 0x1276a7000]"
 0:06.94 PROCESS_OUTPUT: ProcessReader (pid:99077) "1496807469560	Marionette	DEBUG	Received DOM event "DOMContentLoaded" for "http://web-platform.test:8000/svg/shapes/rect-01-ref.html""
 0:06.94 PROCESS_OUTPUT: ProcessReader (pid:99077) "1496807469565	Marionette	DEBUG	Received DOM event "pageshow" for "http://web-platform.test:8000/svg/shapes/rect-01-ref.html""

Is also all expected behavior.

So I believe there is something else for the reftest runner, which prevents the SVG to show.
I expect it's the flags we pass when taking the screenshot that prevent us rendering the SVG.
You need to log in before you can comment on or make changes to this bug.