| <!DOCTYPE html> |
| <html> |
| <body> |
| <script src="../../resources/js-test-pre.js"></script> |
| <form> |
| Required text input: <input type="text" id="required_text_input" required><input id="required_text_input_submit" type="submit"> |
| </form> |
| <div id="description"></div> |
| <div id="console"></div> |
| <script> |
| description("Tests that the font used for validation bubble is aware of the minimumFontSize setting."); |
| jsTestIsAsync = true; |
| |
| function getValidationBubbleContents() |
| { |
| return ` |
| (function() { |
| return JSON.stringify(uiController.contentsOfUserInterfaceItem('validationBubble')); |
| })();` |
| } |
| |
| function setMinimumFontSize() |
| { |
| return ` |
| (function() { |
| uiController.overridePreference('WebKitMinimumFontSize', '24'); |
| uiController.uiScriptComplete("Done"); |
| })();` |
| } |
| |
| onload = function() { |
| input = document.getElementById("required_text_input"); |
| submit = document.getElementById("required_text_input_submit"); |
| submit.click(); |
| |
| testRunner.runUIScript(getValidationBubbleContents(), function(result) { |
| validationBubbleContents = JSON.parse(result).validationBubble; |
| shouldBeTrue("validationBubbleContents.fontSize > 0"); |
| shouldBeTrue("validationBubbleContents.fontSize < 24"); |
| |
| testRunner.runUIScript(setMinimumFontSize(), function() { |
| submit.click(); |
| |
| testRunner.runUIScript(getValidationBubbleContents(), function(result) { |
| validationBubbleContents = JSON.parse(result).validationBubble; |
| shouldBe("validationBubbleContents.fontSize", "24"); |
| finishJSTest(); |
| }); |
| }); |
| }); |
| } |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| <html> |