Add a new member mAllowPaymentRequest on nsIDocument and following related
methods,
bool AllowPaymentRequest() const
void SetAllowPaymentRequest(bool aAllowPaymentRequest)
mAllowPaymentRequest is used to check if PaymentRequest is allowed to use on
the document. According to the spec
https://html.spec.whatwg.org/multipage/iframe-embed-object.html#allowed-to-use
the mAllowPaymentRequest should be true under following situations
1. The document is the top level content document.
2. The document is the same origin with its parent document and its parent
document's mAllowPaymentRequest is true.
3. The document is different origin with its parent document but its
parent node is an iframe with allowpaymentrequest flag and the parent
document's mAllowPaymentRquest is true.
This patch also include following mochitests
1. test for allowpaymentrequest flag changing. The flag change effect should
not be applied to the document immediately, it should be updated while
the browsing context is updated.
2. test for effect propagation in the nested iframe.
1. PaymentRequest::PrefEnabled() returns false under non-e10s situation.
2. Add a new mochitest test_block_none10s.html to expect to get ReferenceError
in non-e10s mode.
1. Test PaymentRequest construction with valid PMIs.
2. Test PaymentRequest construction with Invalid PMIs.
3. Test PaymentRequestUpdateEvent::updateWith with a valid PMI.
4. Test PaymentRequestUpdateEvent::updateWith with a invalid PMI.
Remove unnecessary html tags in html files.
This patch changes the test_construction.html with following modification.
1. Modify the test testWithDuplicateShippingOptionsParameters to expect a
TypeError when constructing wiht duplicate shippingOption ids.
2. Add test testShippingOtpionAttribute for shippingOption setting checking
with following conditions
1. No selected shippingOption and PaymentOptions.requestShipping is false
2. One selected shippingOption and PaymentOptions.requestShipping is false
3. One selected shippingOption and PaymentOptions.requestShipping is true
4. Multiple selected shippingOptions and PaymentOptions.requestShipping is
true.
1. Create a new test test_currency_amount_validation.html to test validation
with following scenarios
* test with well formed currency codes.
* test with invalid currency codes.
* test with valid lower case currency codes and check is it converted to
upper case.
* test with invalid currency codes while calling
PaymentRequestUpdateEvent::updateWith().
* test with invalid amount value with calling
PaymentRequestUpdateEvent::updateWith().
2. Move tests of test_validate_decimal_value.html to
test_currency_amount_validation.html
1. Adding new checks in ConstructorChromeScript.js to checking the top level
document's principal information.
2. Adding a new test testCrossOriginTopLevelPrincipal in
test_constructor.html to testing the topLevelPrincipal attribute under
cross origin situation.
3. Removing some useless mochitest browser-chrome testcase.