Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1276)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/payments/payment-app-manager.html

Issue 2476343002: PaymentApp: Initial implementation for PaymentAppManager.setManifest(). (Closed)
Patch Set: fix lint error Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/payments/payment-app-manager.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/payments/payment-app-manager.html b/third_party/WebKit/LayoutTests/http/tests/payments/payment-app-manager.html
new file mode 100644
index 0000000000000000000000000000000000000000..b5cf8505b73653bc8cbc278c797f36f9abe7c420
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/payments/payment-app-manager.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="../../serviceworker/resources/test-helpers.js"></script>
+<script>
+
+promise_test(test => {
+ var registration;
+ var script_url = 'resources/empty-worker.js';
+ var scope = 'resources/';
+
+ return service_worker_unregister_and_register(test, script_url, scope)
+ .then(r => {
+ registration = r;
+ return wait_for_state(test, registration.installing, 'activated');
+ })
+ .then(state => {
+ assert_equals(state, 'activated');
+ return registration.paymentAppManager.setManifest({
+ label: 'Payment App'
+ });
+ })
+ .then(result => {
+ unreached_fulfillment(test);
+ })
+ .catch(error => {
+ assert_equals(error.name, 'NotSupportedError');
+ });
+ }, 'setManifest() should reject NotSupportedError for now');
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698