WebKit Bugzilla
Attachment 356440 Details for
Bug 192317
: Web Inspector: Audit: navigating while tests are running should stop and clear all results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192317-20181203170640.patch (text/plain), 3.64 KB, created by
Devin Rousso
on 2018-12-03 17:06:40 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2018-12-03 17:06:40 PST
Size:
3.64 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index d603a7ea16e129f8db1c6d01f1b5967bbd33c99c..41ecc22e952061a406aecbe33721cc7d0610d032 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,19 @@ >+2018-12-03 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Audit: navigating while tests are running should stop and clear all results >+ https://bugs.webkit.org/show_bug.cgi?id=192317 >+ <rdar://problem/46435222> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UserInterface/Controllers/AuditManager.js: >+ (WI.AuditManager.prototype.async start): >+ (WI.AuditManager.prototype._handleFrameMainResourceDidChange): >+ >+ * UserInterface/Views/AuditNavigationSidebarPanel.js: >+ (WI.AuditNavigationSidebarPanel.prototype.initialLayout): >+ Drive-by: pass the index of the saved result. >+ > 2018-12-03 Matt Baker <mattbaker@apple.com> > > Web Inspector: REGRESSION(r238599): Multiple Selection: restoring selection when opening WebInspector puts the TreeElement into a permanent selected state >diff --git a/Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js b/Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js >index 0ab9201c09283f9780d184603668cb412dbdc31a..62d7493701c037ab3147fc9449e46ab1dadc8047 100644 >--- a/Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js >+++ b/Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js >@@ -66,6 +66,8 @@ WI.AuditManager = class AuditManager extends WI.Object > if (!tests.length) > return; > >+ let mainResource = WI.networkManager.mainFrame.mainResource; >+ > this._runningState = WI.AuditManager.RunningState.Active; > this._runningTests = tests; > for (let test of this._runningTests) >@@ -81,6 +83,12 @@ WI.AuditManager = class AuditManager extends WI.Object > this._runningTests = []; > > this._addResult(result); >+ >+ if (mainResource !== WI.networkManager.mainFrame.mainResource) { >+ // Navigated while tests were running. >+ for (let test of this._tests) >+ test.clearResult(); >+ } > } > > stop() >@@ -194,8 +202,12 @@ WI.AuditManager = class AuditManager extends WI.Object > if (!event.target.isMainFrame()) > return; > >- for (let test of this._tests) >- test.clearResult(); >+ if (this._runningState === WI.AuditManager.RunningState.Active) >+ this.stop(); >+ else { >+ for (let test of this._tests) >+ test.clearResult(); >+ } > } > > addDefaultTestsIfNeeded() >diff --git a/Source/WebInspectorUI/UserInterface/Views/AuditNavigationSidebarPanel.js b/Source/WebInspectorUI/UserInterface/Views/AuditNavigationSidebarPanel.js >index 005c468836389d197a39eb4389222851649e7f02..fbbfcadbadf444c7a4a1770691d82cbea92bc53d 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/AuditNavigationSidebarPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/AuditNavigationSidebarPanel.js >@@ -83,8 +83,9 @@ WI.AuditNavigationSidebarPanel = class AuditNavigationSidebarPanel extends WI.Na > for (let test of WI.auditManager.tests) > this._addTest(test); > >- for (let result of WI.auditManager.results) >- this._addResult(result); >+ WI.auditManager.results.forEach((result, i) => { >+ this._addResult(result, i); >+ }); > > WI.auditManager.addEventListener(WI.AuditManager.Event.TestAdded, this._handleAuditTestAdded, this); > WI.auditManager.addEventListener(WI.AuditManager.Event.TestCompleted, this._handleAuditTestCompleted, this);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192317
: 356440