[Payment Request] Implement the PaymentRequest constructor
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Aug 2017 17:41:04 +0000 (17:41 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Aug 2017 17:41:04 +0000 (17:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=175755

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/payment-request/payment-request-constructor.https-expected.txt:
* web-platform-tests/payment-request/payment-request-id.https-expected.txt:

Source/WebCore:

* Modules/paymentrequest/PaymentDetailsModifier.h: Changed total to an std::optional<PaymentItem>.
* Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::isWellFormedCurrencyCode): Implements the IsWellFormedCurrencyCode abstract operation from ECMA 402.
(WebCore::isValidDecimalMonetaryValue): Implements the "valid decimal monetary value" validity checker.
(WebCore::checkAndCanonicalizeAmount): Implements the "check and canonicalize amount" validity checker.
(WebCore::checkAndCanonicalizeTotal): Implements the "check and canonicalize total" validity checker.
(WebCore::PaymentRequest::create): Implements the PaymentRequest Constructor
(WebCore::PaymentRequest::PaymentRequest):
(WebCore::PaymentRequest::id const): Implements the PaymentRequest id attribute.
(WebCore::PaymentRequest::shippingType const): Implements the PaymentRequest shippingType attribute.
* Modules/paymentrequest/PaymentRequest.h:
* Modules/paymentrequest/PaymentRequest.idl: Annotated PaymentRequest with ConstructorMayThrowException.
* WebCore.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220971 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-constructor.https-expected.txt
LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-id.https-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/paymentrequest/PaymentDetailsModifier.h
Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp
Source/WebCore/Modules/paymentrequest/PaymentRequest.h
Source/WebCore/Modules/paymentrequest/PaymentRequest.idl
Source/WebCore/WebCore.xcodeproj/project.pbxproj

index fc1222d..7632acf 100644 (file)
@@ -1,3 +1,13 @@
+2017-08-21  Andy Estes  <aestes@apple.com>
+
+        [Payment Request] Implement the PaymentRequest constructor
+        https://bugs.webkit.org/show_bug.cgi?id=175755
+
+        Reviewed by Darin Adler.
+
+        * web-platform-tests/payment-request/payment-request-constructor.https-expected.txt:
+        * web-platform-tests/payment-request/payment-request-id.https-expected.txt:
+
 2017-08-19  Andy Estes  <aestes@apple.com>
 
         [Payment Request] Add interface stubs
index c8ff62c..c0b7423 100644 (file)
 
-FAIL If details.id is missing, assign a identifier assert_true: must be some truthy value expected true got false
-FAIL If details.id is missing, assign a unique identifier assert_not_equals: UA generated ID must be unique got disallowed value ""
-FAIL If the same id is provided, then use it assert_equals: id must be test123 expected "test123" but got ""
-FAIL Use ids even if they are strange assert_equals: id must be provided value, even if very long and contain spaces expected "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" but got ""
-FAIL Use provided request ID assert_equals: expected "foo" but got ""
-FAIL If the length of the methodData sequence is zero, then throw a TypeError assert_throws: function "() => {
-      new PaymentRequest([], {
-        total: {
-          label: "",
-          amount: {
-            currency: "USD",
-            value: "1.00",
-          },
-        },
-      });
-    }" did not throw
-FAIL If the length of the paymentMethod.supportedMethods sequence is zero, then throw a TypeError assert_throws: function "() => {
-      new PaymentRequest(
-        [
-          {
-            supportedMethods: [],
-          },
-        ],
-        {
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.00",
-            },
-          },
-        }
-      );
-    }" did not throw
+PASS If details.id is missing, assign a identifier 
+PASS If details.id is missing, assign a unique identifier 
+PASS If the same id is provided, then use it 
+PASS Use ids even if they are strange 
+PASS Use provided request ID 
+PASS If the length of the methodData sequence is zero, then throw a TypeError 
+PASS If the length of the paymentMethod.supportedMethods sequence is zero, then throw a TypeError 
 PASS Method data must be JSON-serializable object (a list in this case) 
 PASS Method data must be JSON-serializable object (an object in this case) 
-FAIL Rethrow any exceptions of JSON-serializing paymentMethod.data into a string assert_throws: function "() => {
-      new PaymentRequest(
-        [
-          {
-            supportedMethods: ["basic-card"],
-            data: recursiveDictionary,
-          },
-        ],
-        {
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.00",
-            },
-          },
-        }
-      );
-    }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "-"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "notdigits"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "ALSONOTDIGITS"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "10."), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case ".99"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "-10."), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "-.99"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "10-"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "1-0"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "1.0.0"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "1/3"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case ""), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "null"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case " 1.0  "), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case " 1.0 "), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "1.0 "), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "USD$1.0"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "$1.0"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case " 1.0"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "-1"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "-1.0"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "-1.00"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If details.total.amount.value is not a valid decimal monetary value (in this case "-1000.000"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          }
-        );
-      }" did not throw
+PASS Rethrow any exceptions of JSON-serializing paymentMethod.data into a string 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "-"), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "notdigits"), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "ALSONOTDIGITS"), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "10."), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case ".99"), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "-10."), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "-.99"), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "10-"), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "1-0"), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "1.0.0"), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "1/3"), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case ""), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "null"), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case " 1.0  "), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case " 1.0 "), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "1.0 "), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "USD$1.0"), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "$1.0"), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case " 1.0"), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "-1"), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "-1.0"), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "-1.00"), then throw a TypeError 
+PASS If details.total.amount.value is not a valid decimal monetary value (in this case "-1000.000"), then throw a TypeError 
 PASS PaymentDetailsBase.0 can be 0 length 
 PASS PaymentDetailsBase.1 can be 0 length 
 PASS PaymentDetailsBase.2 can be 0 length 
-FAIL If the first character of details.total.amount.value is U+002D HYPHEN-MINUS, then throw a TypeError assert_throws: function "() => {
-      new PaymentRequest(
-        [
-          {
-            supportedMethods: ["basic-card"],
-          },
-        ],
-        {
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "-1.00",
-            },
-          },
-        }
-      );
-    }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "-"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "notdigits"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "ALSONOTDIGITS"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "10."), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case ".99"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "-10."), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "-.99"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "10-"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "1-0"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "1.0.0"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "1/3"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case ""), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "null"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case " 1.0  "), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case " 1.0 "), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "1.0 "), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "USD$1.0"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "$1.0"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
-FAIL For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case " 1.0"), then throw a TypeError assert_throws: function "() => {
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.00",
-              },
-            },
-            displayItems: [
-              {
-                label: "",
-                amount: {
-                  currency: "USD",
-                  value: amount,
-                },
-              },
-            ],
-          }
-        );
-      }" did not throw
+PASS If the first character of details.total.amount.value is U+002D HYPHEN-MINUS, then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "-"), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "notdigits"), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "ALSONOTDIGITS"), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "10."), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case ".99"), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "-10."), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "-.99"), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "10-"), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "1-0"), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "1.0.0"), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "1/3"), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case ""), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "null"), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case " 1.0  "), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case " 1.0 "), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "1.0 "), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "USD$1.0"), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case "$1.0"), then throw a TypeError 
+PASS For each item in details.displayItems: if item.amount.value is not a valid decimal monetary value (in this case " 1.0"), then throw a TypeError 
 PASS Negative values are allowed for displayItems.amount.value, irrespective of total amount 
 PASS it handles high precision currency values without throwing 
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "-"), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "notdigits"), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "ALSONOTDIGITS"), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "10."), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case ".99"), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "-10."), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "-.99"), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "10-"), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "1-0"), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "1.0.0"), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "1/3"), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case ""), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "null"), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case " 1.0  "), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case " 1.0 "), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "1.0 "), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "USD$1.0"), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "$1.0"), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
-FAIL For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case " 1.0"), then throw a TypeError assert_throws: function "() => {
-        const invalidAmount = Object.assign({}, defaultAmount, {
-          value: amount,
-        });
-        const invalidShippingOption = Object.assign({}, defaultShippingOption, {
-          amount: invalidAmount,
-        });
-        const details = Object.assign({}, defaultDetails, {
-          shippingOptions: [invalidShippingOption],
-        });
-        new PaymentRequest(defaultMethods, details);
-      }" did not throw
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "-"), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "notdigits"), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "ALSONOTDIGITS"), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "10."), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case ".99"), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "-10."), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "-.99"), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "10-"), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "1-0"), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "1.0.0"), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "1/3"), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case ""), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "null"), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case " 1.0  "), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case " 1.0 "), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "1.0 "), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "USD$1.0"), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case "$1.0"), then throw a TypeError 
+PASS For each option in details.shippingOptions: if option.amount.value is not a valid decimal monetary value (in this case " 1.0"), then throw a TypeError 
 PASS If there is no selected shipping option, then PaymentRequest.shippingOption remains null 
-FAIL If there is a selected shipping option, then it becomes synchronously selected assert_equals: selected option must be PASS expected (string) "PASS" but got (object) null
-FAIL If there is a multiple selected shipping options, only the last is selected assert_equals: selected option must PASS expected (string) "PASS" but got (object) null
+PASS If there is a selected shipping option, then it becomes synchronously selected 
+PASS If there is a multiple selected shipping options, only the last is selected 
 PASS If there are any duplicate shipping option ids, then there are no shipping options 
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "-"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "notdigits"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "ALSONOTDIGITS"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "10."), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case ".99"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "-10."), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "-.99"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "10-"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "1-0"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "1.0.0"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "1/3"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case ""), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "null"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case " 1.0  "), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case " 1.0 "), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "1.0 "), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "USD$1.0"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "$1.0"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case " 1.0"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "-1"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "-1.0"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "-1.00"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If modifier.total.amount.value is not a valid decimal monetary value (in this case "-1000.000"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: amount,
-            },
-          },
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "-"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "notdigits"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "ALSONOTDIGITS"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "10."), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case ".99"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "-10."), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "-.99"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "10-"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "1-0"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "1.0.0"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "1/3"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case ""), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "null"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case " 1.0  "), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case " 1.0 "), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "1.0 "), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "USD$1.0"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "$1.0"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
-FAIL If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case " 1.0"), then throw a TypeError assert_throws: function "() => {
-        const invalidModifier = {
-          supportedMethods: ["basic-card"],
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.0",
-            },
-          },
-          additionalDisplayItems: [
-            {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: amount,
-              },
-            },
-          ],
-        };
-        new PaymentRequest(
-          [
-            {
-              supportedMethods: ["basic-card"],
-            },
-          ],
-          {
-            modifiers: [invalidModifier],
-            total: {
-              label: "",
-              amount: {
-                currency: "USD",
-                value: "1.0",
-              },
-            },
-          }
-        );
-      }" did not throw
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "-"), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "notdigits"), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "ALSONOTDIGITS"), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "10."), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case ".99"), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "-10."), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "-.99"), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "10-"), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "1-0"), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "1.0.0"), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "1/3"), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case ""), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "null"), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case " 1.0  "), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case " 1.0 "), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "1.0 "), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "USD$1.0"), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "$1.0"), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case " 1.0"), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "-1"), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "-1.0"), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "-1.00"), then throw a TypeError 
+PASS If modifier.total.amount.value is not a valid decimal monetary value (in this case "-1000.000"), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "-"), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "notdigits"), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "ALSONOTDIGITS"), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "10."), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case ".99"), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "-10."), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "-.99"), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "10-"), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "1-0"), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "1.0.0"), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "1/3"), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case ""), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "null"), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case " 1.0  "), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case " 1.0 "), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "1.0 "), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "USD$1.0"), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case "$1.0"), then throw a TypeError 
+PASS If amount.value of additionalDisplayItems is is not a valid decimal monetary value (in this case " 1.0"), then throw a TypeError 
 PASS Modifier data must be JSON-serializable object (a list in this case) 
 PASS Modifier data must be JSON-serializable object (a object in this case) 
-FAIL Rethrow any exceptions of JSON-serializing modifier.data into a string assert_throws: function "() => {
-      new PaymentRequest(
-        [
-          {
-            supportedMethods: ["basic-card"],
-          },
-        ],
-        {
-          total: {
-            label: "",
-            amount: {
-              currency: "USD",
-              value: "1.00",
-            },
-          },
-          modifiers: [
-            {
-              supportedMethods: ["basic-card"],
-              data: recursiveDictionary,
-            },
-          ],
-        }
-      );
-    }" did not throw
+PASS Rethrow any exceptions of JSON-serializing modifier.data into a string 
 PASS Shipping type should be valid 
 PASS PaymentRequest.shippingAddress must initially be null 
 PASS If options.requestShipping is not set, then request.shippingType attribute is null. 
-FAIL If options.requestShipping is true, request.shippingType will be options.shippingType. assert_equals: must be shipping expected (string) "shipping" but got (object) null
+PASS If options.requestShipping is true, request.shippingType will be options.shippingType. 
 
index 2d69b52..30b165e 100644 (file)
@@ -1,4 +1,4 @@
 
 
-FAIL Test for PaymentRequest identifier usage assert_equals: Payment identifier is not reflected correctly in PaymentRequest.id expected "my_payment_id" but got ""
+PASS Test for PaymentRequest identifier usage 
 
index 7715122..c5f66e4 100644 (file)
@@ -1,3 +1,24 @@
+2017-08-21  Andy Estes  <aestes@apple.com>
+
+        [Payment Request] Implement the PaymentRequest constructor
+        https://bugs.webkit.org/show_bug.cgi?id=175755
+
+        Reviewed by Darin Adler.
+
+        * Modules/paymentrequest/PaymentDetailsModifier.h: Changed total to an std::optional<PaymentItem>.
+        * Modules/paymentrequest/PaymentRequest.cpp:
+        (WebCore::isWellFormedCurrencyCode): Implements the IsWellFormedCurrencyCode abstract operation from ECMA 402.
+        (WebCore::isValidDecimalMonetaryValue): Implements the "valid decimal monetary value" validity checker.
+        (WebCore::checkAndCanonicalizeAmount): Implements the "check and canonicalize amount" validity checker.
+        (WebCore::checkAndCanonicalizeTotal): Implements the "check and canonicalize total" validity checker.
+        (WebCore::PaymentRequest::create): Implements the PaymentRequest Constructor
+        (WebCore::PaymentRequest::PaymentRequest):
+        (WebCore::PaymentRequest::id const): Implements the PaymentRequest id attribute.
+        (WebCore::PaymentRequest::shippingType const): Implements the PaymentRequest shippingType attribute.
+        * Modules/paymentrequest/PaymentRequest.h:
+        * Modules/paymentrequest/PaymentRequest.idl: Annotated PaymentRequest with ConstructorMayThrowException.
+        * WebCore.xcodeproj/project.pbxproj:
+
 2017-08-21  Per Arne Vollan  <pvollan@apple.com>
 
         [Win] DRT should only allow any https certificate for localhost.
index e46f840..eed9ab4 100644 (file)
@@ -37,7 +37,7 @@ namespace WebCore {
 
 struct PaymentDetailsModifier {
     String supportedMethods;
-    PaymentItem total;
+    std::optional<PaymentItem> total;
     Vector<PaymentItem> additionalDisplayItems;
     JSC::Strong<JSC::JSObject> data;
 };
index b692724..2be4081 100644 (file)
 
 #include "Document.h"
 #include "PaymentAddress.h"
+#include "PaymentCurrencyAmount.h"
+#include "PaymentDetailsInit.h"
+#include "PaymentMethodData.h"
 #include "PaymentOptions.h"
-#include <wtf/RunLoop.h>
+#include <JavaScriptCore/JSONObject.h>
+#include <JavaScriptCore/ThrowScope.h>
+#include <wtf/ASCIICType.h>
+#include <wtf/UUID.h>
 
 namespace WebCore {
 
-Ref<PaymentRequest> PaymentRequest::create(Document& document, Vector<PaymentMethodData>&& paymentMethodData, PaymentDetailsInit&& paymentDetails, std::optional<PaymentOptions>&& paymentOptions)
+// Implements the IsWellFormedCurrencyCode abstract operation from ECMA 402
+// https://tc39.github.io/ecma402/#sec-iswellformedcurrencycode
+static bool isWellFormedCurrencyCode(const String& currency)
 {
-    return adoptRef(*new PaymentRequest(document, WTFMove(paymentMethodData), WTFMove(paymentDetails), WTFMove(paymentOptions)));
+    if (currency.length() == 3)
+        return currency.isAllSpecialCharacters<isASCIIAlpha>();
+    return false;
 }
 
-PaymentRequest::PaymentRequest(Document& document, Vector<PaymentMethodData>&&, PaymentDetailsInit&&, std::optional<PaymentOptions>&&)
+// Implements the "valid decimal monetary value" validity checker
+// https://www.w3.org/TR/payment-request/#dfn-valid-decimal-monetary-value
+static bool isValidDecimalMonetaryValue(StringView value)
+{
+    enum class State {
+        Start,
+        Sign,
+        Digit,
+        Dot,
+        DotDigit,
+    };
+
+    auto state = State::Start;
+    for (auto character : value.codeUnits()) {
+        switch (state) {
+        case State::Start:
+            if (character == '-') {
+                state = State::Sign;
+                break;
+            }
+
+            if (isASCIIDigit(character)) {
+                state = State::Digit;
+                break;
+            }
+
+            return false;
+
+        case State::Sign:
+            if (isASCIIDigit(character)) {
+                state = State::Digit;
+                break;
+            }
+
+            return false;
+
+        case State::Digit:
+            if (character == '.') {
+                state = State::Dot;
+                break;
+            }
+
+            if (isASCIIDigit(character)) {
+                state = State::Digit;
+                break;
+            }
+
+            return false;
+
+        case State::Dot:
+            if (isASCIIDigit(character)) {
+                state = State::DotDigit;
+                break;
+            }
+
+            return false;
+
+        case State::DotDigit:
+            if (isASCIIDigit(character)) {
+                state = State::DotDigit;
+                break;
+            }
+
+            return false;
+        }
+    }
+
+    if (state == State::Digit || state == State::DotDigit)
+        return true;
+
+    return false;
+}
+
+// Implements the "check and canonicalize amount" validity checker
+// https://www.w3.org/TR/payment-request/#dfn-check-and-canonicalize-amount
+static ExceptionOr<void> checkAndCanonicalizeAmount(PaymentCurrencyAmount& amount)
+{
+    if (amount.currencySystem != "urn:iso:std:iso:4217")
+        return { };
+
+    if (!isWellFormedCurrencyCode(amount.currency))
+        return Exception { RangeError, makeString("\"", amount.currency, "\" is not a valid currency code.") };
+
+    if (!isValidDecimalMonetaryValue(amount.value))
+        return Exception { TypeError, makeString("\"", amount.value, "\" is not a valid decimal monetary value.") };
+
+    amount.currency = amount.currency.convertToASCIIUppercase();
+    return { };
+}
+
+// Implements the "check and canonicalize total" validity checker
+// https://www.w3.org/TR/payment-request/#dfn-check-and-canonicalize-total
+static ExceptionOr<void> checkAndCanonicalizeTotal(PaymentCurrencyAmount& total)
+{
+    if (total.currencySystem != "urn:iso:std:iso:4217")
+        return { };
+
+    auto exception = checkAndCanonicalizeAmount(total);
+    if (exception.hasException())
+        return exception;
+
+    if (total.value[0] == '-')
+        return Exception { TypeError, ASCIILiteral("Total currency values cannot be negative.") };
+
+    return { };
+}
+
+// Implements the PaymentRequest Constructor
+// https://www.w3.org/TR/payment-request/#constructor
+ExceptionOr<RefPtr<PaymentRequest>> PaymentRequest::create(Document& document, Vector<PaymentMethodData>&& methodData, PaymentDetailsInit&& details, PaymentOptions&& options)
+{
+    // FIXME: Check if this document is allowed to access the PaymentRequest API based on the allowpaymentrequest attribute.
+
+    if (details.id.isNull())
+        details.id = createCanonicalUUIDString();
+
+    if (methodData.isEmpty())
+        return Exception { TypeError, ASCIILiteral("At least one payment method is required.") };
+
+    HashMap<String, String> serializedMethodData;
+    for (auto& paymentMethod : methodData) {
+        if (paymentMethod.supportedMethods.isEmpty())
+            return Exception { TypeError, ASCIILiteral("supportedMethods must be specified.") };
+
+        String serializedData;
+        if (paymentMethod.data) {
+            auto scope = DECLARE_THROW_SCOPE(document.execState()->vm());
+            serializedData = JSONStringify(document.execState(), paymentMethod.data.get(), 0);
+            if (scope.exception())
+                return nullptr;
+        }
+        serializedMethodData.add(paymentMethod.supportedMethods, WTFMove(serializedData));
+    }
+
+    auto exception = checkAndCanonicalizeTotal(details.total.amount);
+    if (exception.hasException())
+        return exception.releaseException();
+
+    for (auto& item : details.displayItems) {
+        auto exception = checkAndCanonicalizeAmount(item.amount);
+        if (exception.hasException())
+            return exception.releaseException();
+    }
+
+    String selectedShippingOption;
+    HashSet<String> seenShippingOptionIDs;
+    for (auto& shippingOption : details.shippingOptions) {
+        auto exception = checkAndCanonicalizeAmount(shippingOption.amount);
+        if (exception.hasException())
+            return exception.releaseException();
+
+        auto addResult = seenShippingOptionIDs.add(shippingOption.id);
+        if (!addResult.isNewEntry) {
+            details.shippingOptions = { };
+            selectedShippingOption = { };
+            break;
+        }
+
+        if (shippingOption.selected)
+            selectedShippingOption = shippingOption.id;
+    }
+
+    Vector<String> serializedModifierData;
+    serializedModifierData.reserveInitialCapacity(details.modifiers.size());
+    for (auto& modifier : details.modifiers) {
+        if (modifier.total) {
+            auto exception = checkAndCanonicalizeTotal(modifier.total->amount);
+            if (exception.hasException())
+                return exception.releaseException();
+        }
+
+        for (auto& item : modifier.additionalDisplayItems) {
+            auto exception = checkAndCanonicalizeAmount(item.amount);
+            if (exception.hasException())
+                return exception.releaseException();
+        }
+
+        String serializedData;
+        if (modifier.data) {
+            auto scope = DECLARE_THROW_SCOPE(document.execState()->vm());
+            serializedData = JSONStringify(document.execState(), modifier.data.get(), 0);
+            if (scope.exception())
+                return nullptr;
+        }
+        serializedModifierData.uncheckedAppend(WTFMove(serializedData));
+    }
+
+    return adoptRef(new PaymentRequest(document, WTFMove(options), WTFMove(details), WTFMove(serializedModifierData), WTFMove(serializedMethodData), WTFMove(selectedShippingOption)));
+}
+
+PaymentRequest::PaymentRequest(Document& document, PaymentOptions&& options, PaymentDetailsInit&& details, Vector<String>&& serializedModifierData, HashMap<String, String>&& serializedMethodData, String&& selectedShippingOption)
     : ActiveDOMObject { &document }
+    , m_options { WTFMove(options) }
+    , m_details { WTFMove(details) }
+    , m_serializedModifierData { WTFMove(serializedModifierData) }
+    , m_serializedMethodData { WTFMove(serializedMethodData) }
+    , m_shippingOption { WTFMove(selectedShippingOption) }
 {
     suspendIfNeeded();
 }
@@ -64,6 +269,18 @@ void PaymentRequest::canMakePayment(DOMPromiseDeferred<IDLBoolean>&& promise)
 {
     promise.reject(Exception { NotSupportedError, ASCIILiteral("Not implemented") });
 }
+    
+const String& PaymentRequest::id() const
+{
+    return m_details.id;
+}
+
+std::optional<PaymentShippingType> PaymentRequest::shippingType() const
+{
+    if (m_options.requestShipping)
+        return m_options.shippingType;
+    return std::nullopt;
+}
 
 } // namespace WebCore
 
index 276deac..06f5a8d 100644 (file)
 
 #include "ActiveDOMObject.h"
 #include "EventTarget.h"
+#include "ExceptionOr.h"
 #include "JSDOMPromiseDeferred.h"
+#include "PaymentDetailsInit.h"
+#include "PaymentOptions.h"
 
 namespace WebCore {
 
@@ -37,29 +40,27 @@ class Document;
 class PaymentAddress;
 class PaymentResponse;
 enum class PaymentShippingType;
-struct PaymentDetailsInit;
 struct PaymentMethodData;
-struct PaymentOptions;
 
 class PaymentRequest final : public RefCounted<PaymentRequest>, public ActiveDOMObject, public EventTargetWithInlineData {
 public:
-    static Ref<PaymentRequest> create(Document&, Vector<PaymentMethodData>&&, PaymentDetailsInit&&, std::optional<PaymentOptions>&&);
+    static ExceptionOr<RefPtr<PaymentRequest>> create(Document&, Vector<PaymentMethodData>&&, PaymentDetailsInit&&, PaymentOptions&&);
     ~PaymentRequest();
 
     void show(DOMPromiseDeferred<IDLInterface<PaymentResponse>>&&);
     void abort(DOMPromiseDeferred<void>&&);
     void canMakePayment(DOMPromiseDeferred<IDLBoolean>&&);
 
-    const String& id() const { return m_id; }
+    const String& id() const;
     PaymentAddress* shippingAddress() const { return m_shippingAddress.get(); }
     const String& shippingOption() const { return m_shippingOption; }
-    std::optional<PaymentShippingType> shippingType() const { return m_shippingType; }
+    std::optional<PaymentShippingType> shippingType() const;
 
     using RefCounted<PaymentRequest>::ref;
     using RefCounted<PaymentRequest>::deref;
 
 private:
-    PaymentRequest(Document&, Vector<PaymentMethodData>&&, PaymentDetailsInit&&, std::optional<PaymentOptions>&&);
+    PaymentRequest(Document&, PaymentOptions&&, PaymentDetailsInit&&, Vector<String>&& serializedModifierData, HashMap<String, String>&& serializedMethodData, String&& selectedShippingOption);
 
     // ActiveDOMObject
     const char* activeDOMObjectName() const final { return "PaymentRequest"; }
@@ -72,10 +73,12 @@ private:
     void refEventTarget() final { ref(); }
     void derefEventTarget() final { deref(); }
 
-    String m_id;
-    RefPtr<PaymentAddress> m_shippingAddress;
+    PaymentOptions m_options;
+    PaymentDetailsInit m_details;
+    Vector<String> m_serializedModifierData;
+    HashMap<String, String> m_serializedMethodData;
     String m_shippingOption;
-    std::optional<PaymentShippingType> m_shippingType;
+    RefPtr<PaymentAddress> m_shippingAddress;
 };
 
 } // namespace WebCore
index 074bbc1..78c40c0 100644 (file)
@@ -28,6 +28,7 @@
     Conditional=PAYMENT_REQUEST,
     Constructor(sequence<PaymentMethodData> methodData, PaymentDetailsInit details, optional PaymentOptions options),
     ConstructorCallWith=Document,
+    ConstructorMayThrowException,
     EnabledBySetting=PaymentRequest,
     SecureContext
 ] interface PaymentRequest : EventTarget {
index 99abf18..c635df4 100644 (file)
                                E125F84C1824289D00D84CD9 /* CryptoKeyAES.h */,
                                7C9ACA8F1F3CC0AA00F3AA09 /* CryptoKeyAlgorithm.h */,
                                7C9ACA911F3CC0AA00F3AA09 /* CryptoKeyAlgorithm.idl */,
-                               E1C266DC18319F31003F8B33 /* CryptoKeyRSAComponents.cpp */,
-                               E1C266DD18319F31003F8B33 /* CryptoKeyRSAComponents.h */,
                                5750A9721E68D00000705C4A /* CryptoKeyEC.cpp */,
                                5750A9731E68D00000705C4A /* CryptoKeyEC.h */,
                                E125F8331822F18A00D84CD9 /* CryptoKeyHMAC.cpp */,
                                57777E3B1E71242200EE1A8D /* CryptoKeyRaw.h */,
                                57E2336A1DCC262400F28D01 /* CryptoKeyRSA.cpp */,
                                E164FAA218315BF400DB4E61 /* CryptoKeyRSA.h */,
+                               E1C266DC18319F31003F8B33 /* CryptoKeyRSAComponents.cpp */,
+                               E1C266DD18319F31003F8B33 /* CryptoKeyRSAComponents.h */,
                                7C9ACAA61F3CCEB400F3AA09 /* CryptoRsaHashedKeyAlgorithm.h */,
                                7C9ACAA71F3CCEB400F3AA09 /* CryptoRsaHashedKeyAlgorithm.idl */,
                                7C9ACAA21F3CCE6900F3AA09 /* CryptoRsaKeyAlgorithm.h */,
                                E157A8E518173A3A009F821D /* CryptoKey.h in Headers */,
                                E125F84E1824289D00D84CD9 /* CryptoKeyAES.h in Headers */,
                                7C9ACA921F3CC0AA00F3AA09 /* CryptoKeyAlgorithm.h in Headers */,
-                               E1C266DF18319F31003F8B33 /* CryptoKeyRSAComponents.h in Headers */,
                                5750A9751E68D00000705C4A /* CryptoKeyEC.h in Headers */,
                                E125F8361822F18A00D84CD9 /* CryptoKeyHMAC.h in Headers */,
                                E1F80B8818317252007885C3 /* CryptoKeyPair.h in Headers */,
                                57E657DF1E71373A00F941CA /* CryptoKeyRaw.h in Headers */,
                                E164FAA318315BF400DB4E61 /* CryptoKeyRSA.h in Headers */,
+                               E1C266DF18319F31003F8B33 /* CryptoKeyRSAComponents.h in Headers */,
                                E19727161820549E00592D51 /* CryptoKeyType.h in Headers */,
                                E172AF70180F289500FBADB9 /* CryptoKeyUsage.h in Headers */,
                                7C9ACAA81F3CCEB400F3AA09 /* CryptoRsaHashedKeyAlgorithm.h in Headers */,
                                E19AC3F41824DC7900349426 /* CryptoAlgorithmSHA512.cpp in Sources */,
                                E157A8E418173A3A009F821D /* CryptoKey.cpp in Sources */,
                                E125F84D1824289D00D84CD9 /* CryptoKeyAES.cpp in Sources */,
-                               E1C266DE18319F31003F8B33 /* CryptoKeyRSAComponents.cpp in Sources */,
                                5750A9741E68D00000705C4A /* CryptoKeyEC.cpp in Sources */,
                                5750A97B1E69161600705C4A /* CryptoKeyECMac.cpp in Sources */,
                                E125F8351822F18A00D84CD9 /* CryptoKeyHMAC.cpp in Sources */,
                                E19AC3F9182566F700349426 /* CryptoKeyMac.cpp in Sources */,
                                57E657E01E71397800F941CA /* CryptoKeyRaw.cpp in Sources */,
                                57E2336B1DCC262400F28D01 /* CryptoKeyRSA.cpp in Sources */,
+                               E1C266DE18319F31003F8B33 /* CryptoKeyRSAComponents.cpp in Sources */,
                                E164FAA518315E1A00DB4E61 /* CryptoKeyRSAMac.cpp in Sources */,
                                316FE1130E6E1DA700BF6088 /* CSSAnimationController.cpp in Sources */,
                                31BC742D1AAFF45C006B4340 /* CSSAnimationTriggerScrollValue.cpp in Sources */,