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