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

Unified Diff: third_party/WebKit/Source/devtools/front_end/audits2/Audits2Panel.js

Issue 2886903006: DevTools: do not hide run audit dialog upon canceling the audit, allow it being re-run. (Closed)
Patch Set: same Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/audits2/Audits2Panel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/audits2/Audits2Panel.js b/third_party/WebKit/Source/devtools/front_end/audits2/Audits2Panel.js
index 27bdb1fd5c6f727ad623c3b0424e3a90c3eeed81..f51736d6581de3ee20faf39d198d8b7d69d0d50e 100644
--- a/third_party/WebKit/Source/devtools/front_end/audits2/Audits2Panel.js
+++ b/third_party/WebKit/Source/devtools/front_end/audits2/Audits2Panel.js
@@ -77,6 +77,7 @@ Audits2.Audits2Panel = class extends UI.PanelWithSidebar {
var newButton = UI.createTextButton(
Common.UIString('Perform an audit\u2026'), this._showLauncherUI.bind(this), 'material-button default');
landingCenter.appendChild(newButton);
+ this.setDefaultFocusedElement(newButton);
}
_showLauncherUI() {
@@ -234,15 +235,14 @@ Audits2.Audits2Panel = class extends UI.PanelWithSidebar {
/**
* @return {!Promise<undefined>}
*/
- _stopAndReattach() {
- return this._protocolService.detach().then(_ => {
- Emulation.InspectedPagePlaceholder.instance().update(true);
- this._auditRunning = false;
- this._updateButton();
- var resourceTreeModel = SDK.targetManager.mainTarget().model(SDK.ResourceTreeModel);
- // reload to reset the page state
- resourceTreeModel.navigate(this._inspectedURL).then(() => this._hideDialog());
- });
+ async _stopAndReattach() {
+ await this._protocolService.detach();
+ Emulation.InspectedPagePlaceholder.instance().update(true);
+ var resourceTreeModel = SDK.targetManager.mainTarget().model(SDK.ResourceTreeModel);
+ // reload to reset the page state
+ await resourceTreeModel.navigate(this._inspectedURL);
+ this._auditRunning = false;
+ this._updateButton();
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698