PaymentRequest should throw if not in top context.

The PaymentRequest specification currently states that PaymentRequest
can be constructed only in a top-level browsing context. When inside of
an iframe, the constructor should throw a SecurityError.

https://w3c.github.io/browser-payment-api/specs/paymentrequest.html#paymentrequest-constructor

Note this may change in the future via iframe sandboxing.

https://github.com/w3c/browser-payment-api/issues/2

BUG=587995

Review-Url: https://codereview.chromium.org/2029473002
Cr-Commit-Position: refs/heads/master@{#397035}
2 files changed