| <!DOCTYPE html><!-- webkit-test-runner [ IPCTestingAPIEnabled=true ] --> | |
| <html> | |
| <head> | |
| <script> | |
| function fuzz() { | |
| if (window.testRunner) { | |
| testRunner.waitUntilDone(); | |
| } | |
| var calledParseMessage = false; | |
| IPC.addOutgoingMessageListener("UI", (msg) => { | |
| if (!calledParseMessage && msg.name == IPC.messages.WebPageProxy_UpdateMediaUsageManagerSessionState.name) { | |
| calledParseMessage = true; | |
| parseMessage(msg); | |
| } | |
| }); | |
| video=document.createElement('video'); | |
| video.src='resources/1080i60_SMPTE_8CH_audible.mov'; | |
| document.body.appendChild(video); | |
| IPC.connectionForProcessTarget('UI').sendWithAsyncReply(0,IPC.messages.WebFullScreenManagerProxy_ExitFullScreen.name,[],()=>{}); | |
| IPC.connectionForProcessTarget('UI').sendWithAsyncReply(0,IPC.messages.WebFullScreenManagerProxy_BeganExitFullScreen.name,[{type: 'uint32_t',value: 247},{type: 'uint32_t',value: 204},{type: 'uint32_t',value: 4787946},{type: 'uint32_t',value: 713},{type: 'uint32_t',value: 238},{type: 'uint32_t',value: 749},{type: 'uint32_t',value: 30},{type: 'uint32_t',value: 1008}],()=>{}); | |
| window.setTimeout(timeout1,1000); | |
| } | |
| function parseMessage(msg) { | |
| let buf = new Uint8Array(msg.buffer); | |
| window.bada = buf; | |
| if (buf.length < 0x18) { | |
| return -1; | |
| } | |
| let view = new DataView(buf.buffer, 0x10); | |
| o17 = view.getBigUint64(0, true); | |
| } | |
| function timeout1() { | |
| IPC.sendSyncMessage('UI',IPC.webPageProxyID,IPC.messages.WebPageProxy_ReachedApplicationCacheOriginQuota.name,0.1,[{type: 'String',value: "text/html"},{type: 'uint64_t',value: 426},{type: 'uint64_t',value: 809}]); | |
| video.play(); | |
| window.setTimeout(timeout2,300); | |
| } | |
| function timeout2() { | |
| video.play(); | |
| IPC.connectionForProcessTarget('UI').sendWithAsyncReply(0,IPC.messages.WebFullScreenManagerProxy_BeganEnterFullScreen.name,[{type: 'uint32_t',value: 1212623797},{type: 'uint32_t',value: 2099646},{type: 'uint32_t',value: 315},{type: 'uint32_t',value: 204},{type: 'uint32_t',value: 48},{type: 'uint32_t',value: 64},{type: 'uint32_t',value: 3},{type: 'uint32_t',value: 403}],()=>{}); | |
| window.setTimeout(timeout3, 10); | |
| } | |
| function timeout3() { | |
| IPC.sendMessage('UI',IPC.webPageProxyID,IPC.messages.WebPageProxy_RemoveMediaUsageManagerSession.name,[{type: 'uint64_t',value: o17}]); | |
| if (window.testRunner) { | |
| testRunner.dumpAsText(); | |
| testRunner.notifyDone(); | |
| } | |
| } | |
| </script> | |
| </head> | |
| <body onload='fuzz()'></body> | |
| <div>This test should not crash</div> | |
| </html> |