--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/textinput/NIST_textInput_0001.html Fri Mar 20 05:31:13 2009 +0900
@@ -0,0 +1,115 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_textInput_0001.html -->
+ <!-- Purpose - Evaluate a user generated mouseover event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+ <title>DOM Events API Test Suite - NIST_textInput_0001.html</title>
+
+ <style>
+ #result:after {
+ display: block;
+ }
+ .not_yet_tested:after {
+ background-color: yellow;
+ content: "Not yet tested";
+ }
+ .failed:after {
+ background-color: red;
+ content: "Failed";
+ }
+ .passed:after {
+ background-color: green;
+ content: "Passed";
+ }
+ </style>
+ <script type="text/javascript">
+ // Function to begin the test.
+ function w3c_beginTest() {
+ if ("vendor_beginTest" in window) {
+ vendor_beginTest();
+ }
+ if ("NIST_textInput_0001" in window) {
+ NIST_textInput_0001("tbl");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("vendor_endTest" in window) {
+ vendor_endTest();
+ }
+ }
+
+ //Function to report test result.
+
+ function w3c_reportResult() {
+ if ("vendor_reportResult" in window) {
+ vendor_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ //Function to be executed in reaction to textInput event.
+ function w3c_reactToTextInput() {
+ var evt = document.createEvent("TextEvent");
+ evt.initTextEvent("textinput", true, true, evt.view, "XXXXXXX");
+ var target = document.getElementById("tb1");
+ target.dispatchEvent(evt);
+ _actualResults = getActualResults(evt);
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getActualResults(evt)
+ {
+ var act = evt.type;
+ act += evt.bubbles;
+ act += evt.cancelable;
+ act += evt.data;
+ return act;
+ }
+ function getExpectedResults()
+ {
+ return "textinputtruetrueXXXXXXX";
+ }
+
+ // Function to be executed in reaction to a textInput removal.
+ function w3c_reactToTextInputRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("textInput", w3c_reactToTextInput(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("textInput", w3c_reactToTextInputRemoval(), false);
+ }
+ }
+ </script>
+
+ <script type="text/javascript" src="vendor_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated textInput event over a table element</h3>
+ <table id="tb1">
+ <tr><td id="t1">Row 1, Cell 1</td><td id="t6">Row 1, Cell 2</td></tr>
+ <tr><td id="t2">Row 2, Cell 1</td><td id="t7">Row 2, Cell 2</td></tr>
+ <tr><td id="t3">Row 3, Cell 1</td><td id="t8">Row 3, Cell 2</td></tr>
+ <tr><td id="t4">Row 4, Cell 1</td><td id="t9">Row 4, Cell 2</td></tr>
+ <tr><td id="t5">Row 5, Cell 1</td><td id="t10">Row 5, Cell 2</td></tr>
+ </table>
+ <div id="result" class="not_yet_tested"></div>
+ </body>
+</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/textinput/NIST_textInput_0002.html Fri Mar 20 05:31:13 2009 +0900
@@ -0,0 +1,115 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_textInput_0002.html -->
+ <!-- Purpose - Evaluate a user generated mouseover event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+ <title>DOM Events API Test Suite - NIST_textInput_0002.html</title>
+
+ <style>
+ #result:after {
+ display: block;
+ }
+ .not_yet_tested:after {
+ background-color: yellow;
+ content: "Not yet tested";
+ }
+ .failed:after {
+ background-color: red;
+ content: "Failed";
+ }
+ .passed:after {
+ background-color: green;
+ content: "Passed";
+ }
+ </style>
+ <script type="text/javascript">
+ // Function to begin the test.
+ function w3c_beginTest() {
+ if ("vendor_beginTest" in window) {
+ vendor_beginTest();
+ }
+ if ("NIST_textInput_0002" in window) {
+ NIST_textInput_0002("tbl");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("vendor_endTest" in window) {
+ vendor_endTest();
+ }
+ }
+
+ //Function to report test result.
+
+ function w3c_reportResult() {
+ if ("vendor_reportResult" in window) {
+ vendor_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ //Function to be executed in reaction to textInput event.
+ function w3c_reactToTextInput() {
+ var evt = document.createEvent("TextEvent");
+ evt.initTextEvent("textinput", true, false, evt.view, "XXXXXXX");
+ var target = document.getElementById("tb1");
+ target.dispatchEvent(evt);
+ _actualResults = getActualResults(evt);
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getActualResults(evt)
+ {
+ var act = evt.type;
+ act += evt.bubbles;
+ act += evt.cancelable;
+ act += evt.data;
+ return act;
+ }
+ function getExpectedResults()
+ {
+ return "textinputtruefalseXXXXXXX";
+ }
+
+ // Function to be executed in reaction to a textInput removal.
+ function w3c_reactToTextInputRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("textInput", w3c_reactToTextInput(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("textInput", w3c_reactToTextInputRemoval(), false);
+ }
+ }
+ </script>
+
+ <script type="text/javascript" src="vendor_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated textInput event over a table element</h3>
+ <table id="tb1">
+ <tr><td id="t1">Row 1, Cell 1</td><td id="t6">Row 1, Cell 2</td></tr>
+ <tr><td id="t2">Row 2, Cell 1</td><td id="t7">Row 2, Cell 2</td></tr>
+ <tr><td id="t3">Row 3, Cell 1</td><td id="t8">Row 3, Cell 2</td></tr>
+ <tr><td id="t4">Row 4, Cell 1</td><td id="t9">Row 4, Cell 2</td></tr>
+ <tr><td id="t5">Row 5, Cell 1</td><td id="t10">Row 5, Cell 2</td></tr>
+ </table>
+ <div id="result" class="not_yet_tested"></div>
+ </body>
+</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/textinput/NIST_textInput_0003.html Fri Mar 20 05:31:13 2009 +0900
@@ -0,0 +1,115 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_textInput_0003.html -->
+ <!-- Purpose - Evaluate a user generated mouseover event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+ <title>DOM Events API Test Suite - NIST_textInput_0003.html</title>
+
+ <style>
+ #result:after {
+ display: block;
+ }
+ .not_yet_tested:after {
+ background-color: yellow;
+ content: "Not yet tested";
+ }
+ .failed:after {
+ background-color: red;
+ content: "Failed";
+ }
+ .passed:after {
+ background-color: green;
+ content: "Passed";
+ }
+ </style>
+ <script type="text/javascript">
+ // Function to begin the test.
+ function w3c_beginTest() {
+ if ("vendor_beginTest" in window) {
+ vendor_beginTest();
+ }
+ if ("NIST_textInput_0003" in window) {
+ NIST_textInput_0003("tbl");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("vendor_endTest" in window) {
+ vendor_endTest();
+ }
+ }
+
+ //Function to report test result.
+
+ function w3c_reportResult() {
+ if ("vendor_reportResult" in window) {
+ vendor_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ //Function to be executed in reaction to textInput event.
+ function w3c_reactToTextInput() {
+ var evt = document.createEvent("TextEvent");
+ evt.initTextEvent("textinput", false, true, evt.view, "XXXXXXX");
+ var target = document.getElementById("tb1");
+ target.dispatchEvent(evt);
+ _actualResults = getActualResults(evt);
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getActualResults(evt)
+ {
+ var act = evt.type;
+ act += evt.bubbles;
+ act += evt.cancelable;
+ act += evt.data;
+ return act;
+ }
+ function getExpectedResults()
+ {
+ return "textinputfalsetrueXXXXXXX";
+ }
+
+ // Function to be executed in reaction to a textInput removal.
+ function w3c_reactToTextInputRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("textInput", w3c_reactToTextInput(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("textInput", w3c_reactToTextInputRemoval(), false);
+ }
+ }
+ </script>
+
+ <script type="text/javascript" src="vendor_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated textInput event over a table element</h3>
+ <table id="tb1">
+ <tr><td id="t1">Row 1, Cell 1</td><td id="t6">Row 1, Cell 2</td></tr>
+ <tr><td id="t2">Row 2, Cell 1</td><td id="t7">Row 2, Cell 2</td></tr>
+ <tr><td id="t3">Row 3, Cell 1</td><td id="t8">Row 3, Cell 2</td></tr>
+ <tr><td id="t4">Row 4, Cell 1</td><td id="t9">Row 4, Cell 2</td></tr>
+ <tr><td id="t5">Row 5, Cell 1</td><td id="t10">Row 5, Cell 2</td></tr>
+ </table>
+ <div id="result" class="not_yet_tested"></div>
+ </body>
+</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/textinput/NIST_textInput_0004.html Fri Mar 20 05:31:13 2009 +0900
@@ -0,0 +1,115 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_textInput_0004.html -->
+ <!-- Purpose - Evaluate a user generated mouseover event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+ <title>DOM Events API Test Suite - NIST_textInput_0004.html</title>
+
+ <style>
+ #result:after {
+ display: block;
+ }
+ .not_yet_tested:after {
+ background-color: yellow;
+ content: "Not yet tested";
+ }
+ .failed:after {
+ background-color: red;
+ content: "Failed";
+ }
+ .passed:after {
+ background-color: green;
+ content: "Passed";
+ }
+ </style>
+ <script type="text/javascript">
+ // Function to begin the test.
+ function w3c_beginTest() {
+ if ("vendor_beginTest" in window) {
+ vendor_beginTest();
+ }
+ if ("NIST_textInput_0004" in window) {
+ NIST_textInput_0004("tbl");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("vendor_endTest" in window) {
+ vendor_endTest();
+ }
+ }
+
+ //Function to report test result.
+
+ function w3c_reportResult() {
+ if ("vendor_reportResult" in window) {
+ vendor_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ //Function to be executed in reaction to textInput event.
+ function w3c_reactToTextInput() {
+ var evt = document.createEvent("TextEvent");
+ evt.initTextEvent("textinput", false, false, evt.view, "XXXXXXX");
+ var target = document.getElementById("tb1");
+ target.dispatchEvent(evt);
+ _actualResults = getActualResults(evt);
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getActualResults(evt)
+ {
+ var act = evt.type;
+ act += evt.bubbles;
+ act += evt.cancelable;
+ act += evt.data;
+ return act;
+ }
+ function getExpectedResults()
+ {
+ return "textinputfalsefalseXXXXXXX";
+ }
+
+ // Function to be executed in reaction to a textInput removal.
+ function w3c_reactToTextInputRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("textInput", w3c_reactToTextInput(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("textInput", w3c_reactToTextInputRemoval(), false);
+ }
+ }
+ </script>
+
+ <script type="text/javascript" src="vendor_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated textInput event over a table element</h3>
+ <table id="tb1">
+ <tr><td id="t1">Row 1, Cell 1</td><td id="t6">Row 1, Cell 2</td></tr>
+ <tr><td id="t2">Row 2, Cell 1</td><td id="t7">Row 2, Cell 2</td></tr>
+ <tr><td id="t3">Row 3, Cell 1</td><td id="t8">Row 3, Cell 2</td></tr>
+ <tr><td id="t4">Row 4, Cell 1</td><td id="t9">Row 4, Cell 2</td></tr>
+ <tr><td id="t5">Row 5, Cell 1</td><td id="t10">Row 5, Cell 2</td></tr>
+ </table>
+ <div id="result" class="not_yet_tested"></div>
+ </body>
+</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/textinput/NIST_textInput_0005.html Fri Mar 20 05:31:13 2009 +0900
@@ -0,0 +1,116 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_textInput_0005.html -->
+ <!-- Purpose - Evaluate a user generated mouseover event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+ <title>DOM Events API Test Suite - NIST_textInput_0005.html</title>
+
+ <style>
+ #result:after {
+ display: block;
+ }
+ .not_yet_tested:after {
+ background-color: yellow;
+ content: "Not yet tested";
+ }
+ .failed:after {
+ background-color: red;
+ content: "Failed";
+ }
+ .passed:after {
+ background-color: green;
+ content: "Passed";
+ }
+ </style>
+ <script type="text/javascript">
+ // Function to begin the test.
+ function w3c_beginTest() {
+ if ("vendor_beginTest" in window) {
+ vendor_beginTest();
+ }
+ if ("NIST_textInput_0005" in window) {
+ NIST_textInput_0005("tbl");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("vendor_endTest" in window) {
+ vendor_endTest();
+ }
+ }
+
+ //Function to report test result.
+
+ function w3c_reportResult() {
+ if ("vendor_reportResult" in window) {
+ vendor_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ //Function to be executed in reaction to textInput event.
+ function w3c_reactToTextInput() {
+ var evt = document.createEvent("TextEvent");
+ evt.initTextEventNS("www.example.org", "textinput", true, true, evt.view, "XXXXXXX");
+ var target = document.getElementById("tb1");
+ target.dispatchEvent(evt);
+ _actualResults = getActualResults(evt);
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getActualResults(evt)
+ {
+ var act = evt.namespaceURI;
+ act += evt.type;
+ act += evt.bubbles;
+ act += evt.cancelable;
+ act += evt.data;
+ return act;
+ }
+ function getExpectedResults()
+ {
+ return "www.example.orgtextinputtruetrueXXXXXXX";
+ }
+
+ // Function to be executed in reaction to a textInput removal.
+ function w3c_reactToTextInputRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("textInput", w3c_reactToTextInput(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("textInput", w3c_reactToTextInputRemoval(), false);
+ }
+ }
+ </script>
+
+ <script type="text/javascript" src="vendor_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated textInput event over a table element</h3>
+ <table id="tb1">
+ <tr><td id="t1">Row 1, Cell 1</td><td id="t6">Row 1, Cell 2</td></tr>
+ <tr><td id="t2">Row 2, Cell 1</td><td id="t7">Row 2, Cell 2</td></tr>
+ <tr><td id="t3">Row 3, Cell 1</td><td id="t8">Row 3, Cell 2</td></tr>
+ <tr><td id="t4">Row 4, Cell 1</td><td id="t9">Row 4, Cell 2</td></tr>
+ <tr><td id="t5">Row 5, Cell 1</td><td id="t10">Row 5, Cell 2</td></tr>
+ </table>
+ <div id="result" class="not_yet_tested"></div>
+ </body>
+</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/textinput/NIST_textInput_0006.html Fri Mar 20 05:31:13 2009 +0900
@@ -0,0 +1,116 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_textInput_0006.html -->
+ <!-- Purpose - Evaluate a user generated mouseover event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+ <title>DOM Events API Test Suite - NIST_textInput_0006.html</title>
+
+ <style>
+ #result:after {
+ display: block;
+ }
+ .not_yet_tested:after {
+ background-color: yellow;
+ content: "Not yet tested";
+ }
+ .failed:after {
+ background-color: red;
+ content: "Failed";
+ }
+ .passed:after {
+ background-color: green;
+ content: "Passed";
+ }
+ </style>
+ <script type="text/javascript">
+ // Function to begin the test.
+ function w3c_beginTest() {
+ if ("vendor_beginTest" in window) {
+ vendor_beginTest();
+ }
+ if ("NIST_textInput_0006" in window) {
+ NIST_textInput_0006("tbl");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("vendor_endTest" in window) {
+ vendor_endTest();
+ }
+ }
+
+ //Function to report test result.
+
+ function w3c_reportResult() {
+ if ("vendor_reportResult" in window) {
+ vendor_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ //Function to be executed in reaction to textInput event.
+ function w3c_reactToTextInput() {
+ var evt = document.createEvent("TextEvent");
+ evt.initTextEventNS("www.example.org", "textinput", true, false, evt.view, "XXXXXXX");
+ var target = document.getElementById("tb1");
+ target.dispatchEvent(evt);
+ _actualResults = getActualResults(evt);
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getActualResults(evt)
+ {
+ var act = evt.namespaceURI;
+ act += evt.type;
+ act += evt.bubbles;
+ act += evt.cancelable;
+ act += evt.data;
+ return act;
+ }
+ function getExpectedResults()
+ {
+ return "www.example.orgtextinputtruefalseXXXXXXX";
+ }
+
+ // Function to be executed in reaction to a textInput removal.
+ function w3c_reactToTextInputRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("textInput", w3c_reactToTextInput(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("textInput", w3c_reactToTextInputRemoval(), false);
+ }
+ }
+ </script>
+
+ <script type="text/javascript" src="vendor_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated textInput event over a table element</h3>
+ <table id="tb1">
+ <tr><td id="t1">Row 1, Cell 1</td><td id="t6">Row 1, Cell 2</td></tr>
+ <tr><td id="t2">Row 2, Cell 1</td><td id="t7">Row 2, Cell 2</td></tr>
+ <tr><td id="t3">Row 3, Cell 1</td><td id="t8">Row 3, Cell 2</td></tr>
+ <tr><td id="t4">Row 4, Cell 1</td><td id="t9">Row 4, Cell 2</td></tr>
+ <tr><td id="t5">Row 5, Cell 1</td><td id="t10">Row 5, Cell 2</td></tr>
+ </table>
+ <div id="result" class="not_yet_tested"></div>
+ </body>
+</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/textinput/NIST_textInput_0007.html Fri Mar 20 05:31:13 2009 +0900
@@ -0,0 +1,116 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_textInput_0007.html -->
+ <!-- Purpose - Evaluate a user generated mouseover event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+ <title>DOM Events API Test Suite - NIST_textInput_0007.html</title>
+
+ <style>
+ #result:after {
+ display: block;
+ }
+ .not_yet_tested:after {
+ background-color: yellow;
+ content: "Not yet tested";
+ }
+ .failed:after {
+ background-color: red;
+ content: "Failed";
+ }
+ .passed:after {
+ background-color: green;
+ content: "Passed";
+ }
+ </style>
+ <script type="text/javascript">
+ // Function to begin the test.
+ function w3c_beginTest() {
+ if ("vendor_beginTest" in window) {
+ vendor_beginTest();
+ }
+ if ("NIST_textInput_0007" in window) {
+ NIST_textInput_0007("tbl");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("vendor_endTest" in window) {
+ vendor_endTest();
+ }
+ }
+
+ //Function to report test result.
+
+ function w3c_reportResult() {
+ if ("vendor_reportResult" in window) {
+ vendor_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ //Function to be executed in reaction to textInput event.
+ function w3c_reactToTextInput() {
+ var evt = document.createEvent("TextEvent");
+ evt.initTextEventNS("www.example.org", "textinput", false, true, evt.view, "XXXXXXX");
+ var target = document.getElementById("tb1");
+ target.dispatchEvent(evt);
+ _actualResults = getActualResults(evt);
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getActualResults(evt)
+ {
+ var act = evt.namespaceURI;
+ act += evt.type;
+ act += evt.bubbles;
+ act += evt.cancelable;
+ act += evt.data;
+ return act;
+ }
+ function getExpectedResults()
+ {
+ return "www.example.orgtextinputfalsetrueXXXXXXX";
+ }
+
+ // Function to be executed in reaction to a textInput removal.
+ function w3c_reactToTextInputRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("textInput", w3c_reactToTextInput(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("textInput", w3c_reactToTextInputRemoval(), false);
+ }
+ }
+ </script>
+
+ <script type="text/javascript" src="vendor_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated textInput event over a table element</h3>
+ <table id="tb1">
+ <tr><td id="t1">Row 1, Cell 1</td><td id="t6">Row 1, Cell 2</td></tr>
+ <tr><td id="t2">Row 2, Cell 1</td><td id="t7">Row 2, Cell 2</td></tr>
+ <tr><td id="t3">Row 3, Cell 1</td><td id="t8">Row 3, Cell 2</td></tr>
+ <tr><td id="t4">Row 4, Cell 1</td><td id="t9">Row 4, Cell 2</td></tr>
+ <tr><td id="t5">Row 5, Cell 1</td><td id="t10">Row 5, Cell 2</td></tr>
+ </table>
+ <div id="result" class="not_yet_tested"></div>
+ </body>
+</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/textinput/NIST_textInput_0008.html Fri Mar 20 05:31:13 2009 +0900
@@ -0,0 +1,116 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_textInput_0008.html -->
+ <!-- Purpose - Evaluate a user generated mouseover event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+ <title>DOM Events API Test Suite - NIST_textInput_0008.html</title>
+
+ <style>
+ #result:after {
+ display: block;
+ }
+ .not_yet_tested:after {
+ background-color: yellow;
+ content: "Not yet tested";
+ }
+ .failed:after {
+ background-color: red;
+ content: "Failed";
+ }
+ .passed:after {
+ background-color: green;
+ content: "Passed";
+ }
+ </style>
+ <script type="text/javascript">
+ // Function to begin the test.
+ function w3c_beginTest() {
+ if ("vendor_beginTest" in window) {
+ vendor_beginTest();
+ }
+ if ("NIST_textInput_0008" in window) {
+ NIST_textInput_0008("tbl");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("vendor_endTest" in window) {
+ vendor_endTest();
+ }
+ }
+
+ //Function to report test result.
+
+ function w3c_reportResult() {
+ if ("vendor_reportResult" in window) {
+ vendor_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ //Function to be executed in reaction to textInput event.
+ function w3c_reactToTextInput() {
+ var evt = document.createEvent("TextEvent");
+ evt.initTextEventNS("www.example.org", "textinput", false, false, evt.view, "XXXXXXX");
+ var target = document.getElementById("tb1");
+ target.dispatchEvent(evt);
+ _actualResults = getActualResults(evt);
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getActualResults(evt)
+ {
+ var act = evt.namespaceURI;
+ act += evt.type;
+ act += evt.bubbles;
+ act += evt.cancelable;
+ act += evt.data;
+ return act;
+ }
+ function getExpectedResults()
+ {
+ return "www.example.orgtextinputfalsefalseXXXXXXX";
+ }
+
+ // Function to be executed in reaction to a textInput removal.
+ function w3c_reactToTextInputRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("textInput", w3c_reactToTextInput(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("textInput", w3c_reactToTextInputRemoval(), false);
+ }
+ }
+ </script>
+
+ <script type="text/javascript" src="vendor_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated textInput event over a table element</h3>
+ <table id="tb1">
+ <tr><td id="t1">Row 1, Cell 1</td><td id="t6">Row 1, Cell 2</td></tr>
+ <tr><td id="t2">Row 2, Cell 1</td><td id="t7">Row 2, Cell 2</td></tr>
+ <tr><td id="t3">Row 3, Cell 1</td><td id="t8">Row 3, Cell 2</td></tr>
+ <tr><td id="t4">Row 4, Cell 1</td><td id="t9">Row 4, Cell 2</td></tr>
+ <tr><td id="t5">Row 5, Cell 1</td><td id="t10">Row 5, Cell 2</td></tr>
+ </table>
+ <div id="result" class="not_yet_tested"></div>
+ </body>
+</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/textinput/vendor_functions.js Fri Mar 20 05:31:13 2009 +0900
@@ -0,0 +1,10 @@
+var _actualResults = "actual";
+var _expectedResults = "expected";
+
+function vendor_reportResult()
+{
+ if (_actualResults == _expectedResults)
+ document.getElementById("result").setAttribute("class", "passed");
+ else
+ document.getElementById("result").setAttribute("class", "failed");
+}
\ No newline at end of file