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

Unified Diff: LayoutTests/resources/testharnessreport.js

Issue 1159053005: W3C Test: import web-platform-tests/html/{introduction,obsolete} (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/resources/testharnessreport.js
diff --git a/LayoutTests/resources/testharnessreport.js b/LayoutTests/resources/testharnessreport.js
index 6e35da5ae1715880635e00aab9953c2dfa84b657..4ef8b70f334d49351eddd706ea87772f1f7588f3 100644
--- a/LayoutTests/resources/testharnessreport.js
+++ b/LayoutTests/resources/testharnessreport.js
@@ -109,14 +109,16 @@ add_completion_callback(function (tests, harness_status) {
}
}
- // Add results element to document
+ // Add results element to document.
+ if (!document.body)
+ document.documentElement.appendChild(document.createElement("body"));
document.body.appendChild(results);
if (self.testRunner)
testRunner.notifyDone();
}
- if (!document.body || document.readyState === 'loading') {
+ if (document.readyState === 'loading') {
window.addEventListener('load', done);
} else {
done();

Powered by Google App Engine
This is Rietveld 408576698