summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/hasFeature.feature.string.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/hasFeature.feature.string.html')
-rw-r--r--testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/hasFeature.feature.string.html80
1 files changed, 80 insertions, 0 deletions
diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/hasFeature.feature.string.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/hasFeature.feature.string.html
new file mode 100644
index 000000000..e96c39c85
--- /dev/null
+++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/hasFeature.feature.string.html
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <title id='desc'> DOMImplementation.hasFeature() and Extended Feature String </title>
+ <script type="text/javascript">
+ var PassTest = function()
+ {
+ document.getElementById("testresult").firstChild.data = "PASS";
+ }
+
+ var FailTest = function()
+ {
+ document.getElementById("testresult").firstChild.data = "FAIL";
+ }
+
+ var szFeatures = ["Event", "UIEvent","FocusEvent","MouseEvent","WheelEvent","TextEvent",
+ "KeyboardEvent","CompositionEvent","MutationEvent","CustomEvent"];
+
+ var ExpectResult = [];
+ var ActualResult = [];
+ var supported = false;
+
+ window.onload = function()
+ {
+ try
+ {
+ supported = document.implementation.hasFeature("Events", "3.0");
+
+ for (var i=0; i<szFeatures.length; i++)
+ {
+ var szFeature = szFeatures[i];
+
+ supported = document.implementation.hasFeature(szFeature, "3.0") && supported;
+ supported = document.implementation.hasFeature(szFeature, "") && supported;
+ if (!supported)
+ {
+ break;
+ }
+ }
+
+ for (var i=0; i<szFeatures.length; i++)
+ {
+ var szFeature = "Events." + szFeatures[i];
+
+ supported = document.implementation.hasFeature(szFeature, "3.0") && supported;
+ supported = document.implementation.hasFeature(szFeature, "") && supported;
+ if (!supported)
+ {
+ break;
+ }
+ }
+
+ if (supported)
+ {
+ PassTest();
+ }
+ else
+ {
+ FailTest();
+ }
+ }
+ catch(ex)
+ {
+ FailTest();
+ }
+ }
+ </script>
+ </head>
+ <body>
+ <h3>DOM Events</h3>
+ <h4>
+ Test Description: each interface defined in DOM Level 3 Events has a feature string,
+ which may act as a base feature string or as an extended feature string.
+ </h4>
+
+ <p>Test passes if the word "PASS" appears below.</p>
+ <div>Test result: </div>
+ <div id='testresult'>FAIL</div>
+ </body>
+</html> \ No newline at end of file