summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/ProcessingInstruction.DOMCharacterDataModified.xml
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/ProcessingInstruction.DOMCharacterDataModified.xml')
-rw-r--r--testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/ProcessingInstruction.DOMCharacterDataModified.xml63
1 files changed, 63 insertions, 0 deletions
diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/ProcessingInstruction.DOMCharacterDataModified.xml b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/ProcessingInstruction.DOMCharacterDataModified.xml
new file mode 100644
index 0000000000..34ad59064f
--- /dev/null
+++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/ProcessingInstruction.DOMCharacterDataModified.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<root>
+ <head xmlns="http://www.w3.org/1999/xhtml">
+ <title> ProcessingInstruction.data and DOMCharacterDataModified event </title>
+ </head>
+
+ <p xmlns="http://www.w3.org/1999/xhtml">
+ <h3>DOM Events</h3>
+ <h4>
+ Test Description: DOMCharacterDataModified event fires after ProcessingInstruction.data have been modified,
+ but the node itself has not been inserted or deleted. The proximal event target of this event shall be the
+ ProcessingInstruction node.
+ </h4>
+
+ <pi><?foo bar?></pi>
+
+ <p>Test passes if the word "PASS" appears below.</p>
+ <div>Test result: </div>
+ <div><testresult>FAIL</testresult></div>
+
+ <script type="text/javascript" xmlns="http://www.w3.org/1999/xhtml">
+ <![CDATA[
+ var PassTest = function()
+ {
+ document.getElementsByTagName("testresult")[0].firstChild.data = "PASS";
+ TestResult = true;
+ }
+
+ var FailTest = function()
+ {
+ document.getElementsByTagName("testresult")[0].firstChild.data = "FAIL";
+ TestResult = false;
+ }
+
+ var EVENT = "DOMCharacterDataModified";
+ var TARGET = document.getElementsByTagName('pi')[0].firstChild;
+ var TestResult = false;
+
+ try
+ {
+ TARGET.addEventListener(EVENT, TestEvent, false);
+ TARGET.data = "new" + TARGET.data;
+ }
+ catch(ex)
+ {
+ FailTest();
+ }
+
+ function TestEvent(evt)
+ {
+ if ((EVENT == evt.type) && (TARGET == evt.target) && ("newbar" == evt.newValue))
+ {
+ PassTest();
+ }
+ else
+ {
+ FailTest();
+ }
+ }
+ ]]>
+ </script>
+ </p>
+</root> \ No newline at end of file