Newer features work even when attaching to debugger using old protocol version
Reported by
m...@mostlystatic.com,
Aug 23
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 Steps to reproduce the problem: 1. Open http://www.example.com/ 2. In a chrome extension with debugger permissions run this code: chrome.debugger.getTargets(function(targets){ const target = targets.find(t => t.url === "http://www.example.com/") const targetArg = { targetId: target.id} chrome.debugger.attach(targetArg, "1.3", function(){ chrome.debugger.sendCommand( targetArg, "Network.setRequestInterception", { patterns: [{ urlPattern: "*", interceptionStage: "Request" }] } ) chrome.debugger.onEvent.addListener(console.log) }) }) 3. Reload example.com What is the expected behavior? Request interception is not supported in the 1.3 version of the DevTools Protocol https://chromedevtools.github.io/devtools-protocol/1-3/Network Therefore: - Network.setRequestInterception should fail - There should be no "Network.requestIntercepted" events being fired However, everything works fine. (Same behavior when specifying version 1.2.) What went wrong? Everything works as it would for the tip-of-tree protocol version and requests are intercepted. Did this work before? N/A Chrome version: 68.0.3440.106 Channel: stable OS Version: OS X 10.11.6 Flash Version: The goal here is to prevent developers unknowingly relying on unstable APIs. This shouldn't be done retroactively for version 1.0-1.3 as it would break existing extensions.
,
Aug 24
matt@ - Thanks for filing the issue...!! Could you please provide a sample extension or url to test the issue from TE-end. This will help us in triaging the issue further. Thanks...!!
,
Aug 27
>> The goal here is to prevent developers unknowingly relying on unstable APIs. While I completely agree with this, we rely upon the documentation when it comes to the experimental methods and versioning. Users will be able to use experimental methods in 1.3 at their own risk for the sake of hackability of the protocol. |
|||
►
Sign in to add a comment |
|||
Comment 1 by susan.boorgula@chromium.org
, Aug 23