Web Inspector: InspectorTest.evaluateInPage should return a rejection if an error...
authorbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Dec 2017 01:29:57 +0000 (01:29 +0000)
committerbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Dec 2017 01:29:57 +0000 (01:29 +0000)
commit7fa29522645242ccaa64f5445faead6295ee60e8
tree5fe671cbf253e4951137ef5894566832b9d864fc
parentf92a8236d1f8ab8ce3616479c3540bd976884d82
Web Inspector: InspectorTest.evaluateInPage should return a rejection if an error was thrown
https://bugs.webkit.org/show_bug.cgi?id=180956

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

* UserInterface/Test/FrontendTestHarness.js:
(FrontendTestHarness.prototype.evaluateInPage.translateResult): Renamed.
(FrontendTestHarness.prototype.evaluateInPage):
If the result was thrown, then reject with the error.
Rename the helper method to match the same one in RemoteObject.prototype.fetchProperties.

LayoutTests:

* inspector/unit-tests/test-harness-evaluate-in-page-expected.txt:
* inspector/unit-tests/test-harness-evaluate-in-page.html:
Update test case to expect an exception when an error was thrown in our evaluation.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/unit-tests/test-harness-evaluate-in-page-expected.txt
LayoutTests/inspector/unit-tests/test-harness-evaluate-in-page.html
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Test/FrontendTestHarness.js