|
[DevTools] Network.emulateNetworkConditions now affects NetworkStateNotifier.
This patch replaces test-only update mechanism in NetworkStateNotifier with
setOverride/clearOverride methods and uses them in InspectorNetworkAgent.
Unfortunately for emulation, NetworkStateNotifier is global and thus all
pages will observe the new network state. We can make it per-frame, but
that would introduce a lot of complexity. Current state is an acceptable trade-off
for now.
This also adds connectionType parameter to Network.emulateNetworkConditions and
makes it fall-through to the renderer.
BUG= 567613, 586696, 581334
Committed: https://crrev.com/6ca18e32edb9bad244588538ea2bb2d1be9fb1ff
Cr-Commit-Position: refs/heads/master@{#402897}
Total comments: 3
Total comments: 5
Total comments: 23
Total comments: 19
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+404 lines, -147 lines) |
Patch |
 |
M |
chrome/browser/devtools/devtools_network_protocol_handler.cc
|
View
|
1
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/devtools/devtools_sanity_browsertest.cc
|
View
|
1
2
|
2 chunks |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
A |
chrome/test/data/devtools/emulate_network_conditions.html
|
View
|
1
2
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/browser/devtools/protocol/network_handler.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/devtools/protocol/network_handler.cc
|
View
|
1
|
1 chunk |
+7 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script.html
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block-all-conn-types.html
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block-all-conn-types-expected.txt
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block-expected.txt
|
View
|
1
2
3
4
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type-expected.txt
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload-expected.txt
|
View
|
1
2
3
4
|
1 chunk |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/http/tests/webfont/font-display-intervention.html
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/media/video-preload-cellular-test.js
|
View
|
|
2 chunks |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/netinfo/basic-operation.html
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/netinfo/connection-types.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/netinfo/multiple-frames.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/netinfo/resources/netinfo_common.js
|
View
|
1
2
3
|
1 chunk |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/netinfo/type-change-no-listener.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/netinfo/unregister-during-event.html
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/netinfo/web-worker.html
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
|
View
|
1
2
3
4
5
6
7
8
|
4 chunks |
+40 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/inspector/browser_protocol.json
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+9 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/page/NetworkStateNotifier.h
|
View
|
1
2
3
4
5
6
7
8
9
|
7 chunks |
+43 lines, -31 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/page/NetworkStateNotifier.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+49 lines, -39 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/page/NetworkStateNotifierTest.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+91 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/testing/Internals.h
|
View
|
|
1 chunk |
+2 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/testing/Internals.cpp
|
View
|
|
2 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/testing/Internals.idl
|
View
|
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/devtools/front_end/Tests.js
|
View
|
1
2
3
4
5
6
|
1 chunk |
+53 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+28 lines, -1 line |
0 comments
|
Download
|
Total messages: 48 (18 generated)
|