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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/preload/document_write_preload.html

Issue 1861793002: Add more layout tests for DocumentWriteEvaluator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/http/tests/preload/document_write_preload.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/preload/document_write_preload.html b/third_party/WebKit/LayoutTests/http/tests/preload/document_write_preload.html
index 4cca6884b7a94b7785c910348726cf4143a2b874..7533bcbf7f21df4701258fce2354224cb339601a 100644
--- a/third_party/WebKit/LayoutTests/http/tests/preload/document_write_preload.html
+++ b/third_party/WebKit/LayoutTests/http/tests/preload/document_write_preload.html
@@ -14,9 +14,12 @@ document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
</script>
<script>
window.addEventListener("load", t.step_func(function() {
- var resourceTiming = window.performance.getEntriesByType('resource')[2];
- assert_less_than(resourceTiming.startTime, boundedStart);
- t.done();
+ window.performance.getEntriesByType('resource').forEach(function(r) {
+ if (r.name.indexOf('dummy.js') != -1) {
+ assert_less_than(r.startTime, boundedStart);
+ t.done();
+ }
+ });
}));
</script>

Powered by Google App Engine
This is Rietveld 408576698