| Index: third_party/WebKit/LayoutTests/http/tests/preload/document-write/document_write_preload.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/preload/document-write/document_write_preload.html b/third_party/WebKit/LayoutTests/http/tests/preload/document-write/document_write_preload.html
|
| index 4474a7f680ddb0a06c39e4077925f8c79d6b58c6..205efeef325a1a4a9563ac3dbb4d6f10281e650a 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/preload/document-write/document_write_preload.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/preload/document-write/document_write_preload.html
|
| @@ -1,26 +1,29 @@
|
| <!DOCTYPE html>
|
| <script src="../../resources/testharness.js"></script>
|
| <script src="../../resources/testharnessreport.js"></script>
|
| +
|
| <script>
|
| -var t = async_test('Simple scripts that inject external scripts via document.write should be preloaded');
|
| -// We reject scripts with "for", so rename window.performance.
|
| -window.perf = window.performance;
|
| + var t = async_test('Simple scripts that inject external scripts via document.write should be preloaded');
|
| + // We reject scripts with "for", so rename window.performance.
|
| + window.perf = window.performance;
|
| </script>
|
| +
|
| <script>
|
| -if (window.perf)
|
| + if (window.perf)
|
| var boundedStart = window.perf.now();
|
| -var src = '../../resources/dummy.js';
|
| -document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
|
| + 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_less_than(r.startTime, boundedStart);
|
| - assert_greater_than(r.startTime, 0);
|
| - t.done();
|
| - }
|
| - });
|
| -}));
|
| + window.addEventListener("load", t.step_func(function() {
|
| + window.performance.getEntriesByType('resource').forEach(function(r) {
|
| + if (r.name.indexOf('dummy.js') != -1) {
|
| + assert_less_than(r.startTime, boundedStart);
|
| + assert_greater_than(r.startTime, 0);
|
| + t.done();
|
| + }
|
| + });
|
| + }));
|
| </script>
|
|
|
|
|