Changeset 250872 in webkit
- Timestamp:
- Oct 8, 2019 4:03:02 PM (5 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r250866 r250872 1 2019-10-08 Yury Semikhatsky <yurys@chromium.org> 2 3 Web Inspector: inspector/layers/layers-for-node.html and inspector/timeline/line-column.html are flaky 4 https://bugs.webkit.org/show_bug.cgi?id=202649 5 6 Reviewed by Devin Rousso. 7 8 Unflake a couple of inspector protocol tests. r250655 replaced Timer-based queue 9 with RunLoop-based one for inspector message dispatching. The tests apparently relied 10 on the timing of the message delivery and had been less flaky before. Updated the tests 11 to wait for explicit signals rather than relying on event timing. 12 13 * inspector/layers/layers-for-node-expected.txt: 14 * inspector/layers/layers-for-node.html: Updated the test to wait for the first 15 LayerTree.layerTreeDidChange event before requesting initial layer tree. 16 17 Also after adding a node wait for next RAF to avoid flakiness. 18 19 * inspector/timeline/line-column-expected.txt: 20 * inspector/timeline/line-column.html: There a style recalc event 21 which appears intermittently in the recorded profile making the test 22 flaky. To avoid that dump only events that are always present. 23 1 24 2019-10-08 Kate Cheney <katherine_cheney@apple.com> 2 25 -
trunk/LayoutTests/inspector/layers/layers-for-node-expected.txt
r188142 r250872 127 127 PASS 128 128 129 === Wait for requestAnimationFrame === 130 131 PASS 132 129 133 === Get the modified layer tree === 130 134 -
trunk/LayoutTests/inspector/layers/layers-for-node.html
r210062 r250872 10 10 element.id = "last-element"; 11 11 document.body.appendChild(element); 12 return new Promise(resolve => requestAnimationFrame(resolve)); 12 13 }; 13 14 14 15 function test() 15 16 { 16 var documentNode; 17 var initialLayers; 18 var eventsCount = 0; 19 20 InspectorProtocol.eventHandler["LayerTree.layerTreeDidChange"] = function (messageObject) { 21 eventsCount++; 22 }; 23 24 enableLayerTreeAgent(); 25 26 function enableLayerTreeAgent(result) 27 { 28 step({ 29 name: "Enable the LayerTree agent", 30 command: "LayerTree.enable", 31 parameters: {}, 32 callback: getDocument 33 }); 34 }; 35 36 function getDocument(result) 17 let documentNode; 18 let initialLayers; 19 20 step({ 21 name: "Enable the LayerTree agent", 22 command: "LayerTree.enable", 23 parameters: {}, 24 callback: () => {} 25 }); 26 27 InspectorProtocol.awaitEvent({event: "LayerTree.layerTreeDidChange"}).then(getDocument); 28 29 function getDocument() 37 30 { 38 31 step({ … … 65 58 command: "Runtime.evaluate", 66 59 parameters: {"expression": "addCompositedLayer()"}, 60 callback: awaitRequestAnimationFrame 61 }); 62 }; 63 64 function awaitRequestAnimationFrame(result) 65 { 66 step({ 67 name: "Wait for requestAnimationFrame", 68 command: "Runtime.awaitPromise", 69 parameters: {"promiseObjectId": result.result.objectId}, 67 70 callback: getModifiedLayerTree 68 71 }); … … 107 110 function finishTest() 108 111 { 109 if (!eventsCount) 110 ProtocolTest.log("FAIL: Did not receive layerTreeDidChange events."); 111 else 112 ProtocolTest.log("\n=== Test complete, all expected conditions met ==="); 113 112 ProtocolTest.log("\n=== Test complete, all expected conditions met ==="); 114 113 ProtocolTest.completeTest(); 115 114 }; -
trunk/LayoutTests/inspector/timeline/line-column-expected.txt
r249445 r250872 11 11 "data": {}, 12 12 "children": [ 13 {14 "startTime": "<filtered>",15 "stackTrace": [16 {17 "functionName": "click",18 "url": "[native code]",19 "scriptId": "<filtered>",20 "lineNumber": 0,21 "columnNumber": 022 },23 {24 "functionName": "willCallFunctionTest",25 "url": "timeline/line-column.html",26 "scriptId": "<filtered>",27 "lineNumber": 26,28 "columnNumber": 4429 },30 {31 "functionName": "global code",32 "url": "",33 "scriptId": "<filtered>",34 "lineNumber": 1,35 "columnNumber": 2136 },37 {38 "functionName": "evaluateWithScopeExtension",39 "url": "[native code]",40 "scriptId": "<filtered>",41 "lineNumber": 0,42 "columnNumber": 043 },44 {45 "functionName": "",46 "url": "",47 "scriptId": "<filtered>",48 "lineNumber": 140,49 "columnNumber": 9750 }51 ],52 "data": {},53 "frameId": "<filtered>",54 "type": "ScheduleStyleRecalculation"55 },56 13 { 57 14 "startTime": "<filtered>", -
trunk/LayoutTests/inspector/timeline/line-column.html
r248943 r250872 41 41 InspectorProtocol.sendCommand("Timeline.enable"); 42 42 43 // To avoid flakiness print only events that we always expect. 44 const eventWhitelist = new Set(["RenderingFrame", "ConsoleProfile", "EventDispatch", "FunctionCall"]); 43 45 function replacer(key, value) { 46 if (key === "children" && this.startTime) 47 return value.filter(e => eventWhitelist.has(e.type)); 44 48 if (key === "startTime" || key === "endTime" || key === "scriptId" || key === "frameId") 45 49 return "<filtered>";
Note: See TracChangeset
for help on using the changeset viewer.