<!DOCTYPE html> <!-- form with one invalid element and dynamically made it element with barred constraints --> <html class='reftest-wait'> <head> <style> form:invalid { display: none; } </style> </head> <script> function onloadHandler() { document.getElementById('i').readOnly = 'ro'; document.documentElement.className = ''; } </script> <body onload='onloadHandler();'> <form> <input id='i' required> </form> </body> </html>