Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Issue 2879503002: [Devtools] Added product entry tests for network

Created:
3 years, 7 months ago by allada
Modified:
3 years, 5 months ago
Reviewers:
pfeldman
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, kozyatinskiy+blink_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Devtools] Added product entry tests for network This patch adds product registry/entry test for network panel to ensure product entries give basic good results along with tests to make sure frames are attribution is taken into account. R=dgozman,pfeldman BUG=720133

Patch Set 1 : [Devtools] Added product entry tests for network #

Total comments: 9

Patch Set 2 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+231 lines, -4 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js View 1 chunk +21 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/page-mock.js View 9 chunks +62 lines, -4 lines 0 comments Download
A third_party/WebKit/LayoutTests/inspector/network/network-product-entry.html View 1 chunk +81 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/inspector/network/network-product-entry-expected.txt View 1 chunk +67 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 7 (4 generated)
allada
PTL https://codereview.chromium.org/2879503002/diff/20001/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js File third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js (right): https://codereview.chromium.org/2879503002/diff/20001/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js#newcode436 third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js:436: InspectorTest.waitEventListener = function(event, obj, condition = undefined) There ...
3 years, 7 months ago (2017-05-10 22:25:01 UTC) #1
pfeldman
lgtm
3 years, 7 months ago (2017-05-10 22:37:46 UTC) #3
dgozman
3 years, 7 months ago (2017-05-10 22:57:14 UTC) #4
https://codereview.chromium.org/2879503002/diff/20001/third_party/WebKit/Layo...
File third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
(right):

https://codereview.chromium.org/2879503002/diff/20001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js:436:
InspectorTest.waitEventListener = function(event, obj, condition = undefined)
On 2017/05/10 22:25:01, allada wrote:
> There are a few places in this file that could use this function. I want to
> convert to use this function instead (which is why I added the "condition"
> callback), but in a followup.

Paul is adding .once(), will it work in most cases?

https://codereview.chromium.org/2879503002/diff/20001/third_party/WebKit/Layo...
File third_party/WebKit/LayoutTests/http/tests/inspector/page-mock.js (right):

https://codereview.chromium.org/2879503002/diff/20001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/http/tests/inspector/page-mock.js:129:
console.assert(!this._pageGetResourceTreeHasRan, "Cannot add frames after
getResourceTreeTree has ran.");
InspectorTest.completeTest here so we see the test failing.

https://codereview.chromium.org/2879503002/diff/20001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/http/tests/inspector/page-mock.js:133: loaderId:
this._mainFrame.loaderId,
loaderId should be unique.

https://codereview.chromium.org/2879503002/diff/20001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/http/tests/inspector/page-mock.js:145: * @return
{!Promise<string>}
Why return Promise? I think we should waitForRequest instead, using the same
helper you'd use for real backend test.

https://codereview.chromium.org/2879503002/diff/20001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/http/tests/inspector/page-mock.js:147:
requestWillBeSent(url, frame) {
Let's call this sendXHR and issue responseReceived and loadingFinished as well.

https://codereview.chromium.org/2879503002/diff/20001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/http/tests/inspector/page-mock.js:226: resources:
[]
Let's report html resource. Or add TODO for it.

https://codereview.chromium.org/2879503002/diff/20001/third_party/WebKit/Layo...
File third_party/WebKit/LayoutTests/inspector/network/network-product-entry.html
(right):

https://codereview.chromium.org/2879503002/diff/20001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/inspector/network/network-product-entry.html:54:
var request = InspectorTest.networkLog.requestForId(networkManager, requestId);
Use InspectorTest.findRequestsByURLPattern to make it similar to integration
test.

Powered by Google App Engine
This is Rietveld 408576698