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

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

Issue 2836813007: [webnfc] Reject promise if passed timeout value is invalid (Closed)
Patch Set: Created 3 years, 8 months 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/nfc/NFC.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 44301eedee11b2df9cfedee5e5a13112eab41fb6..edd1ee12d1e3a487ef87107ba7aae8938d968a49 100644
--- a/third_party/WebKit/LayoutTests/nfc/push.html
+++ b/third_party/WebKit/LayoutTests/nfc/push.html
@@ -86,6 +86,16 @@ nfc_test(nfc => {
}, 'nfc.push should succeed when NFC HW is enabled');
nfc_test(nfc => {
+ return assertRejectsWithError(
+ navigator.nfc.push(test_text_data, { timeout: 'invalid' }), 'TypeError');
+}, 'nfc.push should fail when invalid timeout is provided');
+
+nfc_test(nfc => {
+ return assertRejectsWithError(
+ navigator.nfc.push(test_text_data, { timeout: -1 }), 'TypeError');
+}, 'nfc.push should fail when invalid negative timeout value is provided');
+
+nfc_test(nfc => {
nfc.mockNFC.setPendingPushCompleted(false);
return assertRejectsWithError(
navigator.nfc.push(test_text_data,{ timeout: 1 }),
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/nfc/NFC.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698