paulirish / devtools-timeline-model

Unsupported
Other
173 stars 35 forks source link

Add support for trace files from WebPagetest #8

Closed jfsiii closed 8 years ago

jfsiii commented 8 years ago

WebPagetest trace files are in the form {traceEvents: Array<Object>} (e.g. this trace file from this test run), while WebInspector.TracingModel.prototype.addEvents expects Array<Object>.

If traceEvents key is present, pass the value (array of objects) instead of the entire object.

See traceEvents added & removed throughout WPT here

Glad to add a fixture for WPT trace file and ensure it passes existing tests. Could also add a check like if (!Array.isArray(events)) throw Error('events must be an array')

paulirish commented 8 years ago

Glad to add a fixture for WPT trace file and ensure it passes existing tests.

Yeah lets do that. The assertions can be super basic, but would like to make sure it parses something.

paulirish commented 8 years ago

Landing this now. We can do the test in a separate PR