2010-08-26 Andrey Kosyakov <caseq@chromium.org>
authorcaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Aug 2010 13:57:54 +0000 (13:57 +0000)
committercaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Aug 2010 13:57:54 +0000 (13:57 +0000)
commit04b49b8dc3d06a7211d9a5e6a69f6351878c1ac9
treed4e866bbe2b064316b43c2f93edef3ee9826f256
parent972b65da997e5e8ba1ac0946d0d4dc1778e1a1a5
2010-08-26  Andrey Kosyakov  <caseq@chromium.org>

        Reviewed by Pavel Feldman.

        Web Inspector: add audits support to extension API
        Exposed (late) adding of categories from AuditPanel.
        Removed indexOfObjectInListSortedByFunction in favor of
        insertionIndexForObjectInListSortedByFunction (the former had
        weird interface always returning negative numbers and was only used in
        the latter).
        https://bugs.webkit.org/show_bug.cgi?id=44518

        Tests: inspector/extensions-audits-api.html

        * WebCore.gypi:
        * WebCore.vcproj/WebCore.vcproj:
        * inspector/front-end/AuditFormatters.js: Added.
        (WebInspector.applyFormatters):
        (WebInspector.AuditFormatters.text):
        (WebInspector.AuditFormatters.snippet):
        (WebInspector.AuditFormatters.concat):
        (WebInspector.AuditFormatters.url):
        * inspector/front-end/AuditLauncherView.js:
        (WebInspector.AuditLauncherView):
        (WebInspector.AuditLauncherView.prototype.addCategory.compareCategories):
        (WebInspector.AuditLauncherView.prototype.addCategory):
        (WebInspector.AuditLauncherView.prototype._launchButtonClicked):
        (WebInspector.AuditLauncherView.prototype._selectAllClicked):
        (WebInspector.AuditLauncherView.prototype._categoryClicked):
        (WebInspector.AuditLauncherView.prototype._createCategoryElement):
        (WebInspector.AuditLauncherView.prototype._createLauncherUI):
        * inspector/front-end/AuditResultView.js:
        (WebInspector.AuditCategoryResultPane.prototype._appendResult):
        * inspector/front-end/AuditsPanel.js:
        (WebInspector.AuditsPanel):
        (WebInspector.AuditsPanel.prototype.addCategory):
        (WebInspector.AuditsPanel.prototype.getCategory):
        (WebInspector.AuditsPanel.prototype._executeAudit):
        (WebInspector.AuditCategory.prototype.run):
        * inspector/front-end/ExtensionAPI.js:
        (WebInspector.injectedExtensionAPI):
        (WebInspector.injectedExtensionAPI.EventSinkImpl.prototype.addListener):
        (WebInspector.injectedExtensionAPI.EventSinkImpl.prototype._fire):
        (WebInspector.injectedExtensionAPI.EventSinkImpl.prototype._dispatch):
        (WebInspector.injectedExtensionAPI.EventSink):
        (WebInspector.injectedExtensionAPI.InspectorExtensionAPI):
        (WebInspector.injectedExtensionAPI.Panels.prototype.create):
        (WebInspector.injectedExtensionAPI.Audits):
        (WebInspector.injectedExtensionAPI.Audits.prototype.addCategory):
        (WebInspector.injectedExtensionAPI.AuditCategory.customDispatch):
        (WebInspector.injectedExtensionAPI.AuditCategory):
        (WebInspector.injectedExtensionAPI.AuditCategoryImpl):
        (WebInspector.injectedExtensionAPI.AuditResult):
        (WebInspector.injectedExtensionAPI.AuditResult.prototype.get Severity):
        (WebInspector.injectedExtensionAPI.AuditResultImpl):
        (WebInspector.injectedExtensionAPI.AuditResultImpl.prototype.addResult):
        (WebInspector.injectedExtensionAPI.AuditResultImpl.prototype.createResult):
        (WebInspector.injectedExtensionAPI.AuditResultImpl.prototype.done):
        (WebInspector.injectedExtensionAPI.AuditResultImpl.prototype._nodeFactory):
        (WebInspector.injectedExtensionAPI.AuditResultNode):
        (WebInspector.injectedExtensionAPI.AuditResultNode.prototype.addChild):
        * inspector/front-end/ExtensionAuditCategory.js: Added.
        (WebInspector.ExtensionAuditCategory):
        (WebInspector.ExtensionAuditCategory.prototype.get id):
        (WebInspector.ExtensionAuditCategory.prototype.get displayName):
        (WebInspector.ExtensionAuditCategory.prototype.get ruleCount):
        (WebInspector.ExtensionAuditCategory.prototype.run):
        (WebInspector.ExtensionAuditCategoryResults):
        (WebInspector.ExtensionAuditCategoryResults.prototype.get complete):
        (WebInspector.ExtensionAuditCategoryResults.prototype.cancel):
        (WebInspector.ExtensionAuditCategoryResults.prototype.addResult):
        (WebInspector.ExtensionAuditCategoryResults.prototype._addNode):
        (WebInspector.ExtensionAuditCategoryResults.prototype._addResult):
        * inspector/front-end/ExtensionCommon.js: Added.
        (WebInspector.commonExtensionSymbols):
        * inspector/front-end/ExtensionServer.js:
        (WebInspector.ExtensionServer):
        (WebInspector.ExtensionServer.prototype.startAuditRun):
        (WebInspector.ExtensionServer.prototype.stopAuditRun):
        (WebInspector.ExtensionServer.prototype._postNotification):
        (WebInspector.ExtensionServer.prototype._onAddAuditCategory):
        (WebInspector.ExtensionServer.prototype._onAddAuditResult):
        (WebInspector.ExtensionServer.prototype._onStopAuditCategoryRun):
        (WebInspector.ExtensionServer.prototype._addExtensions):
        (WebInspector.ExtensionServer.prototype._buildExtensionAPIInjectedScript):
        (WebInspector.ExtensionStatus):
        * inspector/front-end/WebKit.qrc:
        * inspector/front-end/inspector.html:
        * inspector/front-end/utilities.js:
        ():

2010-08-26  Andrey Kosyakov  <caseq@chromium.org>

        Reviewed by Pavel Feldman.

        Web Inspector: add audits support to extension API
        https://bugs.webkit.org/show_bug.cgi?id=44518

        * inspector/audits-panel-functional.html:
        * inspector/audits-tests.js: Added.
        (frontend_collectAuditResults):
        (frontend_collectTextContent):
        * inspector/extensions-api-expected.txt:
        * inspector/extensions-audits-api-expected.txt: Added.
        * inspector/extensions-audits-api.html: Added.
        * inspector/extensions-audits-expected.txt: Added.
        * inspector/extensions-audits-tests.js: Added.
        (extension_runAudits.onMessage):
        (extension_runAudits):
        (frontend_runExtensionAudits.onAuditsDone):
        * inspector/extensions-audits.html: Added.
        * inspector/extensions-expected.txt:
        * inspector/resources/audits-script3.js: Removed.
        * platform/chromium/test_expectations.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@66218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/audits-panel-functional.html
LayoutTests/inspector/audits-tests.js [new file with mode: 0755]
LayoutTests/inspector/extensions-api-expected.txt
LayoutTests/inspector/extensions-audits-api-expected.txt [new file with mode: 0644]
LayoutTests/inspector/extensions-audits-api.html [new file with mode: 0755]
LayoutTests/inspector/extensions-audits-expected.txt [new file with mode: 0644]
LayoutTests/inspector/extensions-audits-tests.js [new file with mode: 0755]
LayoutTests/inspector/extensions-audits.html [new file with mode: 0755]
LayoutTests/inspector/extensions-expected.txt
LayoutTests/inspector/resources/audits-script3.js [deleted file]
LayoutTests/platform/chromium/test_expectations.txt
WebCore/ChangeLog
WebCore/WebCore.gypi
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/inspector/front-end/AuditLauncherView.js
WebCore/inspector/front-end/AuditResultView.js
WebCore/inspector/front-end/AuditsPanel.js
WebCore/inspector/front-end/ExtensionAPI.js
WebCore/inspector/front-end/ExtensionServer.js
WebCore/inspector/front-end/WebKit.qrc
WebCore/inspector/front-end/inspector.html
WebCore/inspector/front-end/utilities.js