New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 664473 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Support using testharness.js in non-html documents.

Reported by r...@opera.com, Nov 11 2016

Issue description

We currently cannot use testharness.js in non-html documents like SVG because testharnessreport.js relies on document.body.

 

Comment 1 by r...@opera.com, Nov 11 2016

Cc: -mikew@chromium.org mkwst@chromium.org

Comment 2 by mkwst@chromium.org, Nov 11 2016

Cc: pdr@chromium.org
Hrm. I'm not familiar enough with SVG documents to know what options we have, really. It seems like we should be able to render something useful for SVG, though. Perhaps pdr@ has opinions?

Comment 3 by mkwst@chromium.org, Nov 11 2016

Cc: foolip@chromium.org
Components: Blink>SVG
Labels: Test-Layout

Comment 4 by f...@opera.com, Nov 11 2016

Maybe it'd work to create a <foreignObject> (append to documentElement and set x=y=0 and width=height=100%) in the relevant case in Output.resolve_log (!document.body) and then set that as the output_node. (Looks like the filtering code might still barf on that though...) Another option might be something more like the worker setup (i.e <iframe> and then transfer results to parent doc.)

I suspect that's of fairly limited use though.

Comment 5 by r...@opera.com, Nov 11 2016

I've actually been playing around with the foreignObject idea ...
Status: Available (was: Untriaged)
rune@, go ahead and own this if you expect to commit something.

Comment 7 by sashab@chromium.org, Nov 14 2016

I actually asked rune to open this because he had to commit a -expected.txt file for a test that uses SVGs. I said to file a bug and see if anyone knows a way around this, and check if there was anyone working on fixing it.

Comment 8 by r...@opera.com, Nov 14 2016

I ran into timeout issues with the experiment I did. If I pick it up again, I'll assign.

Labels: -OS-All
Summary: Support using testharness.js in non-html documents. (was: Support using testharness in non-html documents)
Labels: -Type-Bug Type-Feature
Hey, looking again at testharnessreport.js, it looks like maybe document.body is not assumed, and there is some code that has been put there specifically for the case where the document is SVG? https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/resources/testharnessreport.js?l=246

rune@, do you know if this is fixed, and if not, what might need to be done?
Cc: tkent@chromium.org
It looks like this was probably fixed by https://codereview.chromium.org/2741403002 - tkent@, do you think this should be considered fixed?
Owner: tkent@chromium.org
Status: Fixed (was: Available)
Yeah, it seems I fixed this :)

Comment 13 by r...@opera.com, Jun 2 2017

\o/

Sign in to add a comment