HTML form validation bubble should be dismissed on navigation
[WebKit-https.git] / LayoutTests / http / tests / navigation / resources / check-validation-bubble-not-visible.html
1 <script>
2 if (window.testRunner) {
3     testRunner.waitUntilDone();
4     testRunner.dumpAsText();
5 }
6
7 function getValidationBubbleContents()
8 {
9     return `
10     (function() {
11         return JSON.stringify(uiController.contentsOfUserInterfaceItem('validationBubble'));
12     })();`
13 }
14 testRunner.runUIScript(getValidationBubbleContents(), function(result) {
15     validationBubbleContents = JSON.parse(result).validationBubble;
16     if (validationBubbleContents.message === "")
17         document.body.innerHTML = "PASS: The HTML validation bubble is no longer visible after navigating";
18     else
19         document.body.innerHTML = "FAIL: The HTML validation bubble is still visible after navigating";
20
21     if (window.testRunner)
22         testRunner.notifyDone();
23 });
24 </script>