Web Inspector: Show Internal properties of PaymentRequest in Web Inspector Console
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Nov 2017 00:36:15 +0000 (00:36 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Nov 2017 00:36:15 +0000 (00:36 +0000)
commit2fa1c3be623ad93e3e8ca001602abbfe704ff31e
treecaac866a7e61c925647e96b2d8398b8d1eb5c740
parent52d04baf31a2837e13d4da5d44350e93d0730293
Web Inspector: Show Internal properties of PaymentRequest in Web Inspector Console
https://bugs.webkit.org/show_bug.cgi?id=179276

Reviewed by Andy Estes.

Source/JavaScriptCore:

* inspector/InjectedScriptHost.h:
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::getInternalProperties):
Call through to virtual implementation so that WebCore can provide custom
internal properties for Web / DOM objects.

Source/WebCore:

Test: http/tests/inspector/runtime/internal-properties-payment-request.https.html

* Modules/paymentrequest/PaymentRequest.h:
Expose access to internal state.

* inspector/WebInjectedScriptHost.h:
* inspector/WebInjectedScriptHost.cpp:
(WebCore::constructInternalProperty):
(WebCore::WebInjectedScriptHost::getInternalProperties):
Provide internal properties for a PaymentRequest.

* testing/Internals.cpp:
(WebCore::Internals::withUserGesture):
* testing/Internals.h:
* testing/Internals.idl:
Provide a simple way to run code inside of a user gesture.

Source/WebInspectorUI:

* UserInterface/Test.html:
* UserInterface/Test/FrontendTestHarness.js:
(FrontendTestHarness.prototype.evaluateInPage):
* UserInterface/Test/TestUtilities.js: Added.
(promisify):
Make async tests a little easier to work with by providing promises
in some cases that would normally take a callback.

LayoutTests:

* TestExpectations:
* platform/mac-wk2/TestExpectations:
Pass test on platforms that support Payment Requests.

* http/tests/inspector/paymentrequest/payment-request-internal-properties.https-expected.txt: Added.
* http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html: Added.
Test for internal properties on PaymentRequest instances.

* resources/ui-helper.js:
(window.UIHelper.withUserGesture):
Provide an easier way to simulate work inside of a user gesture.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/http/tests/inspector/network/resource-response-service-worker.html
LayoutTests/http/tests/inspector/paymentrequest/payment-request-internal-properties.https-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html [new file with mode: 0644]
LayoutTests/platform/mac-wk2/TestExpectations
LayoutTests/resources/ui-helper.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/InjectedScriptHost.h
Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp
Source/WebCore/ChangeLog
Source/WebCore/Modules/paymentrequest/PaymentRequest.h
Source/WebCore/html/VoidCallback.idl
Source/WebCore/inspector/WebInjectedScriptHost.cpp
Source/WebCore/inspector/WebInjectedScriptHost.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Test.html
Source/WebInspectorUI/UserInterface/Test/FrontendTestHarness.js
Source/WebInspectorUI/UserInterface/Test/TestUtilities.js [new file with mode: 0644]