OLD | NEW |
(Empty) | |
| 1 (async function() { |
| 2 let {page, session, Protocol} = await InspectorTest.startBlank(''); |
| 3 |
| 4 Protocol.Page.enable(); |
| 5 session.evaluate(` |
| 6 window.frame = document.createElement('iframe'); |
| 7 frame.src = '${InspectorTest.url('../resources/blank.html')}'; |
| 8 document.body.appendChild(frame); |
| 9 `); |
| 10 await Protocol.Page.onceFrameAttached(); |
| 11 InspectorTest.log('Attached'); |
| 12 await Protocol.Page.onceFrameStartedLoading(); |
| 13 InspectorTest.log('Started loading'); |
| 14 await Protocol.Page.onceFrameNavigated(); |
| 15 InspectorTest.log('Navigated'); |
| 16 session.evaluate('frame.src = "about:blank"'); |
| 17 await Protocol.Page.onceFrameStartedLoading(); |
| 18 InspectorTest.log('Started loading'); |
| 19 await Protocol.Page.onceFrameNavigated(); |
| 20 InspectorTest.log('Navigated'); |
| 21 session.evaluate('document.body.removeChild(frame);'); |
| 22 await Protocol.Page.onceFrameDetached(); |
| 23 InspectorTest.log('Detached'); |
| 24 InspectorTest.completeTest(); |
| 25 })(); |
OLD | NEW |