2010-08-30 Andrey Kosyakov <caseq@chromium.org>
authorcaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Aug 2010 12:38:51 +0000 (12:38 +0000)
committercaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Aug 2010 12:38:51 +0000 (12:38 +0000)
commit7a0fd2dc248bf48b30350acb1d2020fdf23ea66c
treec1a5e706d00c656776de6d0c6c505aca239b34fb
parentceef8a0e35d3c03cea757e18a8c1bcbdfb4bd911
2010-08-30  Andrey Kosyakov  <caseq@chromium.org>

        Reviewed by Yury Semikhatsky.

        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
               inspector/extensions-audits.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-30  Andrey Kosyakov  <caseq@chromium.org>

        Reviewed by Yury Semikhatsky.

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

        * http/tests/inspector/inspector-test2.js:
        (initialize_InspectorTest):
        (runTest.runTestInFrontend):
        (runTest):
        * inspector/audits-panel-functional.html:
        * inspector/audits-tests.js: Added.
        (frontend_collectAuditResults):
        (frontend_collectTextContent):
        * inspector/audits-tests2.js: Added.
        (initialize_AuditTests.InspectorTest.collectAuditResults):
        (initialize_AuditTests.InspectorTest.collectTextContent):
        (initialize_AuditTests):
        * inspector/extensions-api-expected.txt:
        * inspector/extensions-api.html:
        * 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):
        (initialize_ExtensionsAuditsTest.InspectorTest.startExtensionAudits.onAuditsDone):
        (initialize_ExtensionsAuditsTest.InspectorTest.startExtensionAudits):
        (initialize_ExtensionsAuditsTest):
        (test):
        * inspector/extensions-audits.html: Added.
        * inspector/extensions-expected.txt:
        * inspector/extensions-test.js:
        (extensionFunctions):
        (initialize_ExtensionsTest.InspectorTest.dispatchOnMessage):
        (initialize_ExtensionsTest.InspectorTest.runExtensionTests):
        (test):
        * inspector/extensions.html:
        * inspector/resources/audits-script3.js: Removed.
        * inspector/resources/extension-main.js:
        (onTestsDone):
        * platform/chromium/test_expectations.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@66477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
33 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/inspector-test2.js
LayoutTests/inspector/audits-panel-functional.html
LayoutTests/inspector/audits-tests.js [new file with mode: 0755]
LayoutTests/inspector/audits-tests2.js [new file with mode: 0755]
LayoutTests/inspector/extensions-api-expected.txt
LayoutTests/inspector/extensions-api.html
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: 0644]
LayoutTests/inspector/extensions-audits.html [new file with mode: 0755]
LayoutTests/inspector/extensions-expected.txt
LayoutTests/inspector/extensions-test.js
LayoutTests/inspector/extensions.html
LayoutTests/inspector/resources/audits-script3.js [deleted file]
LayoutTests/inspector/resources/extension-main.html
LayoutTests/inspector/resources/extension-main.js
LayoutTests/platform/chromium/test_expectations.txt
WebCore/ChangeLog
WebCore/WebCore.gypi
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/inspector/front-end/AuditFormatters.js [new file with mode: 0755]
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/ExtensionAuditCategory.js [new file with mode: 0644]
WebCore/inspector/front-end/ExtensionCommon.js [new file with mode: 0644]
WebCore/inspector/front-end/ExtensionServer.js
WebCore/inspector/front-end/WebKit.qrc
WebCore/inspector/front-end/inspector.html
WebCore/inspector/front-end/utilities.js