Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: LayoutTests/fast/xsl/resources/test-xslt.js

Issue 365873002: Implement a part of ProcessingInstruction by using PrivateScript (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: WIP: async XHR, rewriting layout tests Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/xsl/resources/test-xslt.js
diff --git a/LayoutTests/fast/xsl/resources/test-xslt.js b/LayoutTests/fast/xsl/resources/test-xslt.js
new file mode 100644
index 0000000000000000000000000000000000000000..ea2fd1eed00c329b70a44f96d70b3708373f3f3a
--- /dev/null
+++ b/LayoutTests/fast/xsl/resources/test-xslt.js
@@ -0,0 +1,27 @@
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+var _NUM_RETRIES = 10;
+var _TIMEOUT = 200;
+
+function waitXSLTransform(iframe, callback) {
+ var oldDocument = iframe.contentDocument;
+ var retry = _NUM_RETRIES;
+
+ function waitXSLTransformInternal() {
+ if (--retry && oldDocument == iframe.contentDocument)
+ setTimeout(waitXSLTransformInternal, _TIMEOUT);
+
+ callback();
+ if (window.testRunner)
+ testRunner.notifyDone();
+ };
+ setTimeout(waitXSLTransformInternal, _TIMEOUT);
+}
+
+function runTest(url) {
+ var iframe = document.createElement('iframe');
+ iframe.src = url;
+ document.body.appendChild(iframe);
+ waitXSLTransform(iframe, function() {});
+};
« no previous file with comments | « LayoutTests/fast/xsl/resources/sort-unicode.xsl ('k') | LayoutTests/fast/xsl/resources/transform-to-html.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698