| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Test that calling prompt() before the promise returned by the pre
vious call is resolved throws an exception</title> | 4 <title>Test that calling prompt() before the promise returned by the pre
vious call is resolved throws an exception</title> |
| 5 <script src="../../resources/testharness.js"></script> | 5 <script src="../../resources/testharness.js"></script> |
| 6 <script src="../../resources/testharnessreport.js"></script> | 6 <script src="../../resources/testharnessreport.js"></script> |
| 7 <script src="../media-file.js"></script> | 7 <script src="../media-file.js"></script> |
| 8 </head> | 8 </head> |
| 9 <body> | 9 <body> |
| 10 <button id="button">Click me</button> | 10 <button id="button">Click me</button> |
| 11 <script> | 11 <script> |
| 12 // WPT: this test can't be moved to WPT because of its usage of: |
| 13 // - user gesture; |
| 14 // - internals.mediaPlayerRemoteRouteAvailabilityChanged |
| 15 |
| 16 |
| 12 function clickOnElem(e) { | 17 function clickOnElem(e) { |
| 13 eventSender.mouseMoveTo( | 18 eventSender.mouseMoveTo( |
| 14 e.offsetLeft + e.offsetWidth / 2, | 19 e.offsetLeft + e.offsetWidth / 2, |
| 15 e.offsetTop + e.offsetHeight / 2); | 20 e.offsetTop + e.offsetHeight / 2); |
| 16 eventSender.mouseDown(); | 21 eventSender.mouseDown(); |
| 17 eventSender.mouseUp(); | 22 eventSender.mouseUp(); |
| 18 } | 23 } |
| 19 | 24 |
| 20 async_test(function(test) | 25 async_test(function(test) |
| 21 { | 26 { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 39 btn.onclick = null; | 44 btn.onclick = null; |
| 40 }; | 45 }; |
| 41 clickOnElem(btn); | 46 clickOnElem(btn); |
| 42 } | 47 } |
| 43 | 48 |
| 44 clickOnElem(btn); | 49 clickOnElem(btn); |
| 45 }, 'Test that calling prompt() before the promise returned by the pr
evious call is resolved throws an exception.'); | 50 }, 'Test that calling prompt() before the promise returned by the pr
evious call is resolved throws an exception.'); |
| 46 </script> | 51 </script> |
| 47 </body> | 52 </body> |
| 48 </html> | 53 </html> |
| OLD | NEW |