Re: [payment-request-tests] Add PaymentRequest constructor tests (#3441)

# Chrome #
Testing revision d23baa14aa3027207ae4da6039ff26ea8f179e2d
Starting 10 test iterations
All results were stable

## All results ##

### /payment-request/paymentrequest-constructor.html ###
|                                                                                                                                               Subtest                                                                                                                                                | Results |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
|                                                                                                                                                                                                                                                                                                      | OK      |
| Invalid "value" field "10-" should throw (shippingOptions.0)                                                                                                                                                                                                                                         | FAIL    |
| Null currency code should not throw (displayItems.0)                                                                                                                                                                                                                                                 | FAIL    |
| Invalid "value" field "1.0.0" should throw (modifiers.0.total)                                                                                                                                                                                                                                       | FAIL    |
| Non-ISO4217 currency code usd should not throw ("any string is considered valid") (displayItems.0)                                                                                                                                                                                                   | FAIL    |
| Creating a PaymentRequest with extra parameters should not throw or crash.                                                                                                                                                                                                                           | FAIL    |
| PaymentRequest constructor should throw for null required parameter.                                                                                                                                                                                                                                 | FAIL    |
| Invalid "value" field "1.0.0" should throw (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                                                    | FAIL    |
| Array value for payment method specific data parameter should throw. ("For each PaymentMethodData in methodData, if the data field is supplied but is not a JSON-serializable object, then throw a TypeError.")                                                                                      | FAIL    |
| Creating a PaymentRequest with undefined optional parameters should not throw or crash.                                                                                                                                                                                                              | FAIL    |
| Empty currency code should not throw ("any string is considered valid") (displayItems.0)                                                                                                                                                                                                             | FAIL    |
| Non-ISO4217 currency code US should not throw ("any string is considered valid") (displayItems.0)                                                                                                                                                                                                    | FAIL    |
| Invalid "value" field "-" should throw (displayItems.0)                                                                                                                                                                                                                                              | FAIL    |
| Invalid "value" field "10-" should throw (displayItems.0)                                                                                                                                                                                                                                            | FAIL    |
| Undefined display items should not throw.                                                                                                                                                                                                                                                            | FAIL    |
| Empty string for payment method specific data parameter should throw. ("For each PaymentMethodData in methodData, if the data field is supplied but is not a JSON-serializable object, then throw a TypeError.")                                                                                     | FAIL    |
| Invalid "value" field "-.99" should throw (shippingOptions.0)                                                                                                                                                                                                                                        | FAIL    |
| Invalid "value" field "-10." should throw (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                                                     | FAIL    |
| Non-ISO4217 currency code US1 should not throw ("any string is considered valid") (total)                                                                                                                                                                                                            | FAIL    |
| Null currency code should not throw (modifiers.0.total)                                                                                                                                                                                                                                              | FAIL    |
| Absence of supportedMethods in modifiers should throw TypeError.                                                                                                                                                                                                                                     | FAIL    |
| Undefined "value" field should throw (modifiers.0.total)                                                                                                                                                                                                                                             | FAIL    |
| Invalid "value" field ".99" should throw (shippingOptions.0)                                                                                                                                                                                                                                         | FAIL    |
| Undefined "value" field should throw (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                                                          | FAIL    |
| Invalid "value" field "ALSONOTDIGITS" should throw (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                                            | FAIL    |
| Invalid "value" field "notdigits" should throw (displayItems.0)                                                                                                                                                                                                                                      | FAIL    |
| Infinite JSON value for one of the payment method specific data pieces should throw. ("For each PaymentMethodData in methodData, if the data field is supplied but is not a JSON-serializable object, then throw a TypeError.")                                                                      | FAIL    |
| Invalid "value" field "notdigits" should throw (modifiers.0.total)                                                                                                                                                                                                                                   | FAIL    |
| Invalid "value" field "1/3" should throw (displayItems.0)                                                                                                                                                                                                                                            | FAIL    |
| Invalid "value" field "-10." should throw (shippingOptions.0)                                                                                                                                                                                                                                        | FAIL    |
| Invalid "value" field "1-0" should throw (shippingOptions.0)                                                                                                                                                                                                                                         | FAIL    |
| Null currency code should not throw (total)                                                                                                                                                                                                                                                          | FAIL    |
| Creating a PaymentRequest with null optional parameters should not throw or crash.                                                                                                                                                                                                                   | FAIL    |
| Non-ISO4217 currency code USDO should not throw ("any string is considered valid") (shippingOptions.0)                                                                                                                                                                                               | FAIL    |
| Invalid "value" field "1.0.0" should throw (total)                                                                                                                                                                                                                                                   | FAIL    |
| Negative line item value should not throw.                                                                                                                                                                                                                                                           | FAIL    |
| Null "value" field should throw (displayItems.0)                                                                                                                                                                                                                                                     | FAIL    |
| Undefined "value" field should throw (total)                                                                                                                                                                                                                                                         | FAIL    |
| Empty "value" field should throw (shippingOptions.0)                                                                                                                                                                                                                                                 | FAIL    |
| Invalid "value" field "10." should throw (shippingOptions.0)                                                                                                                                                                                                                                         | FAIL    |
| Invalid "value" field "10." should throw (displayItems.0)                                                                                                                                                                                                                                            | FAIL    |
| Null "value" field should throw (total)                                                                                                                                                                                                                                                              | FAIL    |
| Non-ISO4217 currency code usd should not throw ("any string is considered valid") (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                             | FAIL    |
| Undefined currency code should throw (shippingOptions.0)                                                                                                                                                                                                                                             | FAIL    |
| Empty supported payment method identifiers should throw TypeError. ("For each PaymentMethodData dictionary, if the length of the supportedMethods sequence is zero, then throw a TypeError.")                                                                                                        | FAIL    |
| Non-ISO4217 currency code USDO should not throw ("any string is considered valid") (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                            | FAIL    |
| Empty details should throw                                                                                                                                                                                                                                                                           | FAIL    |
| Duplicate supported payment method identifiers should throw TypeError (2). ("If a payment method identifier appears more than once in the methodData or details.modifiers sequences, then throw a TypeError.")                                                                                       | FAIL    |
| Null "value" field should throw (shippingOptions.0)                                                                                                                                                                                                                                                  | FAIL    |
| Non-ISO4217 currency code US should not throw ("any string is considered valid") (shippingOptions.0)                                                                                                                                                                                                 | FAIL    |
| Invalid "value" field "10-" should throw (modifiers.0.total)                                                                                                                                                                                                                                         | FAIL    |
| Non-ISO4217 currency code US1 should not throw ("any string is considered valid") (displayItems.0)                                                                                                                                                                                                   | FAIL    |
| Duplicate shipping option identifiers should throw TypeError.                                                                                                                                                                                                                                        | FAIL    |
| Invalid "value" field "1/3" should throw (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                                                      | FAIL    |
| Creating a PaymentRequest with empty optional parameters should not throw or crash.                                                                                                                                                                                                                  | FAIL    |
| Non-ISO4217 currency code US1 should not throw ("any string is considered valid") (shippingOptions.0)                                                                                                                                                                                                | FAIL    |
| Null "value" field should throw (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                                                               | FAIL    |
| Invalid "value" field "-.99" should throw (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                                                     | FAIL    |
| Undefined currency code should throw (total)                                                                                                                                                                                                                                                         | FAIL    |
| Invalid "value" field "10." should throw (total)                                                                                                                                                                                                                                                     | FAIL    |
| PaymentRequest constructor should throw for incorrect parameter types.                                                                                                                                                                                                                               | FAIL    |
| Empty currency code should not throw ("any string is considered valid") (modifiers.0.total)                                                                                                                                                                                                          | FAIL    |
| Invalid "value" field "-10." should throw (displayItems.0)                                                                                                                                                                                                                                           | FAIL    |
| Invalid "value" field "-10." should throw (modifiers.0.total)                                                                                                                                                                                                                                        | FAIL    |
| Undefined supportedMethods in modifiers should throw TypeError.                                                                                                                                                                                                                                      | FAIL    |
| Empty display items should not throw.                                                                                                                                                                                                                                                                | FAIL    |
| Duplicate supported payment method identifiers in modifiers should throw TypeError (1). ("If a payment method identifier appears more than once in the methodData or details.modifiers sequences, then throw a TypeError.")                                                                          | FAIL    |
| Invalid "value" field ".99" should throw (modifiers.0.total)                                                                                                                                                                                                                                         | FAIL    |
| Invalid "value" field "-" should throw (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                                                        | FAIL    |
| Invalid "value" field "-" should throw (modifiers.0.total)                                                                                                                                                                                                                                           | FAIL    |
| Invalid "value" field "-.99" should throw (total)                                                                                                                                                                                                                                                    | FAIL    |
| Non-ISO4217 currency code USDO should not throw ("any string is considered valid") (modifiers.0.total)                                                                                                                                                                                               | FAIL    |
| Empty "value" field should throw (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                                                              | FAIL    |
| Invalid "value" field "10." should throw (modifiers.0.total)                                                                                                                                                                                                                                         | FAIL    |
| Invalid "value" field ".99" should throw (total)                                                                                                                                                                                                                                                     | FAIL    |
| Non-ISO4217 currency code US should not throw ("any string is considered valid") (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                              | FAIL    |
| Undefined modifiers should not throw.                                                                                                                                                                                                                                                                | FAIL    |
| Invalid "value" field "1/3" should throw (shippingOptions.0)                                                                                                                                                                                                                                         | FAIL    |
| Non-ISO4217 currency code US1 should not throw ("any string is considered valid") (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                             | FAIL    |
| Invalid "value" field "1-0" should throw (displayItems.0)                                                                                                                                                                                                                                            | FAIL    |
| Undefined currency code should throw (displayItems.0)                                                                                                                                                                                                                                                | FAIL    |
| Invalid "value" field ".99" should throw (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                                                      | FAIL    |
| Numeric value for payment method specific data parameter should throw. ("For each PaymentMethodData in methodData, if the data field is supplied but is not a JSON-serializable object, then throw a TypeError.")                                                                                    | FAIL    |
| Null shipping options should throw                                                                                                                                                                                                                                                                   | FAIL    |
| Invalid "value" field "notdigits" should throw (total)                                                                                                                                                                                                                                               | FAIL    |
| Empty currency code should not throw ("any string is considered valid") (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                       | FAIL    |
| Invalid "value" field "notdigits" should throw (shippingOptions.0)                                                                                                                                                                                                                                   | FAIL    |
| Non-ISO4217 currency code US should not throw ("any string is considered valid") (modifiers.0.total)                                                                                                                                                                                                 | FAIL    |
| Invalid "value" field "ALSONOTDIGITS" should throw (displayItems.0)                                                                                                                                                                                                                                  | FAIL    |
| Non-ISO4217 currency code usd should not throw ("any string is considered valid") (modifiers.0.total)                                                                                                                                                                                                | FAIL    |
| Invalid "value" field "-.99" should throw (modifiers.0.total)                                                                                                                                                                                                                                        | FAIL    |
| Invalid "value" field "10." should throw (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                                                      | FAIL    |
| PaymentRequest constructor should throw for undefined required parameters.                                                                                                                                                                                                                           | FAIL    |
| Negative total value should throw a TypeError. ("If the first character of details.total.amount.value is U+002D HYPHEN-MINUS, then throw a TypeError. total must be a non-negative amount.")                                                                                                         | FAIL    |
| Null "value" field should throw (modifiers.0.total)                                                                                                                                                                                                                                                  | FAIL    |
| Duplicate supported payment method identifiers should throw TypeError (1). ("If a payment method identifier appears more than once in the methodData or details.modifiers sequences, then throw a TypeError.")                                                                                       | FAIL    |
| Invalid "value" field "1/3" should throw (modifiers.0.total)                                                                                                                                                                                                                                         | FAIL    |
| Null supportedMethods in modifiers should throw TypeError.                                                                                                                                                                                                                                           | FAIL    |
| Non-ISO4217 currency code USDO should not throw ("any string is considered valid") (displayItems.0)                                                                                                                                                                                                  | FAIL    |
| Null currency code should not throw (shippingOptions.0)                                                                                                                                                                                                                                              | FAIL    |
| Empty currency code should not throw ("any string is considered valid") (shippingOptions.0)                                                                                                                                                                                                          | FAIL    |
| Undefined "value" field should throw (displayItems.0)                                                                                                                                                                                                                                                | FAIL    |
| Invalid "value" field "10-" should throw (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                                                      | FAIL    |
| Undefined currency code should throw (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                                                          | FAIL    |
| Duplicate supported payment method identifiers in modifiers should throw TypeError (2). ("If a payment method identifier appears more than once in the methodData or details.modifiers sequences, then throw a TypeError.")                                                                          | FAIL    |
| Empty modifiers should throw TypeError.                                                                                                                                                                                                                                                              | FAIL    |
| Invalid "value" field "ALSONOTDIGITS" should throw (modifiers.0.total)                                                                                                                                                                                                                               | FAIL    |
| Invalid "value" field "ALSONOTDIGITS" should throw (shippingOptions.0)                                                                                                                                                                                                                               | FAIL    |
| Invalid "value" field ".99" should throw (displayItems.0)                                                                                                                                                                                                                                            | FAIL    |
| Null for payment method specific data parameter should throw. ("For each PaymentMethodData in methodData, if the data field is supplied but is not a JSON-serializable object, then throw a TypeError.")                                                                                             | FAIL    |
| Creating a PaymentRequest with omitted optional parameters should not throw or crash.                                                                                                                                                                                                                | FAIL    |
| Invalid "value" field "-.99" should throw (displayItems.0)                                                                                                                                                                                                                                           | FAIL    |
| Empty "value" field should throw (total)                                                                                                                                                                                                                                                             | FAIL    |
| Empty currency code should not throw ("any string is considered valid") (total)                                                                                                                                                                                                                      | FAIL    |
| Non-negative total value in PaymentDetailsModifier should not throw.                                                                                                                                                                                                                                 | FAIL    |
| Non-ISO4217 currency code usd should not throw ("any string is considered valid") (shippingOptions.0)                                                                                                                                                                                                | FAIL    |
| Empty "value" field should throw (modifiers.0.total)                                                                                                                                                                                                                                                 | FAIL    |
| Null items should throw                                                                                                                                                                                                                                                                              | FAIL    |
| Absence of total should throw TypeError. ("If details does not contain a value for total, then throw a TypeError.")                                                                                                                                                                                  | FAIL    |
| Non-ISO4217 currency code USDO should not throw ("any string is considered valid") (total)                                                                                                                                                                                                           | FAIL    |
| Empty list of supported payment method identifiers should throw TypeError. ("If the length of the methodData sequence is zero, then throw a TypeError.")                                                                                                                                             | FAIL    |
| Invalid "value" field "1/3" should throw (total)                                                                                                                                                                                                                                                     | FAIL    |
| String value for payment method specific data parameter should throw. ("For each PaymentMethodData in methodData, if the data field is supplied but is not a JSON-serializable object, then throw a TypeError.")                                                                                     | FAIL    |
| Invalid "value" field "-" should throw (total)                                                                                                                                                                                                                                                       | FAIL    |
| Empty "value" field should throw (displayItems.0)                                                                                                                                                                                                                                                    | FAIL    |
| Invalid "value" field "1-0" should throw (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                                                      | FAIL    |
| Undefined "value" field should throw (shippingOptions.0)                                                                                                                                                                                                                                             | FAIL    |
| Invalid "value" field "ALSONOTDIGITS" should throw (total)                                                                                                                                                                                                                                           | FAIL    |
| Non-ISO4217 currency code US1 should not throw ("any string is considered valid") (modifiers.0.total)                                                                                                                                                                                                | FAIL    |
| Null currency code should not throw (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                                                           | FAIL    |
| Non-ISO4217 currency code usd should not throw ("any string is considered valid") (total)                                                                                                                                                                                                            | FAIL    |
| Invalid "value" field "notdigits" should throw (modifiers.0.additionalDisplayItems.0)                                                                                                                                                                                                                | FAIL    |
| Non-negative total value should not throw.                                                                                                                                                                                                                                                           | FAIL    |
| Invalid "value" field "1.0.0" should throw (shippingOptions.0)                                                                                                                                                                                                                                       | FAIL    |
| Invalid "value" field "1-0" should throw (modifiers.0.total)                                                                                                                                                                                                                                         | FAIL    |
| Invalid "value" field "1.0.0" should throw (displayItems.0)                                                                                                                                                                                                                                          | FAIL    |
| Undefined currency code should throw (modifiers.0.total)                                                                                                                                                                                                                                             | FAIL    |
| Invalid "value" field "-" should throw (shippingOptions.0)                                                                                                                                                                                                                                           | FAIL    |
| Non-ISO4217 currency code US should not throw ("any string is considered valid") (total)                                                                                                                                                                                                             | FAIL    |
| Invalid "value" field "1-0" should throw (total)                                                                                                                                                                                                                                                     | FAIL    |
| Empty supportedMethods in modifiers should throw TypeError. ("For each PaymentMethodData dictionary, if the length of the supportedMethods sequence is zero, then throw a TypeError.")                                                                                                               | FAIL    |
| Invalid "value" field "-10." should throw (total)                                                                                                                                                                                                                                                    | FAIL    |
| Invalid "value" field "10-" should throw (total)                                                                                                                                                                                                                                                     | FAIL    |
| Negative total value in PaymentDetailsModifier should throw a TypeError. ("For each PaymentDetailsModifier in details.modifiers, if the total field is supplied and the first character of total.amount.value is U+002D HYPHEN-MINUS, then throw a TypeError. total must be a non-negative amount.") | FAIL    |

View on GitHub: https://github.com/w3c/web-platform-tests/pull/3441#issuecomment-256609640

Received on Thursday, 27 October 2016 10:52:40 UTC