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

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

Issue 1861793002: Add more layout tests for DocumentWriteEvaluator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jkarlin@ review 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/preload/document-write/document_write_preload_stubs.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/preload/without_doc_write_evaluator.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/preload/without_doc_write_evaluator.html b/third_party/WebKit/LayoutTests/http/tests/preload/without_doc_write_evaluator.html
new file mode 100644
index 0000000000000000000000000000000000000000..3c784205a5a34a4dd25c60ce0a569b615d9f49d1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/preload/without_doc_write_evaluator.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+
+<script>
+ var t = async_test("Make sure that timing assumptions are accurate when document write preloading is off");
+ // We reject scripts with "for", so rename window.performance.
+ window.perf = window.performance;
+</script>
+
+<script>
+ if (window.perf)
+ var boundedStart = window.perf.now();
+ var src = '../../resources/dummy.js';
+ document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
+</script>
+
+<script>
+ window.addEventListener("load", t.step_func(function() {
+ window.performance.getEntriesByType('resource').forEach(function(r) {
+ if (r.name.indexOf('dummy.js') != -1) {
+ assert_greater_than(r.startTime, 0);
+ assert_greater_than(r.startTime, boundedStart);
+ t.done();
+ }
+ });
+ }));
+</script>
+
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/preload/document-write/document_write_preload_stubs.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698