| Index: third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block-effectively-2g.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-block-effectively-2g.html
|
| similarity index 71%
|
| copy from third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html
|
| copy to third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block-effectively-2g.html
|
| index e5ec3b8f074668594ffa14a053c3e42423fb0893..306458e329d45e6439ec4122a0f17f022fa4ca24 100644
|
| --- 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-block-effectively-2g.html
|
| @@ -6,20 +6,22 @@
|
| var jsLoaded = false;
|
| var loadSuccess = false;
|
| if (window.internals) {
|
| - internals.settings.setDisallowFetchForDocWrittenScriptsInMainFrameOnSlowConnections(true);
|
| + internals.settings.setDisallowFetchForDocWrittenScriptsInMainFrameIfEffectively2G(true);
|
| internals.setNetworkConnectionInfoOverride(true, 'cellular3g', 2.0);
|
| + internals.setEffectiveConnectionTypeOverride('TypeSlow2G');
|
| internals.evictAllResources();
|
|
|
| window.addEventListener('beforeunload', function() {
|
| internals.clearNetworkConnectionInfoOverride();
|
| - internals.settings.setDisallowFetchForDocWrittenScriptsInMainFrameOnSlowConnections(false);
|
| + internals.clearEffectiveConnectionTypeOverride();
|
| + internals.settings.setDisallowFetchForDocWrittenScriptsInMainFrameIfEffectively2G(false);
|
| }, false);
|
| }
|
| 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");
|
| + assert_false(jsLoaded);
|
| + assert_false(loadSuccess);
|
| + }, "Document.written scripts are blocked when effectively 2G");
|
| </script>
|
|
|