Index: third_party/WebKit/LayoutTests/fast/forms/submit-form-not-attached-to-document.html |
diff --git a/third_party/WebKit/LayoutTests/fast/forms/submit-form-not-attached-to-document.html b/third_party/WebKit/LayoutTests/fast/forms/submit-form-not-attached-to-document.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7f77de83f89c724d003fb45c6cd01f91371154dc |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/forms/submit-form-not-attached-to-document.html |
@@ -0,0 +1,21 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<body> |
+ <form action="javascript: redirect()"></form> |
+<script> |
+var f1 = document.forms[0]; |
+test(function() { |
+ f1.parentNode.removeChild(f1); |
+ f1.submit(); |
+}, 'Submitting a form that has been removed.'); |
+ |
+var f2 = document.createElement('form'); |
+f2.action = "javascript: redirect()"; |
+test(function() { |
+ f2.submit(); |
+}, 'Submitting a form that has never been attached to the document.'); |
+ |
+function redirect() { assert_true(false); } |
tkent
2016/08/25 00:52:54
Use assert_unreached('description').
lunalu1
2016/08/25 15:05:35
Done.
|
+</script> |
+</body> |