Bug 60268 - Calling LayoutTestController.dumpAsText() once makes it impossible to have a tree dump later
Summary: Calling LayoutTestController.dumpAsText() once makes it impossible to have a ...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-05 08:30 PDT by Philippe Normand
Modified: 2011-05-12 01:19 PDT (History)
4 users (show)

See Also:


Attachments
proposed patch (3.07 KB, patch)
2011-05-05 08:45 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
proposed patch (5.16 KB, patch)
2011-05-05 09:09 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
proposed patch (5.22 KB, patch)
2011-05-06 01:27 PDT, Philippe Normand
abarth: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2011-05-05 08:30:38 PDT
My use-case is this:

- include media-file.js
- include video-test.js (=> calls LTC.dumpAsText())
- in my test I want a tree dump

I'm screwed because dumpAsTextCallback() calls controller->setDumpAsText(true) and there's no dumpAsTree() method.

So 2 solutions:

- add dumpAsTree()
- make dumpAsText() take 2 optional arguments, one exists already so the 60 tests using that require a small update

I'll try with first solution ;)
Comment 1 Philippe Normand 2011-05-05 08:45:11 PDT
Created attachment 92421 [details]
proposed patch
Comment 2 Philippe Normand 2011-05-05 09:05:06 PDT
Forgot WKTR change, will send a new patch
Comment 3 Philippe Normand 2011-05-05 09:09:09 PDT
Created attachment 92425 [details]
proposed patch
Comment 4 Philippe Normand 2011-05-06 01:27:59 PDT
Created attachment 92561 [details]
proposed patch
Comment 5 Eric Seidel (no email) 2011-05-11 20:11:06 PDT
I'm confused by this change.  Why do we need this?
Comment 6 Adam Barth 2011-05-11 21:00:34 PDT
Comment on attachment 92561 [details]
proposed patch

I'd just fix the test scripts to not box you into this corner.  We've got 20k tests without needing this feature.  I suspect we don't really need it.
Comment 7 Philippe Normand 2011-05-12 01:16:08 PDT
Ok then... I'll move the function I needed from video-test.js to a dedicated file.