Changeset 246016 in webkit
- Timestamp:
- Jun 1, 2019, 2:37:49 PM (7 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 31 added
- 1 deleted
- 7 edited
- 7 moved
-
ChangeLog (modified) (1 diff)
-
TestExpectations (modified) (1 diff)
-
inspector/canvas/console-record-2d-expected.txt (added)
-
inspector/canvas/console-record-2d.html (added)
-
inspector/canvas/console-record-bitmaprenderer-expected.txt (added)
-
inspector/canvas/console-record-bitmaprenderer.html (added)
-
inspector/canvas/console-record-webgl-expected.txt (added)
-
inspector/canvas/console-record-webgl.html (added)
-
inspector/canvas/console-record-webgl2-expected.txt (added)
-
inspector/canvas/console-record-webgl2.html (added)
-
inspector/canvas/recording-2d-frameCount-expected.txt (added)
-
inspector/canvas/recording-2d-frameCount.html (added)
-
inspector/canvas/recording-2d-full-expected.txt (moved) (moved from trunk/LayoutTests/inspector/canvas/recording-2d-expected.txt ) (2 diffs)
-
inspector/canvas/recording-2d-full.html (added)
-
inspector/canvas/recording-2d-memoryLimit-expected.txt (added)
-
inspector/canvas/recording-2d-memoryLimit.html (added)
-
inspector/canvas/recording-2d-saves-expected.txt (added)
-
inspector/canvas/recording-2d-saves.html (added)
-
inspector/canvas/recording-bitmaprenderer-expected.txt (deleted)
-
inspector/canvas/recording-bitmaprenderer-frameCount-expected.txt (added)
-
inspector/canvas/recording-bitmaprenderer-frameCount.html (added)
-
inspector/canvas/recording-bitmaprenderer-full-expected.txt (added)
-
inspector/canvas/recording-bitmaprenderer-full.html (added)
-
inspector/canvas/recording-bitmaprenderer-memoryLimit-expected.txt (added)
-
inspector/canvas/recording-bitmaprenderer-memoryLimit.html (added)
-
inspector/canvas/recording-expected.txt (modified) (2 diffs)
-
inspector/canvas/recording-webgl-frameCount-expected.txt (added)
-
inspector/canvas/recording-webgl-frameCount.html (added)
-
inspector/canvas/recording-webgl-full-expected.txt (moved) (moved from trunk/LayoutTests/inspector/canvas/recording-webgl-expected.txt ) (2 diffs)
-
inspector/canvas/recording-webgl-full.html (added)
-
inspector/canvas/recording-webgl-memoryLimit-expected.txt (added)
-
inspector/canvas/recording-webgl-memoryLimit.html (added)
-
inspector/canvas/recording-webgl2-frameCount-expected.txt (added)
-
inspector/canvas/recording-webgl2-frameCount.html (added)
-
inspector/canvas/recording-webgl2-full-expected.txt (moved) (moved from trunk/LayoutTests/inspector/canvas/recording-webgl2-expected.txt ) (2 diffs)
-
inspector/canvas/recording-webgl2-full.html (added)
-
inspector/canvas/recording-webgl2-memoryLimit-expected.txt (added)
-
inspector/canvas/recording-webgl2-memoryLimit.html (added)
-
inspector/canvas/recording.html (modified) (5 diffs)
-
inspector/canvas/resources/recording-2d.js (moved) (moved from trunk/LayoutTests/inspector/canvas/recording-2d.html ) (2 diffs)
-
inspector/canvas/resources/recording-bitmaprenderer.js (moved) (moved from trunk/LayoutTests/inspector/canvas/recording-bitmaprenderer.html ) (2 diffs)
-
inspector/canvas/resources/recording-webgl.js (moved) (moved from trunk/LayoutTests/inspector/canvas/recording-webgl.html ) (2 diffs)
-
inspector/canvas/resources/recording-webgl2.js (moved) (moved from trunk/LayoutTests/inspector/canvas/recording-webgl2.html ) (2 diffs)
-
platform/gtk/TestExpectations (modified) (3 diffs)
-
platform/mac/TestExpectations (modified) (1 diff)
-
platform/win/TestExpectations (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r246015 r246016 1 2019-06-01 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Canvas: split recording tests into separate files so they don't timeout 4 https://bugs.webkit.org/show_bug.cgi?id=198459 5 <rdar://problem/51332026> 6 7 Reviewed by Joseph Pecoraro. 8 9 * inspector/canvas/recording.html: 10 * inspector/canvas/recording-expected.txt: 11 12 * inspector/canvas/recording-2d.html: Removed. 13 * inspector/canvas/recording-2d-expected.txt: Removed. 14 * inspector/canvas/console-record-2d.html: Added. 15 * inspector/canvas/console-record-2d-expected.txt: Added. 16 * inspector/canvas/recording-2d-frameCount.html: Added. 17 * inspector/canvas/recording-2d-frameCount-expected.txt: Added. 18 * inspector/canvas/recording-2d-full.html: Added. 19 * inspector/canvas/recording-2d-full-expected.txt: Added. 20 * inspector/canvas/recording-2d-memoryLimit.html: Added. 21 * inspector/canvas/recording-2d-memoryLimit-expected.txt: Added. 22 * inspector/canvas/recording-2d-saves.html: Added. 23 * inspector/canvas/recording-2d-saves-expected.txt: Added. 24 * inspector/canvas/resources/recording-2d.js: Added. 25 26 * inspector/canvas/recording-bitmaprenderer.html: Removed. 27 * inspector/canvas/recording-bitmaprenderer-expected.txt: Removed. 28 * inspector/canvas/console-record-bitmaprenderer.html: Added. 29 * inspector/canvas/console-record-bitmaprenderer-expected.txt: Added. 30 * inspector/canvas/recording-bitmaprenderer-frameCount.html: Added. 31 * inspector/canvas/recording-bitmaprenderer-frameCount-expected.txt: Added. 32 * inspector/canvas/recording-bitmaprenderer-full.html: Added. 33 * inspector/canvas/recording-bitmaprenderer-full-expected.txt: Added. 34 * inspector/canvas/recording-bitmaprenderer-memoryLimit.html: Added. 35 * inspector/canvas/recording-bitmaprenderer-memoryLimit-expected.txt: Added. 36 * inspector/canvas/resources/recording-bitmaprenderer.js: Added. 37 38 * inspector/canvas/recording-webgl.html: Removed. 39 * inspector/canvas/recording-webgl-expected.txt: Removed. 40 * inspector/canvas/console-record-webgl.html: Added. 41 * inspector/canvas/console-record-webgl-expected.txt: Added. 42 * inspector/canvas/recording-webgl-frameCount.html: Added. 43 * inspector/canvas/recording-webgl-frameCount-expected.txt: Added. 44 * inspector/canvas/recording-webgl-full.html: Added. 45 * inspector/canvas/recording-webgl-full-expected.txt: Added. 46 * inspector/canvas/recording-webgl-memoryLimit.html: Added. 47 * inspector/canvas/recording-webgl-memoryLimit-expected.txt: Added. 48 * inspector/canvas/resources/recording-webgl.js: Added. 49 50 * inspector/canvas/recording-webgl2.html: Removed. 51 * inspector/canvas/recording-webgl2-expected.txt: Removed. 52 * inspector/canvas/console-record-webgl2.html: Added. 53 * inspector/canvas/console-record-webgl2-expected.txt: Added. 54 * inspector/canvas/recording-webgl2-frameCount.html: Added. 55 * inspector/canvas/recording-webgl2-frameCount-expected.txt: Added. 56 * inspector/canvas/recording-webgl2-full.html: Added. 57 * inspector/canvas/recording-webgl2-full-expected.txt: Added. 58 * inspector/canvas/recording-webgl2-memoryLimit.html: Added. 59 * inspector/canvas/recording-webgl2-memoryLimit-expected.txt: Added. 60 * inspector/canvas/resources/recording-webgl2.js: Added. 61 62 * TestExpectations: 63 * platform/gtk/TestExpectations: 64 * platform/mac/TestExpectations: 65 * platform/win/TestExpectations: 66 1 67 2019-06-01 Devin Rousso <drousso@apple.com> 2 68 -
trunk/LayoutTests/TestExpectations
r245900 r246016 538 538 # This test is fast enough in release but quite slow in debug builds. 539 539 [ Debug ] inspector/debugger/debugger-stack-overflow.html [ Skip ] 540 [ Debug ] inspector/canvas/recording-2d.html [ Slow ]541 [ Debug ] inspector/canvas/recording-webgl.html [ Slow ]542 [ Debug ] inspector/canvas/recording-webgl2.html [ Slow ]543 540 544 541 # Debugger stepping tests can timeout if they run slowly due to a short timer scheduled in the frontend. -
trunk/LayoutTests/inspector/canvas/recording-2d-full-expected.txt
r246015 r246016 3 3 4 4 == Running test suite: Canvas.recording2D 5 -- Running test case: Canvas.recording2D.singleFrame6 initialState:7 attributes:8 width: 29 height: 210 current state:11 setTransform: [[1,0,0,1,0,0]]12 globalAlpha: 113 globalCompositeOperation: "source-over"14 lineWidth: 115 lineCap: "butt"16 lineJoin: "miter"17 miterLimit: 1018 shadowOffsetX: 019 shadowOffsetY: 020 shadowBlur: 021 shadowColor: "rgba(0, 0, 0, 0)"22 setLineDash: [[]]23 lineDashOffset: 024 font: "10px sans-serif"25 textAlign: "start"26 textBaseline: "alphabetic"27 direction: "ltr"28 strokeStyle: "#000000"29 fillStyle: "#000000"30 imageSmoothingEnabled: true31 imageSmoothingQuality: "low"32 setPath: [""]33 parameters:34 content: <filtered>35 frames:36 0: (duration)37 0: arc(1, 2, 3, 4, 5, false)38 swizzleTypes: [Number, Number, Number, Number, Number, Boolean]39 trace:40 0: arc41 1: (anonymous function)42 2: ignoreException43 3: (anonymous function)44 4: executeFrameFunction45 5: performActions46 6: Global Code47 7: evaluateWithScopeExtension48 8: (anonymous function)49 9: _wrapCall50 1: arc(6, 7, 8, 9, 10, true)51 swizzleTypes: [Number, Number, Number, Number, Number, Boolean]52 trace:53 0: arc54 1: (anonymous function)55 2: ignoreException56 3: (anonymous function)57 4: executeFrameFunction58 5: performActions59 6: Global Code60 7: evaluateWithScopeExtension61 8: (anonymous function)62 9: _wrapCall63 64 5 -- Running test case: Canvas.recording2D.multipleFrames 65 6 initialState: … … 1089 1030 1: executeFrameFunction 1090 1031 1091 -- Running test case: Canvas.recording2D.memoryLimit1092 initialState:1093 attributes:1094 width: 21095 height: 21096 current state:1097 setTransform: [[1,0,0,1,0,0]]1098 globalAlpha: 11099 globalCompositeOperation: "source-over"1100 lineWidth: 11101 lineCap: "butt"1102 lineJoin: "miter"1103 miterLimit: 101104 shadowOffsetX: 01105 shadowOffsetY: 01106 shadowBlur: 01107 shadowColor: "rgba(0, 0, 0, 0)"1108 setLineDash: [[]]1109 lineDashOffset: 01110 font: "10px sans-serif"1111 textAlign: "start"1112 textBaseline: "alphabetic"1113 direction: "ltr"1114 strokeStyle: "#000000"1115 fillStyle: "#000000"1116 imageSmoothingEnabled: true1117 imageSmoothingQuality: "low"1118 setPath: [""]1119 parameters:1120 content: <filtered>1121 frames:1122 0: (duration) (incomplete)1123 0: arc(1, 2, 3, 4, 5, false)1124 swizzleTypes: [Number, Number, Number, Number, Number, Boolean]1125 trace:1126 0: arc1127 1: (anonymous function)1128 2: ignoreException1129 3: (anonymous function)1130 4: executeFrameFunction1131 5: performActions1132 6: Global Code1133 7: evaluateWithScopeExtension1134 8: (anonymous function)1135 9: _wrapCall1136 1137 -- Running test case: Canvas.recording2D.Console1138 PASS: The recording should have the name "TEST".1139 PASS: The recording should have one frame.1140 PASS: The first frame should have one action.1141 1142 -- Running test case: Canvas.recording2D.ActionParameterNaN1143 PASS: The recording should have 1 frame.1144 PASS: The first frame should have 1 action.1145 PASS: The action should have 1 parameter.1146 PASS: The parameter should be null.1147 1148 -- Running test case: Canvas.recording2D.ExistingSaves1149 PASS: There should be 4 existing states.1150 PASS: State 0 should match expected fillStyle value.1151 PASS: State 1 should match expected fillStyle value.1152 PASS: State 2 should match expected fillStyle value.1153 PASS: State 3 should match expected fillStyle value.1154 1155 -- Running test case: Canvas.recording2D.NoActions1156 PASS: A recording should have been started and stopped once.1157 PASS: A recording should have been started and stopped twice.1158 -
trunk/LayoutTests/inspector/canvas/recording-expected.txt
r236957 r246016 3 3 4 4 == Running test suite: Canvas.recording 5 -- Running test case: Canvas.multipleRecording 5 -- Running test case: Canvas.ActionParameterNaN 6 PASS: The recording should have 1 frame. 7 PASS: The first frame should have 1 action. 8 PASS: The action should have 1 parameter. 9 PASS: The parameter should be null. 10 11 -- Running test case: Canvas.MultipleRecording 6 12 Starting a recording of canvas 1... 7 13 PASS: Recording started of canvas 1 … … 15 21 PASS: There should be a recording for canvas 2. 16 22 23 -- Running test case: Canvas.NoActions 24 PASS: A recording should have been started and stopped once. 25 PASS: A recording should have been started and stopped twice. 26 17 27 -- Running test case: Canvas.startRecording.InvalidCanvasId 18 28 PASS: Should produce an error. -
trunk/LayoutTests/inspector/canvas/recording-webgl-full-expected.txt
r246015 r246016 3 3 4 4 == Running test suite: Canvas.recordingWebGL 5 -- Running test case: Canvas.recordingWebGL.singleFrame6 initialState:7 attributes:8 width: 29 height: 210 parameters:11 0: {"alpha":true,"depth":true,"stencil":false,"antialias":true,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"failIfMajorPerformanceCaveat":false}12 content: <filtered>13 frames:14 0: (duration)15 0: activeTexture(1)16 swizzleTypes: [Number]17 trace:18 0: activeTexture19 1: (anonymous function)20 2: executeFrameFunction21 3: performActions22 4: Global Code23 5: evaluateWithScopeExtension24 6: (anonymous function)25 7: _wrapCall26 27 5 -- Running test case: Canvas.recordingWebGL.multipleFrames 28 6 initialState: … … 1028 1006 1: executeFrameFunction 1029 1007 1030 -- Running test case: Canvas.recordingWebGL.memoryLimit1031 initialState:1032 attributes:1033 width: 21034 height: 21035 parameters:1036 0: {"alpha":true,"depth":true,"stencil":false,"antialias":true,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"failIfMajorPerformanceCaveat":false}1037 content: <filtered>1038 frames:1039 0: (duration) (incomplete)1040 0: activeTexture(1)1041 swizzleTypes: [Number]1042 trace:1043 0: activeTexture1044 1: (anonymous function)1045 2: executeFrameFunction1046 3: performActions1047 4: Global Code1048 5: evaluateWithScopeExtension1049 6: (anonymous function)1050 7: _wrapCall1051 1052 -- Running test case: Canvas.recordingWebGL.Console1053 PASS: The recording should have the name "TEST".1054 PASS: The recording should have one frame.1055 PASS: The first frame should have one action.1056 -
trunk/LayoutTests/inspector/canvas/recording-webgl2-full-expected.txt
r246015 r246016 3 3 4 4 == Running test suite: Canvas.recordingWebGL2 5 -- Running test case: Canvas.recordingWebGL2.singleFrame6 initialState:7 attributes:8 width: 29 height: 210 parameters:11 0: {"alpha":true,"depth":true,"stencil":false,"antialias":false,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"failIfMajorPerformanceCaveat":false}12 content: <filtered>13 frames:14 0: (duration)15 0: activeTexture(1)16 swizzleTypes: [Number]17 trace:18 0: activeTexture19 1: (anonymous function)20 2: executeFrameFunction21 3: performActions22 4: Global Code23 5: evaluateWithScopeExtension24 6: (anonymous function)25 7: _wrapCall26 27 5 -- Running test case: Canvas.recordingWebGL2.multipleFrames 28 6 initialState: … … 995 973 1: executeFrameFunction 996 974 997 -- Running test case: Canvas.recordingWebGL2.memoryLimit998 initialState:999 attributes:1000 width: 21001 height: 21002 parameters:1003 0: {"alpha":true,"depth":true,"stencil":false,"antialias":false,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"failIfMajorPerformanceCaveat":false}1004 content: <filtered>1005 frames:1006 0: (duration) (incomplete)1007 0: activeTexture(1)1008 swizzleTypes: [Number]1009 trace:1010 0: activeTexture1011 1: (anonymous function)1012 2: executeFrameFunction1013 3: performActions1014 4: Global Code1015 5: evaluateWithScopeExtension1016 6: (anonymous function)1017 7: _wrapCall1018 1019 -- Running test case: Canvas.recordingWebGL2.Console1020 PASS: The recording should have the name "TEST".1021 PASS: The recording should have one frame.1022 PASS: The first frame should have one action.1023 -
trunk/LayoutTests/inspector/canvas/recording.html
r236957 r246016 7 7 let contextB = document.createElement("canvas").getContext("2d"); 8 8 9 function performActions() { 9 function performActionsNaN() { 10 contextA.globalAlpha = NaN; 11 } 12 13 function performActionsMultiple() { 10 14 contextA.fill(); 11 15 contextB.fill(); 12 16 13 TestPage.dispatchEventToFrontend("TestPage-performActions ");17 TestPage.dispatchEventToFrontend("TestPage-performActionsMultiple"); 14 18 } 15 19 … … 18 22 19 23 suite.addTestCase({ 20 name: "Canvas.multipleRecording", 24 name: "Canvas.ActionParameterNaN", 25 description: "Check that NaN is converted into the proper value for serialization.", 26 test(resolve, reject) { 27 let canvas = WI.canvasManager.canvases[0]; 28 InspectorTest.assert(canvas, "There should be at least one canvas context."); 29 30 canvas.awaitEvent(WI.Canvas.Event.RecordingStopped) 31 .then((event) => { 32 let recording = event.data.recording.toJSON(); 33 34 let frames = recording.frames; 35 InspectorTest.expectEqual(frames.length, 1, "The recording should have 1 frame."); 36 37 let actions = frames[0].actions; 38 InspectorTest.expectEqual(actions.length, 1, "The first frame should have 1 action."); 39 InspectorTest.expectEqual(actions[0][1].length, 1, "The action should have 1 parameter."); 40 InspectorTest.expectEqual(actions[0][1][0], null, "The parameter should be null."); 41 }) 42 .then(resolve, reject); 43 44 canvas.awaitEvent(WI.Canvas.Event.RecordingStarted) 45 .then((event) => { 46 InspectorTest.evaluateInPage(`performActionsNaN()`); 47 }); 48 49 const frameCount = 1; 50 CanvasAgent.startRecording(canvas.identifier, frameCount) 51 .catch(reject); 52 }, 53 }); 54 55 suite.addTestCase({ 56 name: "Canvas.MultipleRecording", 21 57 description: "Check that multiple recordings are able to be started/stopped at the same time.", 22 58 test(resolve, reject) { … … 40 76 }); 41 77 42 InspectorTest.awaitEvent("TestPage-performActions ")78 InspectorTest.awaitEvent("TestPage-performActionsMultiple") 43 79 .then((event) => { 44 80 InspectorTest.pass("Actions performed."); … … 53 89 54 90 InspectorTest.log("Performing actions..."); 55 InspectorTest.evaluateInPage(`performActions ()`);91 InspectorTest.evaluateInPage(`performActionsMultiple()`); 56 92 }); 57 93 … … 66 102 InspectorTest.log("Starting a recording of canvas 1..."); 67 103 canvases[0].startRecording(singleFrame); 104 }, 105 }); 106 107 suite.addTestCase({ 108 name: "Canvas.NoActions", 109 description: "Check that a canvas is still able to be recorded after stopping a recording with no actions.", 110 test(resolve, reject) { 111 let canvas = WI.canvasManager.canvases[0]; 112 InspectorTest.assert(canvas, "There should be at least one canvas context."); 113 114 let eventCount = 0; 115 function handleRecordingStopped(event) { 116 InspectorTest.assert(!event.data.recording, "The recording payload should be null."); 117 118 ++eventCount; 119 if (eventCount == 1) { 120 InspectorTest.pass("A recording should have been started and stopped once."); 121 122 canvas.startRecording(); 123 canvas.stopRecording(); 124 } else if (eventCount >= 2) { 125 InspectorTest.pass("A recording should have been started and stopped twice."); 126 127 canvas.removeEventListener(WI.Canvas.Event.RecordingStopped, handleRecordingStopped); 128 resolve(); 129 } 130 } 131 canvas.addEventListener(WI.Canvas.Event.RecordingStopped, handleRecordingStopped); 132 133 canvas.startRecording(); 134 canvas.stopRecording(); 68 135 }, 69 136 }); -
trunk/LayoutTests/inspector/canvas/resources/recording-2d.js
r246015 r246016 1 <!DOCTYPE html>2 <html>3 <head>4 <script src="../../http/tests/inspector/resources/inspector-test.js"></script>5 <script src="resources/recording-utilities.js"></script>6 <script>7 1 let ctx = null; 8 2 … … 431 425 ctx.fill(); 432 426 } 433 434 function performNaNActions() {435 ctx.globalAlpha = NaN;436 }437 438 function test() {439 let suite = InspectorTest.createAsyncSuite("Canvas.recording2D");440 441 suite.addTestCase({442 name: "Canvas.recording2D.singleFrame",443 description: "Check that the recording is stopped after a single frame.",444 test(resolve, reject) {445 startRecording(WI.Canvas.ContextType.Canvas2D, resolve, reject, {frameCount: 1});446 },447 timeout: -1,448 });449 450 suite.addTestCase({451 name: "Canvas.recording2D.multipleFrames",452 description: "Check that recording data is serialized correctly for multiple frames.",453 test(resolve, reject) {454 startRecording(WI.Canvas.ContextType.Canvas2D, resolve, reject);455 },456 timeout: -1,457 });458 459 suite.addTestCase({460 name: "Canvas.recording2D.memoryLimit",461 description: "Check that the recording is stopped when it reaches the memory limit.",462 test(resolve, reject) {463 startRecording(WI.Canvas.ContextType.Canvas2D, resolve, reject, {memoryLimit: 10});464 },465 timeout: -1,466 });467 468 suite.addTestCase({469 name: "Canvas.recording2D.Console",470 description: "Check that a recording can be triggered by console.record().",471 test(resolve, reject) {472 consoleRecord(WI.Canvas.ContextType.Canvas2D, resolve, reject);473 },474 });475 476 suite.addTestCase({477 name: "Canvas.recording2D.ActionParameterNaN",478 description: "Check that NaN is converted into the proper value for serialization.",479 test(resolve, reject) {480 let canvas = getCanvas(WI.Canvas.ContextType.Canvas2D);481 if (!canvas) {482 reject("Missing 2D canvas.");483 return;484 }485 486 canvas.awaitEvent(WI.Canvas.Event.RecordingStopped)487 .then((event) => {488 let recording = event.data.recording.toJSON();489 490 let frames = recording.frames;491 InspectorTest.expectEqual(frames.length, 1, "The recording should have 1 frame.");492 493 let actions = frames[0].actions;494 InspectorTest.expectEqual(actions.length, 1, "The first frame should have 1 action.");495 InspectorTest.expectEqual(actions[0][1].length, 1, "The action should have 1 parameter.");496 InspectorTest.expectEqual(actions[0][1][0], null, "The parameter should be null.");497 })498 .then(resolve, reject);499 500 canvas.awaitEvent(WI.Canvas.Event.RecordingStarted)501 .then((event) => {502 InspectorTest.evaluateInPage(`performNaNActions()`);503 });504 505 const frameCount = 1;506 CanvasAgent.startRecording(canvas.identifier, frameCount)507 .catch(reject);508 },509 });510 511 suite.addTestCase({512 name: "Canvas.recording2D.ExistingSaves",513 description: "Check that existing save calls are sent to the frontend.",514 test(resolve, reject) {515 let canvas = getCanvas(WI.Canvas.ContextType.Canvas2D);516 if (!canvas) {517 reject("Missing 2D canvas.");518 return;519 }520 521 async function logStates(recording) {522 async function compare(index, expected) {523 let state = await WI.RecordingState.swizzleInitialState(recording, recording.initialState.states[index]);524 InspectorTest.expectEqual(state.get("fillStyle"), expected, `State ${index} should match expected fillStyle value.`)525 }526 527 await compare(0, "#000000");528 await compare(1, "#ff0000");529 await compare(2, "#00ff00");530 await compare(3, "#0000ff");531 }532 533 canvas.awaitEvent(WI.Canvas.Event.RecordingStopped)534 .then((event) => {535 let {recording} = event.data;536 537 InspectorTest.expectEqual(recording.initialState.states.length, 4, "There should be 4 existing states.");538 539 logStates(recording)540 .then(resolve, reject);541 });542 543 canvas.awaitEvent(WI.Canvas.Event.RecordingStarted)544 .then((event) => {545 InspectorTest.evaluateInPage(`performSavePostActions()`).catch(reject);546 });547 548 InspectorTest.evaluateInPage(`performSavePreActions()`)549 .then(() => {550 const frameCount = 1;551 CanvasAgent.startRecording(canvas.identifier, frameCount).catch(reject);552 }, reject);553 },554 });555 556 suite.addTestCase({557 name: "Canvas.recording2D.NoActions",558 description: "Check that a canvas is still able to be recorded after stopping a recording with no actions.",559 test(resolve, reject) {560 let canvas = getCanvas(WI.Canvas.ContextType.Canvas2D);561 if (!canvas) {562 reject("Missing 2D canvas.");563 return;564 }565 566 let eventCount = 0;567 function handleRecordingStopped(event) {568 InspectorTest.assert(!event.data.recording, "The recording payload should be null.");569 570 ++eventCount;571 if (eventCount == 1) {572 InspectorTest.pass("A recording should have been started and stopped once.");573 574 canvas.startRecording();575 canvas.stopRecording();576 } else if (eventCount >= 2) {577 InspectorTest.pass("A recording should have been started and stopped twice.");578 579 canvas.removeEventListener(WI.Canvas.Event.RecordingStopped, handleRecordingStopped);580 resolve();581 }582 }583 canvas.addEventListener(WI.Canvas.Event.RecordingStopped, handleRecordingStopped);584 585 canvas.startRecording();586 canvas.stopRecording();587 },588 });589 590 suite.runTestCasesAndFinish();591 }592 </script>593 </head>594 <body onload="load()">595 <p>Test that CanvasManager is able to record actions made to 2D canvas contexts.</p>596 </body>597 </html> -
trunk/LayoutTests/inspector/canvas/resources/recording-bitmaprenderer.js
r246015 r246016 1 <!DOCTYPE html>2 <html>3 <head>4 <script src="../../http/tests/inspector/resources/inspector-test.js"></script>5 <script src="resources/recording-utilities.js"></script>6 <script>7 1 let ctx = null; 8 2 … … 88 82 ctx.transferFromImageBitmap(blueBitmap); 89 83 } 90 91 function test() {92 let suite = InspectorTest.createAsyncSuite("Canvas.recordingBitmapRenderer");93 94 suite.addTestCase({95 name: "Canvas.recordingBitmapRenderer.singleFrame",96 description: "Check that the recording is stopped after a single frame.",97 test(resolve, reject) {98 startRecording(WI.Canvas.ContextType.BitmapRenderer, resolve, reject, {frameCount: 1});99 },100 });101 102 suite.addTestCase({103 name: "Canvas.recordingBitmapRenderer.multipleFrames",104 description: "Check that recording data is serialized correctly for multiple frames.",105 test(resolve, reject) {106 startRecording(WI.Canvas.ContextType.BitmapRenderer, resolve, reject);107 },108 });109 110 suite.addTestCase({111 name: "Canvas.recordingBitmapRenderer.memoryLimit",112 description: "Check that the recording is stopped when it reaches the memory limit.",113 test(resolve, reject) {114 startRecording(WI.Canvas.ContextType.BitmapRenderer, resolve, reject, {memoryLimit: 10});115 },116 });117 118 suite.addTestCase({119 name: "Canvas.recordingBitmapRenderer.Console",120 description: "Check that a recording can be triggered by console.record().",121 test(resolve, reject) {122 consoleRecord(WI.Canvas.ContextType.BitmapRenderer, resolve, reject);123 },124 });125 126 suite.runTestCasesAndFinish();127 }128 </script>129 </head>130 <body onload="load()">131 <p>Test that CanvasManager is able to record actions made to BitmapRenderer canvas contexts.</p>132 </body>133 </html> -
trunk/LayoutTests/inspector/canvas/resources/recording-webgl.js
r246015 r246016 1 <!DOCTYPE html>2 <html>3 <head>4 <script src="../../http/tests/inspector/resources/inspector-test.js"></script>5 <script src="resources/recording-utilities.js"></script>6 <script src="resources/shaderProgram-utilities.js"></script>7 <script id="vertex-shader" type="x-shader/x-vertex">8 attribute vec4 test;9 void main(void) {10 gl_Position = test;11 }12 </script>13 <script id="fragment-shader" type="x-shader/x-fragment">14 precision mediump float;15 16 void main(void) {17 gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);18 }19 </script>20 <script>21 1 if (window.internals) 22 2 window.internals.settings.setWebGLErrorsToConsoleEnabled(false); … … 517 497 context.createBuffer(); 518 498 } 519 520 function test() {521 let suite = InspectorTest.createAsyncSuite("Canvas.recordingWebGL");522 523 suite.addTestCase({524 name: "Canvas.recordingWebGL.singleFrame",525 description: "Check that the recording is stopped after a single frame.",526 test(resolve, reject) {527 startRecording(WI.Canvas.ContextType.WebGL, resolve, reject, {frameCount: 1});528 },529 timeout: -1,530 });531 532 suite.addTestCase({533 name: "Canvas.recordingWebGL.multipleFrames",534 description: "Check that recording data is serialized correctly for multiple frames.",535 test(resolve, reject) {536 startRecording(WI.Canvas.ContextType.WebGL, resolve, reject);537 },538 timeout: -1,539 });540 541 suite.addTestCase({542 name: "Canvas.recordingWebGL.memoryLimit",543 description: "Check that the recording is stopped when it reaches the memory limit.",544 test(resolve, reject) {545 startRecording(WI.Canvas.ContextType.WebGL, resolve, reject, {memoryLimit: 10});546 },547 timeout: -1,548 });549 550 suite.addTestCase({551 name: "Canvas.recordingWebGL.Console",552 description: "Check that a recording can be triggered by console.record().",553 test(resolve, reject) {554 consoleRecord(WI.Canvas.ContextType.WebGL, resolve, reject);555 },556 });557 558 suite.runTestCasesAndFinish();559 }560 </script>561 </head>562 <body onload="load()">563 <p>Test that CanvasManager is able to record actions made to WebGL canvas contexts.</p>564 </body>565 </html> -
trunk/LayoutTests/inspector/canvas/resources/recording-webgl2.js
r246015 r246016 1 <!DOCTYPE html>2 <html>3 <head>4 <script src="../../http/tests/inspector/resources/inspector-test.js"></script>5 <script src="resources/recording-utilities.js"></script>6 <script src="resources/shaderProgram-utilities.js"></script>7 <script id="vertex-shader" type="x-shader/x-vertex">8 attribute vec4 test;9 void main(void) {10 gl_Position = test;11 }12 </script>13 <script id="fragment-shader" type="x-shader/x-fragment">14 precision mediump float;15 16 void main(void) {17 gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);18 }19 </script>20 <script>21 1 if (window.internals) { 22 2 window.internals.settings.setWebGLErrorsToConsoleEnabled(false); … … 508 488 context.createBuffer(); 509 489 } 510 511 function test() {512 let suite = InspectorTest.createAsyncSuite("Canvas.recordingWebGL2");513 514 suite.addTestCase({515 name: "Canvas.recordingWebGL2.singleFrame",516 description: "Check that the recording is stopped after a single frame.",517 test(resolve, reject) {518 startRecording(WI.Canvas.ContextType.WebGL2, resolve, reject, {frameCount: 1});519 },520 timeout: -1,521 });522 523 suite.addTestCase({524 name: "Canvas.recordingWebGL2.multipleFrames",525 description: "Check that recording data is serialized correctly for multiple frames.",526 test(resolve, reject) {527 startRecording(WI.Canvas.ContextType.WebGL2, resolve, reject);528 },529 timeout: -1,530 });531 532 suite.addTestCase({533 name: "Canvas.recordingWebGL2.memoryLimit",534 description: "Check that the recording is stopped when it reaches the memory limit.",535 test(resolve, reject) {536 startRecording(WI.Canvas.ContextType.WebGL2, resolve, reject, {memoryLimit: 10});537 },538 timeout: -1,539 });540 541 suite.addTestCase({542 name: "Canvas.recordingWebGL2.Console",543 description: "Check that a recording can be triggered by console.record().",544 test(resolve, reject) {545 consoleRecord(WI.Canvas.ContextType.WebGL2, resolve, reject);546 },547 });548 549 suite.runTestCasesAndFinish();550 }551 </script>552 </head>553 <body onload="load()">554 <p>Test that CanvasManager is able to record actions made to WebGL2 canvas contexts.</p>555 </body>556 </html> -
trunk/LayoutTests/platform/gtk/TestExpectations
r245788 r246016 544 544 webkit.org/b/166536 fast/canvas/webgl/webgl2-texture-upload-enums.html [ Skip ] 545 545 webkit.org/b/166536 inspector/canvas/create-context-webgl2.html [ Skip ] 546 webkit.org/b/166536 inspector/canvas/recording-webgl2.html [ Skip ] 546 webkit.org/b/166536 inspector/canvas/console-record-webgl2.html [ Skip ] 547 webkit.org/b/166536 inspector/canvas/recording-webgl2-frameCount.html [ Skip ] 548 webkit.org/b/166536 inspector/canvas/recording-webgl2-full.html [ Skip ] 549 webkit.org/b/166536 inspector/canvas/recording-webgl2-memoryLimit.html [ Skip ] 547 550 webkit.org/b/166536 inspector/canvas/recording-webgl2-snapshots.html [ Skip ] 548 551 webkit.org/b/166536 inspector/canvas/requestContent-webgl2.html [ Skip ] … … 2193 2196 webkit.org/b/197507 media/destructor-logging-crash.html [ Timeout Pass ] 2194 2197 2195 webkit.org/b/175662 inspector/canvas/recording-2d.html [ Failure Timeout ] 2198 webkit.org/b/175662 inspector/canvas/console-record-2d.html [ Failure Timeout ] 2199 webkit.org/b/175662 inspector/canvas/recording-2d-frameCount.html [ Failure Timeout ] 2200 webkit.org/b/175662 inspector/canvas/recording-2d-full.html [ Failure Timeout ] 2201 webkit.org/b/175662 inspector/canvas/recording-2d-memoryLimit.html [ Failure Timeout ] 2202 webkit.org/b/175662 inspector/canvas/recording-2d-saves.html [ Failure Timeout ] 2196 2203 2197 2204 webkit.org/b/197711 imported/w3c/web-platform-tests/media-source/mediasource-correct-frames.html [ Pass Failure ] … … 3766 3773 webkit.org/b/193323 http/wpt/cache-storage/cache-quota.any.html [ Failure ] 3767 3774 3768 webkit.org/b/193637 inspector/canvas/recording-bitmaprenderer.html [ Failure ] 3775 webkit.org/b/193637 inspector/canvas/console-record-bitmaprenderer.html [ Failure ] 3776 webkit.org/b/193637 inspector/canvas/recording-bitmaprenderer-frameCount.html [ Failure ] 3777 webkit.org/b/193637 inspector/canvas/recording-bitmaprenderer-full.html [ Failure ] 3778 webkit.org/b/193637 inspector/canvas/recording-bitmaprenderer-memoryLimit.html [ Failure ] 3769 3779 3770 3780 webkit.org/b/193638 media/video-webkit-playsinline.html [ Failure ] -
trunk/LayoutTests/platform/mac/TestExpectations
r245999 r246016 1028 1028 webkit.org/b/150978 fast/canvas/webgl/oes-texture-half-float-linear.html [ Pass Failure ] 1029 1029 1030 webkit.org/b/174066 inspector/canvas/console-record-webgl2.html [ Pass Timeout ] 1030 1031 webkit.org/b/173931 inspector/canvas/context-attributes.html [ Pass Timeout ] 1031 1032 webkit.org/b/178028 inspector/canvas/create-context-2d.html [ Pass Timeout ] 1032 1033 webkit.org/b/174066 inspector/canvas/create-context-webgl2.html [ Pass Timeout ] 1033 1034 webkit.org/b/174272 inspector/canvas/css-canvas-clients.html [ Pass Failure ] 1034 webkit.org/b/174066 inspector/canvas/recording-webgl2.html [ Pass Failure Timeout ] 1035 webkit.org/b/174066 inspector/canvas/recording-webgl2-frameCount.html [ Pass Failure Timeout ] 1036 webkit.org/b/174066 inspector/canvas/recording-webgl2-full.html [ Pass Failure Timeout ] 1037 webkit.org/b/174066 inspector/canvas/recording-webgl2-memoryLimit.html [ Pass Failure Timeout ] 1035 1038 webkit.org/b/174066 inspector/canvas/recording-webgl2-snapshots.html [ Pass Failure Timeout ] 1036 1039 webkit.org/b/174066 inspector/canvas/shaderProgram-add-remove-webgl2.html [ Pass Failure Timeout ] -
trunk/LayoutTests/platform/win/TestExpectations
r245963 r246016 1980 1980 http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html [ Skip ] 1981 1981 http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin.html [ Skip ] 1982 inspector/canvas/console-record-webgl.html [ Skip ] 1982 1983 inspector/canvas/create-context-webgl.html [ Skip ] 1984 inspector/canvas/console-record-webgl2.html [ Skip ] 1983 1985 inspector/canvas/create-context-webgl2.html [ Skip ] 1984 inspector/canvas/recording-webgl.html [ Skip ] 1986 inspector/canvas/recording-webgl-frameCount.html [ Skip ] 1987 inspector/canvas/recording-webgl-full.html [ Skip ] 1988 inspector/canvas/recording-webgl-memoryLimit.html [ Skip ] 1985 1989 inspector/canvas/recording-webgl-snapshots.html [ Skip ] 1986 inspector/canvas/recording-webgl2.html [ Skip ] 1990 inspector/canvas/recording-webgl2-frameCount.html [ Skip ] 1991 inspector/canvas/recording-webgl2-full.html [ Skip ] 1992 inspector/canvas/recording-webgl2-memoryLimit.html [ Skip ] 1987 1993 inspector/canvas/recording-webgl2-snapshots.html [ Skip ] 1988 1994 inspector/canvas/requestContent-webgl.html [ Skip ]
Note:
See TracChangeset
for help on using the changeset viewer.