Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Unified Diff: third_party/WebKit/LayoutTests/inspector/tracing/tracing-timeline-load.html

Issue 1755123003: Timeline: quit using Progress, introduce TimelineLifecycleDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector/tracing/tracing-timeline-load.html
diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/tracing-timeline-load.html b/third_party/WebKit/LayoutTests/inspector/tracing/tracing-timeline-load.html
index 5739094504eafd4060fd88ed637f4e4d03e8859d..9cc7c3ed115fcc5a618edc31f5af3662de2b017e 100644
--- a/third_party/WebKit/LayoutTests/inspector/tracing/tracing-timeline-load.html
+++ b/third_party/WebKit/LayoutTests/inspector/tracing/tracing-timeline-load.html
@@ -9,8 +9,7 @@ function test()
{
function runTestWithDataAndCheck(input, expectedOutput, callback)
{
- InspectorTest.tracingModel().reset();
- var model = InspectorTest.tracingTimelineModel();
+ var model = InspectorTest.tracingModel();
model.reset();
var timeline = WebInspector.panels.timeline;
@@ -27,18 +26,20 @@ function test()
}
InspectorTest.override(WebInspector.TimelineLoader, "_createFileReader", createFileReader);
- WebInspector.TimelineLoader.loadFromFile(model, {}, new WebInspector.Progress());
+ WebInspector.TimelineLoader.loadFromFile(model, {}, new WebInspector.TimelineLifecycleDelegate());
alph 2016/03/02 21:03:12 Don't you want to test how the delegate is working
+ model.tracingComplete();
+ var saver = new WebInspector.TracingTimelineSaver();
var stream = new InspectorTest.StringOutputStream(InspectorTest.safeWrap(checkSaveData));
- var saver = new WebInspector.TracingTimelineSaver(stream);
var storage = timeline._tracingModelBackingStorage;
stream.open("", storage.writeToStream.bind(storage, stream, saver));
}
function runTestOnMalformedInput(input, callback)
{
- InspectorTest.tracingModel().reset();
- var model = InspectorTest.tracingTimelineModel();
+ var model = InspectorTest.tracingModel();
+ var timeline = WebInspector.panels.timeline;
+
model.reset();
function createFileReader(file, delegate)
@@ -48,12 +49,12 @@ function test()
function checkLoadedData(data)
{
- InspectorTest.addResult("Model is empty: " + model.isEmpty());
+ InspectorTest.addResult("Model is empty: " + (!model.minimumRecordTime() && !model.maximumRecordTime()));
alph 2016/03/02 21:03:12 why?
callback();
}
InspectorTest.override(WebInspector.TimelineLoader, "_createFileReader", createFileReader);
- WebInspector.TimelineLoader.loadFromFile(model, {}, new WebInspector.Progress());
+ timeline._loadFromFile({});
}
var data = [{"args":{"number":32},"cat":"__metadata","name":"num_cpus","ph":"M","pid":32127,"tid":0,"ts":0},

Powered by Google App Engine
This is Rietveld 408576698