New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 765501 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit 28 days ago
Closed: Oct 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

DevTools: Network.requestWillBeSent always sends "Other" as resource type

Project Member Reported by lushnikov@chromium.org, Sep 15 2017

Issue description

Puppeteer reproduction:


const puppeteer = require('puppeteer');
(async() => {
  const browser = await puppeteer.launch({
    executablePath: '/usr/local/google/home/lushnikov/chromium/out/Release/chrome'
  });
  const page = await browser.newPage();
  page.on('request', r => console.log(`${r.url} ==> ${r.resourceType}`));
  await page.goto('https://news.ycombinator.com/', {waitUntil: 'networkidle'});
  browser.close();
})();


Expected: stylesheet resources are labeled as stylesheets, images are labeled as images
Actual: everything is reported as "Other"

Downstream bug: https://github.com/GoogleChrome/puppeteer/issues/734
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60

commit 1c40f9042ae2d6ee7483d72998aabb5e73b2ff60
Author: Andrey Lushnikov <lushnikov@chromium.org>
Date: Wed Oct 11 09:36:45 2017

DevTools: send proper resource type in Network.RequestWillBeSent

This patch plumbs resoure type into the DispatchWillSendRequest
instrumenation. This allows us to report accurate type in
Network.RequestWillBeSent event, instead of "Other", that we report
today.

BUG= 765501 
R=dgozman

Change-Id: I0134c08b841e8dd247fdc8ff208bfd51e462709c
Reviewed-on: https://chromium-review.googlesource.com/667504
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507936}
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/LayoutTests/http/tests/devtools/network/network-imported-resource-content-expected.txt
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/LayoutTests/http/tests/devtools/network/network-request-type-expected.txt
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/LayoutTests/inspector-protocol/network/resource-type-expected.txt
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/LayoutTests/inspector-protocol/network/resource-type.js
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/core/frame/PerformanceMonitor.h
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/core/inspector/InspectorPageAgent.h
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.h
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/core/loader/BaseFetchContext.cpp
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/core/loader/BaseFetchContext.h
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/core/loader/BaseFetchContextTest.cpp
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/core/loader/FrameFetchContext.h
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/core/probe/CoreProbes.pidl
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/platform/loader/fetch/FetchContext.cpp
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
[modify] https://crrev.com/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment