Changeset 233858 in webkit


Ignore:
Timestamp:
Jul 16, 2018 11:57:39 AM (6 years ago)
Author:
commit-queue@webkit.org
Message:

AX: Audit Tab should have an Audit Manager
https://bugs.webkit.org/show_bug.cgi?id=184071
<rdar://problem/38946364>

Patch by Aaron Chu <aaron_chu@apple.com> on 2018-07-16
Reviewed by Brian Burg.

Source/WebInspectorUI:

This implements the AuditManager for the audit feature. This patch revolves
around building out an AuditManager that facilitates an audit. The AuditManager
is responsible for managing and storing AuditReports and AuditTestSuites. It is
also tasked to decide how to run a test -- whether as a test case or as a test
suite. This patch also includes 4 models with which the AuditManager works to
perform an audit and to generate a report. These models include AuditTestCase,
which as a collection is stored inside an AuditTestSuite; and AuditResult,
which, as a collection is stored inside an AuditReport.

  • UserInterface/Controllers/AuditManager.js: Added.

(WI.AuditManager):
(WI.AuditManager.prototype.get testSuites):
(WI.AuditManager.prototype.get reports):
(WI.AuditManager.prototype.async.runAuditTestByRepresentedObject):
(WI.AuditManager.prototype.reportForId):
(WI.AuditManager.prototype.removeAllReports):
(WI.AuditManager.prototype.async._runTestCase):

  • UserInterface/Main.html:
  • UserInterface/Models/AuditReport.js: Added.

(WI.AuditReport):
(WI.AuditReport.prototype.get representedTestCases):
(WI.AuditReport.prototype.get representedTestSuite):
(WI.AuditReport.prototype.get resultsData):
(WI.AuditReport.prototype.get isWritable):
(WI.AuditReport.prototype.get failedCount):
(WI.AuditReport.prototype.addResult):
(WI.AuditReport.prototype.close):

  • UserInterface/Models/AuditResult.js: Added.

(WI.AuditResult):
(WI.AuditResult.prototype.get testResult):
(WI.AuditResult.prototype.get name):
(WI.AuditResult.prototype.get logLevel):
(WI.AuditResult.prototype.get failed):

  • UserInterface/Models/AuditTestCase.js: Added.

(WI.AuditTestCase.prototype.get id):
(WI.AuditTestCase.prototype.get name):
(WI.AuditTestCase.prototype.get suite):
(WI.AuditTestCase.prototype.get test):
(WI.AuditTestCase.prototype.get setup):
(WI.AuditTestCase.prototype.get tearDown):
(WI.AuditTestCase.prototype.get errorDetails):
(WI.AuditTestCase):

  • UserInterface/Models/AuditTestSuite.js: Added.

(WI.AuditTestSuite):
(WI.AuditTestSuite.testCaseDescriptors):
(WI.AuditTestSuite.prototype.get id):
(WI.AuditTestSuite.prototype.get name):
(WI.AuditTestSuite.prototype.get testCases):
(WI.AuditTestSuite.prototype._buildTestCasesFromDescriptors):

  • UserInterface/Test.html:

LayoutTests:

Test cases for AuditManager, AuditTestCase, AuditTestSuite, AuditResult and AuditReport.

  • inspector/audit/audit-manager-expected.txt: Added.
  • inspector/audit/audit-manager.html: Added.
  • inspector/audit/audit-report-expected.txt: Added.
  • inspector/audit/audit-report.html: Added.
  • inspector/audit/audit-test-case-expected.txt: Added.
  • inspector/audit/audit-test-case.html: Added.
  • inspector/audit/audit-test-suite-expected.txt: Added.
  • inspector/audit/audit-test-suite.html: Added.
  • inspector/audit/resources/audit-test-fixtures.js: Added.

(TestPage.registerInitializer.window.testSuiteFixture1):
(TestPage.registerInitializer.window.testSuiteFixture1.testCaseDescriptors):
(TestPage.registerInitializer.window.testSuiteFixture2):
(TestPage.registerInitializer.window.testSuiteFixture2.testCaseDescriptors):
(TestPage.registerInitializer):

Location:
trunk
Files:
16 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r233850 r233858  
     12018-07-16  Aaron Chu  <aaron_chu@apple.com>
     2
     3        AX: Audit Tab should have an Audit Manager
     4        https://bugs.webkit.org/show_bug.cgi?id=184071
     5        <rdar://problem/38946364>
     6
     7        Reviewed by Brian Burg.
     8
     9        Test cases for AuditManager, AuditTestCase, AuditTestSuite, AuditResult and AuditReport.
     10
     11        * inspector/audit/audit-manager-expected.txt: Added.
     12        * inspector/audit/audit-manager.html: Added.
     13        * inspector/audit/audit-report-expected.txt: Added.
     14        * inspector/audit/audit-report.html: Added.
     15        * inspector/audit/audit-test-case-expected.txt: Added.
     16        * inspector/audit/audit-test-case.html: Added.
     17        * inspector/audit/audit-test-suite-expected.txt: Added.
     18        * inspector/audit/audit-test-suite.html: Added.
     19        * inspector/audit/resources/audit-test-fixtures.js: Added.
     20        (TestPage.registerInitializer.window.testSuiteFixture1):
     21        (TestPage.registerInitializer.window.testSuiteFixture1.testCaseDescriptors):
     22        (TestPage.registerInitializer.window.testSuiteFixture2):
     23        (TestPage.registerInitializer.window.testSuiteFixture2.testCaseDescriptors):
     24        (TestPage.registerInitializer):
     25
    1262018-07-16  Truitt Savell  <tsavell@apple.com>
    227
  • trunk/Source/WebInspectorUI/ChangeLog

    r233848 r233858  
     12018-07-16  Aaron Chu  <aaron_chu@apple.com>
     2
     3        AX: Audit Tab should have an Audit Manager
     4        https://bugs.webkit.org/show_bug.cgi?id=184071
     5        <rdar://problem/38946364>
     6
     7        Reviewed by Brian Burg.
     8
     9        This implements the AuditManager for the audit feature. This patch revolves
     10        around building out an AuditManager that facilitates an audit. The AuditManager
     11        is responsible for managing and storing AuditReports and AuditTestSuites. It is
     12        also tasked to decide how to run a test -- whether as a test case or as a test
     13        suite. This patch also includes 4 models with which the AuditManager works to
     14        perform an audit and to generate a report. These models include AuditTestCase,
     15        which as a collection is stored inside an AuditTestSuite; and AuditResult,
     16        which, as a collection is stored inside an AuditReport.
     17
     18        * UserInterface/Controllers/AuditManager.js: Added.
     19        (WI.AuditManager):
     20        (WI.AuditManager.prototype.get testSuites):
     21        (WI.AuditManager.prototype.get reports):
     22        (WI.AuditManager.prototype.async.runAuditTestByRepresentedObject):
     23        (WI.AuditManager.prototype.reportForId):
     24        (WI.AuditManager.prototype.removeAllReports):
     25        (WI.AuditManager.prototype.async._runTestCase):
     26        * UserInterface/Main.html:
     27        * UserInterface/Models/AuditReport.js: Added.
     28        (WI.AuditReport):
     29        (WI.AuditReport.prototype.get representedTestCases):
     30        (WI.AuditReport.prototype.get representedTestSuite):
     31        (WI.AuditReport.prototype.get resultsData):
     32        (WI.AuditReport.prototype.get isWritable):
     33        (WI.AuditReport.prototype.get failedCount):
     34        (WI.AuditReport.prototype.addResult):
     35        (WI.AuditReport.prototype.close):
     36        * UserInterface/Models/AuditResult.js: Added.
     37        (WI.AuditResult):
     38        (WI.AuditResult.prototype.get testResult):
     39        (WI.AuditResult.prototype.get name):
     40        (WI.AuditResult.prototype.get logLevel):
     41        (WI.AuditResult.prototype.get failed):
     42        * UserInterface/Models/AuditTestCase.js: Added.
     43        (WI.AuditTestCase.prototype.get id):
     44        (WI.AuditTestCase.prototype.get name):
     45        (WI.AuditTestCase.prototype.get suite):
     46        (WI.AuditTestCase.prototype.get test):
     47        (WI.AuditTestCase.prototype.get setup):
     48        (WI.AuditTestCase.prototype.get tearDown):
     49        (WI.AuditTestCase.prototype.get errorDetails):
     50        (WI.AuditTestCase):
     51        * UserInterface/Models/AuditTestSuite.js: Added.
     52        (WI.AuditTestSuite):
     53        (WI.AuditTestSuite.testCaseDescriptors):
     54        (WI.AuditTestSuite.prototype.get id):
     55        (WI.AuditTestSuite.prototype.get name):
     56        (WI.AuditTestSuite.prototype.get testCases):
     57        (WI.AuditTestSuite.prototype._buildTestCasesFromDescriptors):
     58        * UserInterface/Test.html:
     59
    1602018-07-16  Nikita Vasilyev  <nvasilyev@apple.com>
    261
  • trunk/Source/WebInspectorUI/UserInterface/Main.html

    r232811 r233858  
    453453    <script src="Models/XHRBreakpoint.js"></script>
    454454
     455    <script src="Models/AuditReport.js"></script>
     456    <script src="Models/AuditResult.js"></script>
     457    <script src="Models/AuditTestCase.js"></script>
     458    <script src="Models/AuditTestSuite.js"></script>
     459
    455460    <script src="Proxies/FormatterWorkerProxy.js"></script>
    456461    <script src="Proxies/HeapSnapshotDiffProxy.js"></script>
     
    816821
    817822    <script src="Controllers/AnalyzerManager.js"></script>
     823    <script src="Controllers/AuditManager.js"></script>
    818824    <script src="Controllers/ApplicationCacheManager.js"></script>
    819825    <script src="Controllers/BasicBlockAnnotator.js"></script>
  • trunk/Source/WebInspectorUI/UserInterface/Test.html

    r233800 r233858  
    197197    <script src="Models/XHRBreakpoint.js"></script>
    198198
     199    <script src="Models/AuditReport.js"></script>
     200    <script src="Models/AuditResult.js"></script>
     201    <script src="Models/AuditTestCase.js"></script>
     202    <script src="Models/AuditTestSuite.js"></script>
     203
    199204    <script src="Proxies/FormatterWorkerProxy.js"></script>
    200205    <script src="Proxies/HeapSnapshotDiffProxy.js"></script>
     
    204209    <script src="Proxies/HeapSnapshotWorkerProxy.js"></script>
    205210
     211    <script src="Controllers/AuditManager.js"></script>
    206212    <script src="Controllers/BreakpointLogMessageLexer.js"></script>
    207213    <script src="Controllers/CSSStyleManager.js"></script>
Note: See TracChangeset for help on using the changeset viewer.