| Index: third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html b/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..cc1a1390caddf2f62187adc2107cfe8dab2e4fc3
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html
|
| @@ -0,0 +1,25 @@
|
| +<!DOCTYPE html>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<script>
|
| + var src = 'http://localhost:8000/loading/resources/js-loaded.js';
|
| + var jsLoaded = false;
|
| + var loadSuccess = false;
|
| + if (window.internals){
|
| + internals.settings.setDisallowFetchForDocWrittenScriptsInMainFrame(true);
|
| + internals.setNetworkStateNotifierTestOnly(true);
|
| + internals.setNetworkConnectionInfo('cellular3g', 2.0);
|
| + }
|
| + document.write('<scr' + 'ipt src="' + src + '" onload="loadSuccess=true"></scr' + 'ipt>');
|
| +</script>
|
| +<script>
|
| + test(function () {
|
| + assert_true(jsLoaded);
|
| + assert_true(loadSuccess);
|
| + }, "Document.written scripts are not blocked in a fast connection");
|
| +
|
| + window.addEventListener('beforeunload', function() {
|
| + internals.setNetworkStateNotifierTestOnly(false);
|
| + internals.settings.setDisallowFetchForDocWrittenScriptsInMainFrame(false);
|
| + }, false);
|
| +</script>
|
|
|