--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/click/NIST_click_001.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_click-001 -->
+ <!-- Purpose - Evaluate a simulated click event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_click_001</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_click_001" in window) {
+ NIST_click_001("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to click event.
+ function w3c_reactToClick() {
+ var evt = document.createEvent("MouseEvent");
+ evt.initMouseEvent("click", true, true, window,
+ 0, 5, 0, 0, 0, true, true, true, true, 0, null);
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.screenX;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ return 5;
+ }
+
+ // Function to be executed in reaction to a click removal.
+ function w3c_reactToClickRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("click", w3c_reactToClick(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("click", w3c_reactToClickRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated click 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/click/NIST_click_002.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,106 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_click-002 -->
+ <!-- Purpose - Evaluate a simulated click event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_click_002</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_click_002" in window) {
+ NIST_click_002("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to click event.
+ function w3c_reactToClick() {
+ var evt = document.createEvent("MouseEvent");
+ evt.initMouseEvent("click", true, true, window,
+ 0, 0, 5, 0, 0, true, true, true, true, 0, null);
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+
+ _actualResults = evt.screenX;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ return -5;
+ }
+
+ // Function to be executed in reaction to a click removal.
+ function w3c_reactToClickRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener){
+ e1.addEventListener("click", w3c_reactToClick(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("click", w3c_reactToClickRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated click 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/click/NIST_functions.js Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,10 @@
+var _actualResults = "actual";
+var _expectedResults = "expected";
+
+function NIST_reportResult()
+{
+ if (_actualResults == _expectedResults)
+ document.getElementById("result").setAttribute("class", "passed");
+ else
+ document.getElementById("result").setAttribute("class", "failed");
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/dbclick/NIST_dblclick_001.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_dblclick-001 -->
+ <!-- Purpose - Evaluate a simulated dblclick event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_dblclick_001</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_dblclick_001" in window) {
+ NIST_dblclick_001("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to dblclick event.
+ function w3c_reactToDblClick() {
+ var evt = document.createEvent("MouseEvent");
+ evt.initMouseEvent("dblclick", true, true, window,
+ 0, 5, 0, 0, 0, true, true, true, true, 0, null);
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.screenX;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ return 5;
+ }
+
+ // Function to be executed in reaction to a dblclick removal.
+ function w3c_reactToDblClickRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("dblclick", w3c_reactToDblClick(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("dblclick", w3c_reactToDblClickRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated dblclick 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/dbclick/NIST_dblclick_002.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_dblclick-001 -->
+ <!-- Purpose - Evaluate a simulated dblclick event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_dblclick_001</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_dblclick_001" in window) {
+ NIST_dblclick_001("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to dblclick event.
+ function w3c_reactToDblClick() {
+ var evt = document.createEvent("MouseEvent");
+ evt.initMouseEvent("dblclick", true, true, window,
+ 0, -5, 0, 0, 0, true, true, true, true, 0, null);
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.screenX;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ return -5;
+ }
+
+ // Function to be executed in reaction to a dblclick removal.
+ function w3c_reactToDblClickRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("dblclick", w3c_reactToDblClick(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("dblclick", w3c_reactToDblClickRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated dblclick 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/dbclick/NIST_functions.js Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,10 @@
+var _actualResults = "actual";
+var _expectedResults = "expected";
+
+function NIST_reportResult()
+{
+ if (_actualResults == _expectedResults)
+ document.getElementById("result").setAttribute("class", "passed");
+ else
+ document.getElementById("result").setAttribute("class", "failed");
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/keydown/NIST_functions.js Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,10 @@
+var _actualResults = "actual";
+var _expectedResults = "expected";
+
+function NIST_reportResult()
+{
+ if (_actualResults == _expectedResults)
+ document.getElementById("result").setAttribute("class", "passed");
+ else
+ document.getElementById("result").setAttribute("class", "failed");
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/keydown/NIST_keydown_001.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,106 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_keydown_001 -->
+ <!-- Purpose - Evaluate a simulated keydown event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_keydown_001</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_keydown_001" in window) {
+ NIST_keydown_001("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to keydown event.
+ function w3c_reactToKeyDown() {
+ var evt = document.createEvent("KeyboardEvent");
+ evt.initKeyboardEvent("keydown", true, true, window,
+ "Alt", 0, "Control");
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.keyIdentifier;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ var result = "Alt";
+ return result;
+ }
+
+ // Function to be executed in reaction to a keydown removal.
+ function w3c_reactToKeyDownRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("keydown", w3c_reactToKeyDown(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("keydown", w3c_reactToKeyDownRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated keydown 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/keydown/NIST_keydown_002.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,106 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_keydown_002 -->
+ <!-- Purpose - Evaluate a simulated keydown event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_keydown_002</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_keydown_002" in window) {
+ NIST_keydown_002("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to keydown event.
+ function w3c_reactToKeyDown() {
+ var evt = document.createEvent("KeyboardEvent");
+ evt.initKeyboardEvent("keydown", true, true, window,
+ "Control", 0, "Control");
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.keyIdentifier;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ var result = "Control";
+ return result;
+ }
+
+ // Function to be executed in reaction to a keydown removal.
+ function w3c_reactToKeyDownRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("keydown", w3c_reactToKeyDown(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("keydown", w3c_reactToKeyDownRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated keydown 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/keyup/NIST_functions.js Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,10 @@
+var _actualResults = "actual";
+var _expectedResults = "expected";
+
+function NIST_reportResult()
+{
+ if (_actualResults == _expectedResults)
+ document.getElementById("result").setAttribute("class", "passed");
+ else
+ document.getElementById("result").setAttribute("class", "failed");
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/keyup/NIST_keyup_001.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,106 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_keyup_001 -->
+ <!-- Purpose - Evaluate a simulated keyup event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_keyup_001</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_keyup_001" in window) {
+ NIST_keyup_001("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to keyup event.
+ function w3c_reactToKeyUp() {
+ var evt = document.createEvent("KeyboardEvent");
+ evt.initKeyboardEvent("keyup", true, true, window,
+ "Alt", 0, "Control");
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.keyIdentifier;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ var result = "Alt";
+ return result;
+ }
+
+ // Function to be executed in reaction to a keyup removal.
+ function w3c_reactToKeyUpRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("keyup", w3c_reactToKeyUp(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("keyup", w3c_reactToKeyUpRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated keyup 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/keyup/NIST_keyup_002.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,106 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_keyup_002 -->
+ <!-- Purpose - Evaluate a simulated keyup event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_keyup_002</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_keyup_002" in window) {
+ NIST_keyup_002("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to keyup event.
+ function w3c_reactToKeyUp() {
+ var evt = document.createEvent("KeyboardEvent");
+ evt.initKeyboardEvent("keyup", true, true, window,
+ "Control", 0, "Control");
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.keyIdentifier;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ var result = "Control";
+ return result;
+ }
+
+ // Function to be executed in reaction to a keyup removal.
+ function w3c_reactToKeyUpRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("keyup", w3c_reactToKeyUp(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("keyup", w3c_reactToKeyUpRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated keyup 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mousedown/NIST_functions.js Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,10 @@
+var _actualResults = "actual";
+var _expectedResults = "expected";
+
+function NIST_reportResult()
+{
+ if (_actualResults == _expectedResults)
+ document.getElementById("result").setAttribute("class", "passed");
+ else
+ document.getElementById("result").setAttribute("class", "failed");
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mousedown/NIST_mousedown_001.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_mousedown-001 -->
+ <!-- Purpose - Evaluate a simulated mousedown event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_mousedown_001</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_mousedown_001" in window) {
+ NIST_mousedown_001("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to mousedown event.
+ function w3c_reactToMouseDown() {
+ var evt = document.createEvent("MouseEvent");
+ evt.initMouseEvent("mousedown", true, true, window,
+ 0, 5, 0, 0, 0, true, true, true, true, 0, null);
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.screenX;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ return 5;
+ }
+
+ // Function to be executed in reaction to a mousedown removal.
+ function w3c_reactToMouseDownRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("mousedown", w3c_reactToMouseDown(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("mousedown", w3c_reactToMouseDownRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated mousedown 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mousedown/NIST_mousedown_002.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_mousedown-002 -->
+ <!-- Purpose - Evaluate a simulated mousedown event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_mousedown_002</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_mousedown_002" in window) {
+ NIST_mousedown_002("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to mousedown event.
+ function w3c_reactToMouseDown() {
+ var evt = document.createEvent("MouseEvent");
+ evt.initMouseEvent("mousedown", true, true, window,
+ 0, 5, 0, 0, 0, true, true, true, true, 0, null);
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.screenX;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ return 5;
+ }
+
+ // Function to be executed in reaction to a mousedown removal.
+ function w3c_reactToMouseDownRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("mousedown", w3c_reactToMouseDown(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("mousedown", w3c_reactToMouseDownRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated mousedown 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mousemove/NIST_functions.js Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,10 @@
+var _actualResults = "actual";
+var _expectedResults = "expected";
+
+function NIST_reportResult()
+{
+ if (_actualResults == _expectedResults)
+ document.getElementById("result").setAttribute("class", "passed");
+ else
+ document.getElementById("result").setAttribute("class", "failed");
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mousemove/NIST_mousemove-001.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_mousemove-001 -->
+ <!-- Purpose - Evaluate a simulated mousemove event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_mousemove_001</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_mousemove_001" in window) {
+ NIST_mousemove_001("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to mousemove event.
+ function w3c_reactToMouseMove() {
+ var evt = document.createEvent("MouseEvent");
+ evt.initMouseEvent("mousemove", true, true, window,
+ 0, 5, 0, 0, 0, true, true, true, true, 0, null);
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.screenX;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ return 5;
+ }
+
+ // Function to be executed in reaction to a mousemove removal.
+ function w3c_reactToMouseMoveRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("mousemove", w3c_reactToMouseMove(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("mousemove", w3c_reactToMouseMoveRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated mousemove 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mousemove/NIST_mousemove-002.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_mousemove-002 -->
+ <!-- Purpose - Evaluate a simulated mousemove event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_mousemove_002</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_mousemove_002" in window) {
+ NIST_mousemove_002("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to mousemove event.
+ function w3c_reactToMouseMove() {
+ var evt = document.createEvent("MouseEvent");
+ evt.initMouseEvent("mousemove", true, true, window,
+ 0, -5, 0, 0, 0, true, true, true, true, 0, null);
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.screenX;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ return -5;
+ }
+
+ // Function to be executed in reaction to a mousemove removal.
+ function w3c_reactToMouseMoveRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("mousemove", w3c_reactToMouseMove(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("mousemove", w3c_reactToMouseMoveRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated mousemove 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mouseout/NIST_functions.js Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,10 @@
+var _actualResults = "actual";
+var _expectedResults = "expected";
+
+function NIST_reportResult()
+{
+ if (_actualResults == _expectedResults)
+ document.getElementById("result").setAttribute("class", "passed");
+ else
+ document.getElementById("result").setAttribute("class", "failed");
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mouseout/NIST_mouseout_001.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_mouseout_001 -->
+ <!-- Purpose - Evaluate a simulated mouseout event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_mouseout_001</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_mouseout_001" in window) {
+ NIST_mouseout_001("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to mouseout event.
+ function w3c_reactToMouseOut() {
+ var evt = document.createEvent("MouseEvent");
+ evt.initMouseEvent("mouseout", true, true, window,
+ 0, 5, 0, 0, 0, true, true, true, true, 0, null);
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.screenX;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ return 5;
+ }
+
+ // Function to be executed in reaction to a mouseout removal.
+ function w3c_reactToMouseOutRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("mouseout", w3c_reactToMouseOut(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("mouseout", w3c_reactToMouseOutRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated mouseout 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mouseout/NIST_mouseout_002.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_mouseout_002 -->
+ <!-- Purpose - Evaluate a simulated mouseout event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_mouseout_002</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_mouseout_002" in window) {
+ NIST_mouseout_002("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to mouseout event.
+ function w3c_reactToMouseOut() {
+ var evt = document.createEvent("MouseEvent");
+ evt.initMouseEvent("mouseout", true, true, window,
+ 0, -5, 0, 0, 0, true, true, true, true, 0, null);
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.screenX;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ return -5;
+ }
+
+ // Function to be executed in reaction to a mouseout removal.
+ function w3c_reactToMouseOutRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("mouseout", w3c_reactToMouseOut(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("mouseout", w3c_reactToMouseOutRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated mouseout 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mouseover/NIST_functions.js Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,10 @@
+var _actualResults = "actual";
+var _expectedResults = "expected";
+
+function NIST_reportResult()
+{
+ if (_actualResults == _expectedResults)
+ document.getElementById("result").setAttribute("class", "passed");
+ else
+ document.getElementById("result").setAttribute("class", "failed");
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mouseover/NIST_mouseover_001.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_mouseover-001 -->
+ <!-- Purpose - Evaluate a simulated 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_mouseover_001</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_mouseover_001" in window) {
+ NIST_mouseover_001("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to mouseover event.
+ function w3c_reactToMouseOver() {
+ var evt = document.createEvent("MouseEvent");
+ evt.initMouseEvent("mouseover", true, true, window,
+ 0, 5, 0, 0, 0, true, true, true, true, 0, null);
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.screenX;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ return 5;
+ }
+
+ // Function to be executed in reaction to a mouseover removal.
+ function w3c_reactToMouseOverRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("mouseover", w3c_reactToMouseOver(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("mouseover", w3c_reactToMouseOverRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated mouseover 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mouseover/NIST_mouseover_002.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_mouseover-002 -->
+ <!-- Purpose - Evaluate a simulated 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_mouseover_002</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_mouseover_002" in window) {
+ NIST_mouseover_002("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to mouseover event.
+ function w3c_reactToMouseOver() {
+ var evt = document.createEvent("MouseEvent");
+ evt.initMouseEvent("mouseover", true, true, window,
+ 0, -5, 0, 0, 0, true, true, true, true, 0, null);
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.screenX;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ return -5;
+ }
+
+ // Function to be executed in reaction to a mouseover removal.
+ function w3c_reactToMouseOverRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("mouseover", w3c_reactToMouseOver(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("mouseover", w3c_reactToMouseOverRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated mouseover 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mouseup/NIST_functions.js Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,10 @@
+var _actualResults = "actual";
+var _expectedResults = "expected";
+
+function NIST_reportResult()
+{
+ if (_actualResults == _expectedResults)
+ document.getElementById("result").setAttribute("class", "passed");
+ else
+ document.getElementById("result").setAttribute("class", "failed");
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mouseup/NIST_mouseup-002.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_mouseup-002 -->
+ <!-- Purpose - Evaluate a simulated mouseup event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_mouseup_002</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_mouseup_002" in window) {
+ NIST_mouseup_002("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to mouseup event.
+ function w3c_reactToMouseUp() {
+ var evt = document.createEvent("MouseEvent");
+ evt.initMouseEvent("mouseup", true, true, window,
+ 0, -5, 0, 0, 0, true, true, true, true, 0, null);
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.screenX;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ return -5;
+ }
+
+ // Function to be executed in reaction to a mouseup removal.
+ function w3c_reactToMouseUpRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("mouseup", w3c_reactToMouseUp(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("mouseup", w3c_reactToMouseUpRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated mouseup 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mouseup/NIST_mouseup_001.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_mouseup-001 -->
+ <!-- Purpose - Evaluate a simulated mouseup event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_mouseup_001</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_mouseup_001" in window) {
+ NIST_mouseup_001("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult() {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to mouseup event.
+ function w3c_reactToMouseUp() {
+ var evt = document.createEvent("MouseEvent");
+ evt.initMouseEvent("mouseup", true, true, window,
+ 0, 5, 0, 0, 0, true, true, true, true, 0, null);
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.screenX;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ return 5;
+ }
+
+ // Function to be executed in reaction to a mouseup removal.
+ function w3c_reactToMouseUpRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("mouseup", w3c_reactToMouseUp(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("mouseup", w3c_reactToMouseUpRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated mouseup 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mousewheel/NIST_functions.js Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,10 @@
+var _actualResults = "actual";
+var _expectedResults = "expected";
+
+function NIST_reportResult()
+{
+ if (_actualResults == _expectedResults)
+ document.getElementById("result").setAttribute("class", "passed");
+ else
+ document.getElementById("result").setAttribute("class", "failed");
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mousewheel/NIST_mousewheel_001.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_mousewheel-001 -->
+ <!-- Purpose - Evaluate a simulated mousewheel event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_mousewheel_001</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_mousewheel_001" in window) {
+ NIST_mousewheel_001("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult(passed) {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to mousewheel event.
+ function w3c_reactToMouseWheel() {
+ var evt = document.createEvent("MouseWheelEvent");
+ evt.initMouseWheelEventNS("www.example.com", "mousewheel", true, true, window,
+ 0, 5, 0, 0, 0, 0, null, null, 0);
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.wheelDelta;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ return 5;
+ }
+
+ // Function to be executed in reaction to a mousewheel removal.
+ function w3c_reactToWheelRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("mousewheel", w3c_reactToMouseWheel(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("mousewheel", w3c_reactToMouseWheelRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated mousewheel 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>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/framework/mousewheel/NIST_mousewheel_002.html Fri Sep 26 23:33:07 2008 +0900
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <!-- Test Name: NIST_mousewheel-002 -->
+ <!-- Purpose - Evaluate a simulated mousewheel event over a table element -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>DOM Events API Test Suite - NIST_mousewheel_002</title>
+ <style type="text/css">
+ #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 ("NIST_beginTest" in window) {
+ NIST_beginTest();
+ }
+ if ("NIST_mousewheel_002" in window) {
+ NIST_mousewheel_002("tb1");
+ }
+ w3c_addEventListener();
+ }
+
+ // Function to end the test.
+ function w3c_endTest() {
+ if ("NIST_endTest" in window) {
+ NIST_endTest();
+ }
+ }
+
+ // Function to report test result.
+
+ function w3c_reportResult(passed) {
+ if ("NIST_reportResult" in window) {
+ NIST_reportResult();
+ }
+ w3c_endTest();
+ }
+
+ // Function to be executed in reaction to mousewheel event.
+ function w3c_reactToMouseWheel() {
+ var evt = document.createEvent("MouseWheelEvent");
+ evt.initWheelEvent("mousewheel", true, true, window,
+ 0, -5, 0, 0, 0, 0, null, null, 0);
+ var target = document.getElementById(id);
+ target.dispatchEvent(evt);
+ _actualResults = evt.wheelDelta;
+ _expectedResults = getExpectedResults();
+ w3c_removeEventListener();
+ w3c_reportResult();
+ }
+
+ function getExpectedResults()
+ {
+ return -5;
+ }
+
+ // Function to be executed in reaction to a mousewheel removal.
+ function w3c_reactToWheelRemoval() {
+ }
+
+ // Function to add a listener to the element.
+ function w3c_addEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.addEventListener) {
+ e1.addEventListener("mousewheel", w3c_reactToMouseWheel(), false);
+ }
+ }
+
+ // Function to remove a listener from the element.
+ function w3c_removeEventListener() {
+ var e1 = document.getElementById("tb1");
+ if (document.removeEventListener) {
+ e1.removeEventListener("mousewheel", w3c_reactToMouseWheelRemoval(), false);
+ }
+ }
+ </script>
+ <script type="text/javascript" src="NIST_functions.js"></script>
+ </head>
+ <body onload="w3c_beginTest();">
+ <h3>Evaluate a simulated mousewheel 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>
\ No newline at end of file