blob: 5d61e59ed20b0815cd9ac59c4cae7023237dd88a [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test-pre.js"></script>
<iframe id="testFrame1" srcdoc="<iframe id='testFrame2' src='resources/form-validation-iframe.html'></iframe>"></iframe>
<div id="description"></div>
<div id="console"></div>
<script>
description("Tests that the form validation message goes away when its element's iframe gets detached.");
jsTestIsAsync = true;
function getValidationBubbleContents()
{
return `
(function() {
return JSON.stringify(uiController.contentsOfUserInterfaceItem('validationBubble'));
})();`
}
onload = function() {
var testFrame1 = document.getElementById("testFrame1");
testFrame1.contentDocument.getElementById("testFrame2").contentDocument.getElementById("required_text_input_submit").click();
testFrame1.remove();
testFrame1 = null;
gc();
testRunner.runUIScript(getValidationBubbleContents(), function(result) {
validationBubbleContents = JSON.parse(result).validationBubble;
gc();
shouldBeEqualToString("validationBubbleContents.message", "");
finishJSTest();
});
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
<html>