diff options
author | Steve Block <steveblock@google.com> | 2010-09-07 16:06:44 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-09-07 16:36:45 +0100 |
commit | eff69b907ef2cd3a9af0351287a929c66f58e3f6 (patch) | |
tree | c0d8835711b71631a15c3fb20d93c195ee3d5064 /LayoutTests/fast/dom/HTMLFormElement | |
parent | 66945f3db6c497fb182ef8a187b8c69e683dbb26 (diff) | |
download | external_webkit-eff69b907ef2cd3a9af0351287a929c66f58e3f6.zip external_webkit-eff69b907ef2cd3a9af0351287a929c66f58e3f6.tar.gz external_webkit-eff69b907ef2cd3a9af0351287a929c66f58e3f6.tar.bz2 |
Adds a number of fast/ LayoutTest directories to the triaged set
Tests are added at r66079. All tests pass
fast/constructors/
fast/cookies/
fast/dom/Attr/
fast/dom/CSSStyleDeclaration/
fast/dom/DOMImplementation/
fast/dom/DeviceMotion/
fast/dom/EntityReference/
fast/dom/HTMLAnchorElement/
fast/dom/HTMLButtonElement/
fast/dom/HTMLFontElement/
fast/dom/HTMLFormElement/
fast/dom/HTMLHtmlElement/
fast/dom/HTMLKeygenElement/
fast/dom/HTMLLabelElement/
fast/dom/HTMLMetaElement/
fast/dom/HTMLTableRowElement/
fast/dom/HTMLTableSectionElement/
fast/dom/Node/
fast/dom/NodeList/
fast/dom/Selection/
fast/dom/StyleSheet/
fast/dom/Text/
fast/dom/TreeWalker/
fast/dom/beforeload/
fast/dom/getElementsByClassName/
fast/leaks/
Change-Id: I9a2c401151f7abf5bb22b764b1327022ab651e04
Diffstat (limited to 'LayoutTests/fast/dom/HTMLFormElement')
10 files changed, 189 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/HTMLFormElement/adopt-assertion-expected.txt b/LayoutTests/fast/dom/HTMLFormElement/adopt-assertion-expected.txt new file mode 100644 index 0000000..e602f6f --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/adopt-assertion-expected.txt @@ -0,0 +1,3 @@ +Test for https://bugs.webkit.org/attachment.cgi?id=30159 Assertion failure in Node::setDocument() (willMoveToNewOwnerDocumentWasCalled) when adopting a <form> element. + +The test passed if the assertion did not fail. diff --git a/LayoutTests/fast/dom/HTMLFormElement/adopt-assertion.html b/LayoutTests/fast/dom/HTMLFormElement/adopt-assertion.html new file mode 100644 index 0000000..80a99d5 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/adopt-assertion.html @@ -0,0 +1,16 @@ +<p> + Test for <i><a href="https://bugs.webkit.org/attachment.cgi?id=30159">https://bugs.webkit.org/attachment.cgi?id=30159</a> + Assertion failure in Node::setDocument() + (willMoveToNewOwnerDocumentWasCalled) when adopting a <form> element</i>. +</p> +<p> + The test passed if the assertion did not fail. +</p> +<form id="target"></form> +<script> + if (window.layoutTestController) + layoutTestController.dumpAsText(); + + var otherDocument = document.implementation.createHTMLDocument(); + otherDocument.adoptNode(document.getElementById("target")); +</script> diff --git a/LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash-expected.txt b/LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash-expected.txt new file mode 100644 index 0000000..637c653 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash-expected.txt @@ -0,0 +1,5 @@ +Test for a crash when deactivating a document that had adopted a <form> element. + +The test passed if it did not crash. + + diff --git a/LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash.html b/LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash.html new file mode 100644 index 0000000..d8b535e --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash.html @@ -0,0 +1,41 @@ +<p> + Test for a crash when deactivating a document that had adopted a <form> + element. +</p> +<p> + The test passed if it did not crash. +</p> +<iframe id="iframe"></iframe> +<script> + var iframe = document.getElementById("iframe"); + + onload = function() + { + if (window.layoutTestController) { + layoutTestController.dumpAsText(); + layoutTestController.waitUntilDone(); + } + + document.body.offsetTop; + var otherDocument = iframe.contentDocument; + var form = document.createElement("form"); + otherDocument.adoptNode(form); + form = null; + setTimeout(finish, 0); + } + + function finish() + { + if (window.GCController) + GCController.collect() + else { + for (var i = 0; i < 10000; i++) + var foo = { }; + } + + iframe.parentNode.removeChild(iframe); + + if (window.layoutTestController) + layoutTestController.notifyDone(); + } +</script> diff --git a/LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document-expected.txt b/LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document-expected.txt new file mode 100644 index 0000000..54dbd7d --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document-expected.txt @@ -0,0 +1,27 @@ +Test the elements collection when the form is not a descendant of the document. This test case failed in an early version of Acid3. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS i.getAttribute('name') is 'first' +PASS i.name is 'first' +PASS i.getAttribute('type') is 'text' +PASS i.type is 'text' +PASS i.value is 'test' +PASS f.elements.length is 1 +PASS f.elements[0] is i +PASS f.elements.first is i +PASS f.elements.second is i +PASS i.getAttribute('name') is 'second' +PASS i.name is 'second' +PASS i.getAttribute('type') is 'password' +PASS i.type is 'password' +PASS i.value is 'TEST' +PASS f.elements.length is 1 +PASS f.elements[0] is i +PASS f.elements.first is undefined +PASS f.elements.second is i +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document.html b/LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document.html new file mode 100644 index 0000000..09b6f36 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document.html @@ -0,0 +1,13 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> +<head> +<link rel="stylesheet" href="../../js/resources/js-test-style.css"> +<script src="../../js/resources/js-test-pre.js"></script> +</head> +<body> +<p id="description"></p> +<div id="console"></div> +<script src="script-tests/elements-not-in-document.js"></script> +<script src="../../js/resources/js-test-post.js"></script> +</body> +</html> diff --git a/LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter-expected.txt b/LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter-expected.txt new file mode 100644 index 0000000..db8ff58 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter-expected.txt @@ -0,0 +1,10 @@ +This test verifies that elements can be fetched by index from HTMLFormElements. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS form[0] is my_input +PASS successfullyParsed is true + +TEST COMPLETE +HTMLInputElement diff --git a/LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter.html b/LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter.html new file mode 100644 index 0000000..b45c35f --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter.html @@ -0,0 +1,24 @@ +<html> +<head> +<link rel="stylesheet" href="../../js/resources/js-test-style.css"> +<script src="../../js/resources/js-test-pre.js"></script> +</head> +<body> +<p id="description"></p> +<div id="console"></div> + +<form id='f'> + <input type="radio" name="a" value="a" id="i">HTMLInputElement</input> +</form> + +<script> +description('This test verifies that elements can be fetched by index from HTMLFormElements.'); + +var form = document.getElementById('f'); +var my_input = document.getElementById('i'); +shouldBe("form[0]", "my_input"); +var successfullyParsed = true; +</script> +<script src="../../js/resources/js-test-post.js"></script> +</body> +</html> diff --git a/LayoutTests/fast/dom/HTMLFormElement/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/HTMLFormElement/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> +<head> +<link rel="stylesheet" href="../../js/resources/js-test-style.css"> +<script src="../../js/resources/js-test-pre.js"></script> +</head> +<body> +<p id="description"></p> +<div id="console"></div> +<script src="YOUR_JS_FILE_HERE"></script> +<script src="../../js/resources/js-test-post.js"></script> +</body> +</html> diff --git a/LayoutTests/fast/dom/HTMLFormElement/script-tests/elements-not-in-document.js b/LayoutTests/fast/dom/HTMLFormElement/script-tests/elements-not-in-document.js new file mode 100644 index 0000000..da1ea80 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/script-tests/elements-not-in-document.js @@ -0,0 +1,37 @@ +description('Test the elements collection when the form is not a descendant of the document. This test case failed in an early version of Acid3.'); + +var f = document.createElement('form'); +var i = document.createElement('input'); +i.name = 'first'; +i.type = 'text'; +i.value = 'test'; +f.appendChild(i); + +shouldBe("i.getAttribute('name')", "'first'"); +shouldBe("i.name", "'first'"); +shouldBe("i.getAttribute('type')", "'text'"); +shouldBe("i.type", "'text'"); +shouldBe("i.value", "'test'"); +shouldBe("f.elements.length", "1"); +shouldBe("f.elements[0]", "i"); +shouldBe("f.elements.first", "i"); + +f.elements.second; +i.name = 'second'; +i.type = 'password'; +i.value = 'TEST'; + +// This has to be the first expression tested, because reporting the result will fix the bug. +shouldBe("f.elements.second", "i"); + +shouldBe("i.getAttribute('name')", "'second'"); +shouldBe("i.name", "'second'"); +shouldBe("i.getAttribute('type')", "'password'"); +shouldBe("i.type", "'password'"); +shouldBe("i.value", "'TEST'"); +shouldBe("f.elements.length", "1"); +shouldBe("f.elements[0]", "i"); +shouldBe("f.elements.first", "undefined"); +shouldBe("f.elements.second", "i"); + +var successfullyParsed = true; |