Index: LayoutTests/inspector/timeline/tracing/tracing-timeline-load.html |
diff --git a/LayoutTests/inspector/timeline/tracing/tracing-timeline-load.html b/LayoutTests/inspector/timeline/tracing/tracing-timeline-load.html |
deleted file mode 100644 |
index 156298e72b598e63ca0ea936a39b542126455ac0..0000000000000000000000000000000000000000 |
--- a/LayoutTests/inspector/timeline/tracing/tracing-timeline-load.html |
+++ /dev/null |
@@ -1,124 +0,0 @@ |
-<html> |
-<head> |
-<script src="../../../http/tests/inspector/inspector-test.js"></script> |
-<script src="../../../http/tests/inspector/timeline-test.js"></script> |
-<script src="../../tracing-test.js"></script> |
-<script> |
- |
-function test() |
-{ |
- function runTestWithDataAndCheck(input, expectedOutput) |
- { |
- var model = InspectorTest.tracingTimelineModel; |
- |
- function createFileReader(file, delegate) |
- { |
- return new InspectorTest.FakeFileReader(input, delegate, model.saveToFile.bind(model)); |
- } |
- |
- function createFileWriter() |
- { |
- return new InspectorTest.StringOutputStream(checkSaveData); |
- } |
- |
- function checkSaveData(output) |
- { |
- var saveData = JSON.parse(output); |
- InspectorTest.assertEquals(JSON.stringify(expectedOutput), JSON.stringify(saveData), "saved data is not equal to restored"); |
- } |
- |
- InspectorTest.override(model, "_createFileReader", createFileReader); |
- InspectorTest.override(model, "_createFileWriter", createFileWriter); |
- |
- model.loadFromFile({}, new WebInspector.Progress()); |
- } |
- |
- function runTestOnMalformedInput(input) |
- { |
- InspectorTest.tracingModel.reset(); |
- var model = InspectorTest.tracingTimelineModel; |
- model.reset(); |
- function createFileReader(file, delegate) |
- { |
- return new InspectorTest.FakeFileReader(input, delegate, checkLoadedData); |
- } |
- |
- function checkLoadedData(data) |
- { |
- InspectorTest.assertTrue(model.isEmpty()); |
- } |
- |
- InspectorTest.override(model, "_createFileReader", createFileReader); |
- model.loadFromFile({}, new WebInspector.Progress()); |
- } |
- |
- InspectorTest.runTestSuite([ |
- function testNormal(next) |
- { |
- var data = [{"args":{"number":32},"cat":"__metadata","name":"num_cpus","ph":"M","pid":32127,"tid":0,"ts":0}, |
- {"args":{"sort_index":-5},"cat":"__metadata","name":"process_sort_index","ph":"M","pid":32127,"tid":12,"ts":0}, |
- {"args":{"name":"Renderer"},"cat":"__metadata","name":"process_name","ph":"M","pid":32127,"tid":12,"ts":0}, |
- {"args":{"sort_index":-1},"cat":"__metadata","name":"thread_sort_index","ph":"M","pid":32127,"tid":11,"ts":0}, |
- {"args":{},"cat":"disabled-by-default-devtools.timeline","name":"Program","ph":"B","pid":32120,"tid":9,"ts":95904702436,"tts":1161841}, |
- {"args":{"number":32},"cat":"__metadata","name":"num_cpus","ph":"M","pid":32120,"tid":0,"ts":0}, |
- {"args":{"sort_index":-5},"cat":"__metadata","name":"process_sort_index","ph":"M","pid":32120,"tid":10,"ts":0}, |
- {"args":{"name":"Renderer"},"cat":"__metadata","name":"process_name","ph":"M","pid":32120,"tid":10,"ts":0}, |
- {"args":{"sort_index":-1},"cat":"__metadata","name":"thread_sort_index","ph":"M","pid":32120,"tid":9,"ts":0}, |
- {"args":{"name":"CrRendererMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":32120,"tid":9,"ts":0}, |
- {"args":{"data":{"frame":"0x1cfa1f6a4000","scriptId":"52","scriptLine":664,"scriptName":"http://example.com/foo.js"}},"cat":"disabled-by-default-devtools.timeline","dur":21,"name":"FunctionCall","ph":"X","pid":32169,"tdur":20,"tid":35,"ts":95904848776,"tts":2613659}, |
- {"args":{"stack":[]},"cat":"disabled-by-default-devtools.timeline.stack","name":"CallStack","ph":"I","pid":32169,"s":"g","tid":35,"ts":95904848783,"tts":2613665}, |
- {"args":{"data":{"frame":"0x1cfa1f6a4000","scriptId":"52","scriptLine":664,"scriptName":"http://example.com/foo.js"}},"cat":"disabled-by-default-devtools.timeline","dur":20,"name":"FunctionCall","ph":"X","pid":32169,"tdur":18,"tid":35,"ts":95904848821,"tts":2613704}, |
- {"args":{"stack":[]},"cat":"disabled-by-default-devtools.timeline.stack","name":"CallStack","ph":"I","pid":32169,"s":"g","tid":35,"ts":95904848827,"tts":2613710}, |
- {"args":{"data":{"frame":"0x1cfa1f6a4000","scriptId":"52","scriptLine":664,"scriptName":"http://example.com/foo.js"}},"cat":"disabled-by-default-devtools.timeline","dur":19,"name":"FunctionCall","ph":"X","pid":32169,"tdur":18,"tid":35,"ts":95904848866,"tts":2613749}, |
- {"args":{"stack":[]},"cat":"disabled-by-default-devtools.timeline.stack","name":"CallStack","ph":"I","pid":32169,"s":"g","tid":35,"ts":95904848872,"tts":2613755}, |
- {"args":{"data":{"frame":"0x1cfa1f6a4000","scriptId":"52","scriptLine":664,"scriptName":"http://example.com/foo.js"}},"cat":"disabled-by-default-devtools.timeline","dur":19,"name":"FunctionCall","ph":"X","pid":32169,"tdur":19,"tid":35,"ts":95904848909,"tts":2613791}, |
- {"args":{"stack":[]},"cat":"disabled-by-default-devtools.timeline.stack","name":"CallStack","ph":"I","pid":32169,"s":"g","tid":35,"ts":95904848915,"tts":2613797}, |
- {"args":{"data":{"frame":"0x1cfa1f6a4000","scriptId":"52","scriptLine":664,"scriptName":"http://example.com/foo.js"}},"cat":"disabled-by-default-devtools.timeline","dur":21,"name":"FunctionCall","ph":"X","pid":32169,"tdur":19,"tid":35,"ts":95904848954,"tts":2613837}, |
- {"args":{"stack":[]},"cat":"disabled-by-default-devtools.timeline.stack","name":"CallStack","ph":"I","pid":32169,"s":"g","tid":35,"ts":95904848961,"tts":2613843}, |
- {"args":{"sessionId":"26.5"},"cat":"disabled-by-default-devtools.timeline","name":"TracingStartedInPage","ph":"I","pid":32157,"s":"g","tid":26,"ts":95904694459,"tts":1432596}, |
- {"args":{"layerTreeId":1,"sessionId":"26.5"},"cat":"disabled-by-default-devtools.timeline","name":"SetLayerTreeId","ph":"I","pid":32157,"s":"g","tid":26,"ts":95904694693,"tts":1432692}, |
- {"args":{},"cat":"disabled-by-default-devtools.timeline","name":"Program","ph":"E","pid":32157,"tid":26,"ts":95904694731,"tts":1432729}, |
- {"args":{},"cat":"disabled-by-default-devtools.timeline","name":"Program","ph":"B","pid":32157,"tid":26,"ts":95904694789,"tts":1432787}, |
- {"args":{"data":{"type":"beforeunload"}},"cat":"disabled-by-default-devtools.timeline","dur":16,"name":"EventDispatch","ph":"X","pid":32157,"tdur":13,"tid":26,"ts":95904695027,"tts":1433025}, |
- {"args":{"data":{"frame":"0x30acf4ca4000","requestId":"26.422","requestMethod":"GET","url":"http://localhost/bar.html?ws=E16865E8B9D1"}},"cat":"disabled-by-default-devtools.timeline","name":"ResourceSendRequest","ph":"I","pid":32157,"s":"g","tid":26,"ts":95904695434,"tts":1433433}, |
- {"args":{"stack":null},"cat":"disabled-by-default-devtools.timeline.stack","name":"CallStack","ph":"I","pid":32157,"s":"g","tid":26,"ts":95904695455,"tts":1433453}, |
- {"args":{},"cat":"disabled-by-default-devtools.timeline","name":"Program","ph":"E","pid":32157,"tid":26,"ts":95904695551,"tts":1433549}, |
- {"args":{},"cat":"disabled-by-default-devtools.timeline","name":"Program","ph":"B","pid":32157,"tid":26,"ts":95904696695,"tts":1433692}, |
- {"args":{},"cat":"disabled-by-default-devtools.timeline","name":"Program","ph":"E","pid":32157,"tid":26,"ts":95904696737,"tts":1433733}, |
- {"args":{"data":{"frame":"0x30acf4ca4000","mimeType":"text/html","requestId":"26.422","statusCode":200}},"cat":"disabled-by-default-devtools.timeline","name":"ResourceReceiveResponse","ph":"I","pid":32157,"s":"g","tid":26,"ts":95904699823,"tts":1433961}, |
- {"args":{"data":{"frame":"0x30acf4ca4000","identifier":406}},"cat":"disabled-by-default-devtools.timeline","name":"WebSocketDestroy","ph":"I","pid":32157,"s":"g","tid":26,"ts":95904701483,"tts":1435612}, |
- {"args":{"stack":null},"cat":"disabled-by-default-devtools.timeline.stack","name":"CallStack","ph":"I","pid":32157,"s":"g","tid":26,"ts":95904701489,"tts":1435618}, |
- {"args":{"number":32},"cat":"__metadata","name":"num_cpus","ph":"M","pid":32072,"tid":0,"ts":0}, |
- {"args":{"sort_index":-6},"cat":"__metadata","name":"process_sort_index","ph":"M","pid":32072,"tid":32096,"ts":0}, |
- {"args":{"name":"Browser"},"cat":"__metadata","name":"process_name","ph":"M","pid":32072,"tid":32096,"ts":0}, |
- {"args":{"name":"CrBrowserMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":32072,"tid":32072,"ts":0} |
- ]; |
- var input = JSON.stringify(data); |
- runTestWithDataAndCheck(input, data); |
- next(); |
- }, |
- |
- function testBroken(next) |
- { |
- var data = [{"args":{"number":32},"cat":"__metadata","name":"num_cpus","ph":"M","pid":32127,"tid":0,"ts":0,"t\"y}p}e\\":"UnknownRecordType"}]; |
- runTestOnMalformedInput(JSON.stringify(data)); |
- next(); |
- }, |
- |
- function testMalformedJSON(next) |
- { |
- runTestOnMalformedInput("]"); |
- next(); |
- } |
- ]); |
-} |
- |
-</script> |
-</head> |
- |
-<body onload="runTest()"> |
-<p> |
-Tests tracing based Timeline save/load functionality. |
-</p> |
-</body> |
-</html> |