| Index: third_party/WebKit/LayoutTests/netinfo/estimate-web-worker.html
|
| diff --git a/third_party/WebKit/LayoutTests/netinfo/web-worker.html b/third_party/WebKit/LayoutTests/netinfo/estimate-web-worker.html
|
| similarity index 51%
|
| copy from third_party/WebKit/LayoutTests/netinfo/web-worker.html
|
| copy to third_party/WebKit/LayoutTests/netinfo/estimate-web-worker.html
|
| index cdb0c1d6325cc6da4eb6bc99c0f9ec91370aa23d..52a88a3e62061f7e9a05e26565a81b72ecbefa66 100644
|
| --- a/third_party/WebKit/LayoutTests/netinfo/web-worker.html
|
| +++ b/third_party/WebKit/LayoutTests/netinfo/estimate-web-worker.html
|
| @@ -17,17 +17,19 @@ var msg_count = 0;
|
|
|
| worker.addEventListener('message', function(e) {
|
| if (msg_count == 0) {
|
| - if (e.data != connection.type + ',' + connection.downlinkMax) {
|
| + if (e.data != connection.type + ',' + connection.downlinkMax + ',' + connection.effectiveType + ',' + connection.rtt + ',' + connection.downlink) {
|
| testFailed("Worker type disagrees with main frame.");
|
| }
|
| - internals.setNetworkConnectionInfoOverride(isTypeOnline(newConnectionType), newConnectionType, newDownlinkMax);
|
| + internals.setNetworkQualityInfoOverride(newEffectiveType, newRtt, newDownlink);
|
| } else if (msg_count == 1) {
|
| - if (e.data != newConnectionType + ',' + newDownlinkMax)
|
| - testFailed("Worker switched to wrong connection type.");
|
| - internals.setNetworkConnectionInfoOverride(isTypeOnline(initialType), initialType, initialDownlinkMax);
|
| + if (e.data != connection.type + ',' + connection.downlinkMax + ',' + newEffectiveType + ',' + newRtt + ',' + newDownlink) {
|
| + testFailed("Worker switched to wrong quality estimate.");
|
| + }
|
| + internals.setNetworkQualityInfoOverride(initialEffectiveType, initialRtt, initialDownlink);
|
| } else if (msg_count == 2) {
|
| - if (e.data != initialType + ',' + initialDownlinkMax)
|
| - testFailed("Worker did not revert back to initial type.");
|
| + if (e.data != connection.type + ',' + connection.downlinkMax + ',' + initialEffectiveType + ',' + initialRtt + ',' + initialDownlink) {
|
| + testFailed("Worker did not revert back to initial quality estimate.");
|
| + }
|
| finishJSTest();
|
| }
|
| msg_count += 1;
|
|
|