| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../resources/js-test.js"></script> |
| 5 </head> |
| 6 <body> |
| 7 <p> |
| 8 Tests that the return values of Notification.permission match the permissi
on request status. |
| 9 </p> |
| 10 <div id="console"></div> |
| 11 <script> |
| 12 if (!window.testRunner) { |
| 13 testFailed("This test depends on window.testRunner to toggle permissions
."); |
| 14 } else { |
| 15 // The "default" state indicates that no permission request has been ans
wered yet. |
| 16 shouldBeEqualToString("Notification.permission", "default"); |
| 17 |
| 18 window.testRunner.grantWebNotificationPermission("file://", false); |
| 19 shouldBeEqualToString("Notification.permission", "denied"); |
| 20 |
| 21 window.testRunner.grantWebNotificationPermission("file://", true); |
| 22 shouldBeEqualToString("Notification.permission", "granted"); |
| 23 } |
| 24 </script> |
| 25 </body> |
| 26 </body> |
| OLD | NEW |