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

Unified Diff: third_party/WebKit/LayoutTests/nfc/push.html

Issue 2524743002: [webnfc] Restrict NFC message size to 32KB (Closed)
Patch Set: 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/nfc/push.html
diff --git a/third_party/WebKit/LayoutTests/nfc/push.html b/third_party/WebKit/LayoutTests/nfc/push.html
index 5b714582db23eae5fd38b8b21e7442de5554ed04..205f52dc4abc049ee970d016843b7f14bc94af86 100644
--- a/third_party/WebKit/LayoutTests/nfc/push.html
+++ b/third_party/WebKit/LayoutTests/nfc/push.html
@@ -150,4 +150,10 @@ nfc_test(nfc => {
return assertRejectsWithError(promise, 'AbortError');
}, 'nfc.cancelPush should reject pending promise with AbortError.')
+nfc_test(nfc => {
+ return assertRejectsWithError(
+ navigator.nfc.push(new ArrayBuffer(32 * 1024 + 1)),
+ 'NotSupportedError');
+}, 'Reject promise with NotSupportedError if NFC message size exceeds 32KB.');
+
</script>

Powered by Google App Engine
This is Rietveld 408576698