Index: LayoutTests/inspector/timeline/timeline-coalescing.html |
diff --git a/LayoutTests/inspector/timeline/timeline-coalescing.html b/LayoutTests/inspector/timeline/timeline-coalescing.html |
deleted file mode 100644 |
index 5788ff8b8ba02b9c993e1fe5b988d411eb600cca..0000000000000000000000000000000000000000 |
--- a/LayoutTests/inspector/timeline/timeline-coalescing.html |
+++ /dev/null |
@@ -1,113 +0,0 @@ |
-<html> |
-<head> |
-<script src="../../http/tests/inspector/inspector-test.js"></script> |
-<script src="../../http/tests/inspector/timeline-test.js"></script> |
-<script> |
- |
-function initialize_TimelineCoalescing() |
-{ |
- |
-InspectorTest.dumpStats = function(presentationRecord) |
-{ |
- if (!presentationRecord.presentationParent()) |
- return ""; |
- |
- var aggregatedStats = {}; |
- var uiUtils = WebInspector.panels.timeline._uiUtils; |
- if (presentationRecord.coalesced()) { |
- var presentationChildren = presentationRecord.presentationChildren(); |
- for (var i = 0; i < presentationChildren.length; ++i) |
- uiUtils.aggregateTimeForRecord(aggregatedStats, presentationChildren[i].record()); |
- } else { |
- uiUtils.aggregateTimeForRecord(aggregatedStats, presentationRecord.record()); |
- } |
- |
- var timeByCategory = ""; |
- |
- for (category in aggregatedStats) { |
- if (timeByCategory) |
- timeByCategory += ", "; |
- timeByCategory += category + ": " + aggregatedStats[category].toFixed(5); |
- } |
- var duration = (presentationRecord.endTime() - presentationRecord.startTime()).toFixed(5); |
- var durationTillLastChild = (presentationRecord.endTime() - presentationRecord.startTime()).toFixed(5); |
- return "duration: " + duration + ":" + durationTillLastChild + (timeByCategory ? " (" + timeByCategory + ")" : ""); |
-} |
- |
-} |
- |
-function test() |
-{ |
- var records = [ |
- // Assure we coalesce records with sort interval and don't coalesce records that stand apart. |
- {"startTime": 1000.000,"data":{},"endTime":1099.999,"type":"Program","children":[ |
- {"startTime":1000.001, "endTime":1099.9,"type":"Layout","frameId":"2","data":{}, |
- "stackTrace": [ |
- {"functionName":"func","url":"http://example.com","lineNumber":42,"columnNumber":1} |
- ]} |
- ]}, |
- {"startTime":1100.000,"data":{},"endTime":1199.999,"type":"Program","children":[ |
- {"startTime":1100.001, "endTime":1199.9,"type":"Layout","frameId":"2","data":{}} |
- ]}, |
- {"startTime":1200.000,"data":{},"endTime":1299.999,"type":"Program","children":[ |
- {"startTime":1200.001, "endTime":1299.9,"type":"Layout","frameId":"2","data":{}} |
- ]}, |
- {"startTime":1300.000,"data":{},"endTime":1399.999,"type":"Program","children":[ |
- {"startTime":1305.001, "endTime":1399.9,"type":"Layout","frameId":"2","data":{}} |
- ]}, |
- |
- // Assure we do coalesce on levels lower than root, but do not coalesce between different parents. |
- {"startTime":2000.000,"data":{},"endTime":2399.999,"type":"Program","children":[ |
- {"startTime":2000.001,"data":{},"endTime":2199.998,"type":"FunctionCall","children":[ |
- {"startTime":2000.002, "endTime":2099.9,"type":"DecodeImage","frameId":"2","data":{}}, |
- {"startTime":2100.000, "endTime":2199.9,"type":"DecodeImage","frameId":"2","data":{}} |
- ]}, |
- {"startTime":2200.001,"data":{},"endTime":2399.998,"type":"FunctionCall","children":[ |
- {"startTime":2200.002, "endTime":2299.9,"type":"DecodeImage","frameId":"2","data":{}}, |
- {"startTime":2300.000, "endTime":2399.9,"type":"DecodeImage","frameId":"2","data":{}} |
- ]}, |
- ]}, |
- |
- // Assure we only coalesce timestamp records with the same message. |
- {"startTime":3100.000,"data":{},"endTime":3199.999,"type":"Program","children":[ |
- {"startTime":3100.001, "endTime":3199.9,"type":"Rasterize","frameId":"2","data":{ message: "foo" }} |
- ]}, |
- {"startTime":3200.000,"data":{},"endTime":3299.999,"type":"Program","children":[ |
- {"startTime":3200.001, "endTime":3299.9,"type":"Rasterize","frameId":"2","data":{ message: "foo" }} |
- ]}, |
- {"startTime":3300.000,"data":{},"endTime":3399.999,"type":"Program","children":[ |
- {"startTime":3300.001, "endTime":3399.9,"type":"Rasterize","frameId":"2","data":{ message: "bar" }} |
- ]}, |
- |
- // Assure we only coalesce event records with the same type. |
- {"startTime":4100.000,"data":{},"endTime":4199.999,"type":"Program","children":[ |
- {"startTime":4100.001, "endTime":4199.9,"type":"Paint","frameId":"2","data":{ type: "mouseover" }} |
- ]}, |
- {"startTime":4200.000,"data":{},"endTime":4299.999,"type":"Program","children":[ |
- {"startTime":4200.001, "endTime":4299.9,"type":"Paint","frameId":"2","data":{ type: "mouseover" }} |
- ]}, |
- {"startTime":4300.000,"data":{},"endTime":4399.999,"type":"Program","children":[ |
- {"startTime":4300.001, "endTime":4399.9,"type":"Paint","frameId":"2","data":{ type: "keydown" }} |
- ]} |
- ]; |
- |
- InspectorTest.loadTimelineRecords(records); |
- |
- var rootRecord = InspectorTest.timelinePresentationModel().rootRecord(); |
- InspectorTest.dumpPresentationRecord(rootRecord, InspectorTest.dumpStats); |
- var coalesced = rootRecord.presentationChildren()[0]; |
- InspectorTest.addResult("coalesced record's hasWarnings(): " + coalesced.hasWarnings()); |
- InspectorTest.addResult("coalesced record's childHasWarnings(): " + coalesced.childHasWarnings()); |
- InspectorTest.completeTest(); |
-} |
- |
-</script> |
-</head> |
- |
-<body onload="runTest()"> |
-<p> |
-Test timeline records coalescing |
-</p> |
- |
-</body> |
-</html> |