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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/html/semantics/embedded-content/the-iframe-element/iframe_harness.js

Issue 2086283003: Update web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into wpt_import Created 4 years, 6 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: third_party/WebKit/LayoutTests/imported/wpt/html/semantics/embedded-content/the-iframe-element/iframe_harness.js
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/embedded-content/the-iframe-element/iframe_harness.js b/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/embedded-content/the-iframe-element/iframe_harness.js
new file mode 100644
index 0000000000000000000000000000000000000000..f4ef511d1de2f21cac5e968ea493251d0f28284a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/embedded-content/the-iframe-element/iframe_harness.js
@@ -0,0 +1,26 @@
+function get_test_results(id) {
+ async_test(function(test) {
+ var timer = window.setInterval(test.step_func(loop), 100);
+ function loop() {
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', 'stash.py?id=' + id);
+ xhr.onreadystatechange = test.step_func(function() {
+ assert_equals(xhr.status, 200);
+ if (xhr.responseText) {
+ assert_equals(xhr.responseText, "OK");
+ test.done();
+ window.clearTimeout(timer);
+ }
+ });
+ xhr.send();
+ }
+ });
+}
+
+function send_test_results(results) {
+ var ok = true;
+ for (result in results) { ok = ok && results[result]; }
+ var xhr = new XMLHttpRequest();
+ xhr.open('POST', 'stash.py?id=' + results.id);
+ xhr.send(ok ? "OK" : "FAIL: " + JSON.stringify(results));
+}

Powered by Google App Engine
This is Rietveld 408576698