OLD | NEW |
(Empty) | |
| 1 (async function() { |
| 2 let {page, session, Protocol} = await InspectorTest.startBlank(''); |
| 3 |
| 4 Protocol.Page.enable(); |
| 5 session.evaluate(` |
| 6 var frame = document.createElement('iframe'); |
| 7 document.body.appendChild(frame); |
| 8 frame.src = '${InspectorTest.url('../resources/blank.html')}'; |
| 9 `); |
| 10 |
| 11 var msg = await Protocol.Page.onceFrameScheduledNavigation(); |
| 12 InspectorTest.log('Scheduled navigation with delay ' + msg.params.delay); |
| 13 |
| 14 await Protocol.Page.onceFrameStartedLoading(); |
| 15 // This event should be received before the scheduled navigation is cleared. |
| 16 InspectorTest.log('Started loading'); |
| 17 |
| 18 await Protocol.Page.onceFrameClearedScheduledNavigation(); |
| 19 InspectorTest.log('Cleared scheduled navigation'); |
| 20 InspectorTest.completeTest(); |
| 21 })(); |
OLD | NEW |