Web Inspector: InspectorTest should be a subclass of TestHarness
authorbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Aug 2015 23:37:05 +0000 (23:37 +0000)
committerbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Aug 2015 23:37:05 +0000 (23:37 +0000)
commit505e5499cf9991c2d577bfee0f315d47ad533ee2
tree1205816571393ab0d15a1e4ef2b9747826f845b8
parent37c0047c30800dfe1a5e8f9f5f5ae297bd9243ea
Web Inspector: InspectorTest should be a subclass of TestHarness
https://bugs.webkit.org/show_bug.cgi?id=148079

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

Extract the frontend test harness into a subclass. Delete some code that
is now redundant. Sprinkle some ES6 syntax where possible.

Rewrite the code that redirects the Inspector page's console messages to
the test page, since it didn't appear to work any more.

* UserInterface/Test.html:
* UserInterface/Test/FrontendTestHarness.js: Added.
(FrontendTestHarness):
(FrontendTestHarness.prototype.completeTest):
(FrontendTestHarness.prototype.addResult):
(FrontendTestHarness.prototype.debugLog):
(FrontendTestHarness.prototype.evaluateInPage):
(FrontendTestHarness.prototype.expectNoError):
(FrontendTestHarness.prototype.testPageDidLoad):
(FrontendTestHarness.prototype.reloadPage):
(FrontendTestHarness.prototype.redirectConsoleToTestOutput.createProxyConsoleHandler):
(FrontendTestHarness.prototype.redirectConsoleToTestOutput):
(FrontendTestHarness.prototype.reportUncaughtException):
(FrontendTestHarness.prototype._resendResults):
* UserInterface/Test/Test.js:
(InspectorTest.EventDispatcher.prototype.dispatchEvent): Deleted.
(InspectorTest.EventDispatcher): Deleted.
(InspectorTest.log): Deleted.
(InspectorTest.assert): Deleted.
(InspectorTest.expectThat): Deleted.
(InspectorTest.debugLog): Deleted.
(InspectorTest.expectNoError): Deleted.
(InspectorTest.completeTest): Deleted.
(InspectorTest.evaluateInPage): Deleted.
(InspectorTest.addResult): Deleted.
(InspectorTest._resendResults): Deleted.
(InspectorTest.testPageDidLoad): Deleted.
(InspectorTest.reloadPage): Deleted.
(InspectorTest.reportUncaughtException): Deleted.

LayoutTests:

Rename InspectorTestProxy to TestPage.

* http/tests/inspector/debugger/debugger-test.js:
* http/tests/inspector/dom/shapes-test.js:
* http/tests/inspector/replay/replay-test.js:
* http/tests/inspector/resources/inspector-test.js:
(TestPage.registerInitializer):
(runTest):
(TestPage.completeTest):
(TestPage.debugLog):
(TestPage.addResult):
(TestPage.reportUncaughtException):
(InspectorTestProxy.registerInitializer): Deleted.
(InspectorTestProxy.completeTest): Deleted.
(InspectorTestProxy.debugLog): Deleted.
(InspectorTestProxy.addResult): Deleted.
(InspectorTestProxy.reportUncaughtException): Deleted.
* inspector/debugger/breakpoint-action-eval.html:
* inspector/debugger/resources/break-on-exception-tests.js:
* inspector/debugger/resources/script-for-breakpoint-actions.js:
(breakpointActions):
* inspector/debugger/search-scripts.html:
* inspector/replay/window-navigator-plugins-memoized.html:
* inspector/timeline/debugger-paused-while-recording.html:
* inspector/timeline/exception-in-injected-script-while-recording.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/debugger/debugger-test.js
LayoutTests/http/tests/inspector/dom/shapes-test.js
LayoutTests/http/tests/inspector/replay/replay-test.js
LayoutTests/http/tests/inspector/resources/inspector-test.js
LayoutTests/inspector/debugger/breakpoint-action-eval.html
LayoutTests/inspector/debugger/resources/break-on-exception-tests.js
LayoutTests/inspector/debugger/resources/script-for-breakpoint-actions.js
LayoutTests/inspector/debugger/search-scripts.html
LayoutTests/inspector/replay/window-navigator-plugins-memoized.html
LayoutTests/inspector/timeline/debugger-paused-while-recording.html
LayoutTests/inspector/timeline/exception-in-injected-script-while-recording.html
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Test.html
Source/WebInspectorUI/UserInterface/Test/FrontendTestHarness.js [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Test/Test.js