Skip to content

chore: enable debugger api specs - #14475

Merged
MarshallOfSound merged 1 commit into
masterfrom
debugger_patch
Sep 6, 2018
Merged

MarshallOfSound merged 1 commit into
masterfrom
debugger_patch

Conversation

@deepak1556

@deepak1556 deepak1556 commented Sep 6, 2018 •

Copy link
Copy Markdown
Member
Description of Change

Fixes #13343

When we force swap site instances the debugger isn't aware of those changes , some of the inspector protocol network notifications have been moved to the browser side https://bugs.chromium.org/p/chromium/issues/detail?id=791838 and they are fired as expected when the swap happens, the remaining navigation lifecycle events {loadingFinished, dataReceived} which are emitted by the renderer are lost. This patch fixes it by watching for render frame swaps and reconnecting the debugger session to it if one is available.

Checklist
  • PR description included and stakeholders cc'd
  • npm test passes
  • tests are changed or added
  • relevant documentation is changed or added
  • PR title follows semantic commit guidelines
Release Notes

Notes: no-notes

@deepak1556
deepak1556 requested review from a team, alexeykuzmin, codebytere and zcbenz September 6, 2018 12:57

@ckerr ckerr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice side cleanups wrt removing SmartPtr.get() and deprecated DictionaryValues

Comment thread atom/browser/api/atom_api_debugger.cc Outdated

bool Debugger::IsAttached() {
return agent_host_.get() ? agent_host_->IsAttached() : false;
return agent_host_ ? agent_host_->IsAttached() : false;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit) slightly simpler:

return agent_host_ && agent_host_->IsAttached();

agent_host_->DispatchProtocolMessage(this, json_args);
}

void Debugger::ClearPendingRequests() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could test for pending_requests_.empty() first

Comment thread spec/api-debugger-spec.js

describe('debugger.attach', () => {
it('fails when devtools is already open', done => {
it('succeeds when devtools is already open', done => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@release-clerk

release-clerk Bot commented Sep 6, 2018

Copy link
Copy Markdown

No Release Notes

@trop

trop Bot commented Sep 6, 2018

Copy link
Copy Markdown
Contributor

We have automatically backported this PR to "3-0-x", please check out #14479

@trop trop Bot added merged/3-0-x and removed target/3-0-x labels Sep 6, 2018
codebytere pushed a commit that referenced this pull request Sep 6, 2018
codebytere added a commit that referenced this pull request Sep 6, 2018
* chore: enable debugger api specs (#14475)

* backport base::Value converters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable disabled "debugger.sendCommand" tests

4 participants