Skip to content

Instantly share code, notes, and snippets.

@vivekgalatage
Created October 1, 2013 05:09
Show Gist options
  • Save vivekgalatage/6774104 to your computer and use it in GitHub Desktop.
Save vivekgalatage/6774104 to your computer and use it in GitHub Desktop.
Adding runtime enabled flag check for XSLTProcessor in relevant layout tests.
diff --git a/LayoutTests/fast/xsl/xslt-processor.html b/LayoutTests/fast/xsl/xslt-processor.html
index 2bd7a4e..021dcf6 100644
--- a/LayoutTests/fast/xsl/xslt-processor.html
+++ b/LayoutTests/fast/xsl/xslt-processor.html
@@ -7,12 +7,17 @@ span { font-weight: bold }
.failure { color: red; }
</STYLE>
</head>
-<body id="body">
+<body id="body" onload="runTest();">
<script>
+function runTest()
+{
if (window.testRunner)
testRunner.dumpAsText();
+if (!internals.runtimeFlags.xsltEnabled)
+ return;
+
var requester = new XMLHttpRequest();
var processor = new XSLTProcessor();
var serializer = new XMLSerializer();
@@ -266,7 +271,7 @@ addResultExpectValue(testname, processor.getParameter("foo", "foo"), "Success");
processor.setParameter(undefined, "test", "testValue");
processor.removeParameter(undefined, "test");
-var testname = "verify removeParameter actually removes using undefined namespace";
+var testname = "verify removeParameter actually removes using undefined namespace";
addResultExpectValue(testname, processor.getParameter(null, "test"), undefined);
// 6.3 pass removeParameter undefined name
@@ -314,7 +319,7 @@ addResultExpectValue(testname, processor.getParameter(null, "test"), undefined);
var testname = "verify that stylesheet has been cleared";
var resultDocument = processor.transformToDocument(xml);
addResultExpectValueWhenSerialized(testname, resultDocument, undefined);
-
+}
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment