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

Side by Side Diff: third_party/WebKit/LayoutTests/nfc/push.html

Issue 2825033002: [webnfc] Remove duplicate test case from layout test (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 <script src="../resources/mojo-helpers.js"></script> 4 <script src="../resources/mojo-helpers.js"></script>
5 <script src="resources/nfc-helpers.js"></script> 5 <script src="resources/nfc-helpers.js"></script>
6 <script> 6 <script>
7 7
8 'use strict'; 8 'use strict';
9 9
10 const invalid_messages = 10 const invalid_messages =
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 }, 'Check that default NFCPushOptions values are correctly set.'); 126 }, 'Check that default NFCPushOptions values are correctly set.');
127 127
128 nfc_test(nfc => { 128 nfc_test(nfc => {
129 let nfcPushOptions = createNFCPushOptions('tag', 1, false); 129 let nfcPushOptions = createNFCPushOptions('tag', 1, false);
130 return navigator.nfc.push(test_text_data, nfcPushOptions).then(() => { 130 return navigator.nfc.push(test_text_data, nfcPushOptions).then(() => {
131 nfc.assertNFCPushOptionsEqual(nfcPushOptions, nfc.mockNFC.pushOptions()); 131 nfc.assertNFCPushOptionsEqual(nfcPushOptions, nfc.mockNFC.pushOptions());
132 }); 132 });
133 }, 'Check that provided NFCPushOptions values are correctly converted.'); 133 }, 'Check that provided NFCPushOptions values are correctly converted.');
134 134
135 nfc_test(nfc => { 135 nfc_test(nfc => {
136 return navigator.nfc.push(test_buffer_data).then(() => {
137 nfc.assertNFCMessagesEqual(test_buffer_data, nfc.mockNFC.pushedMessage());
haraken 2017/04/18 10:44:32 Hmm? How was this test duplicated?
138 });
139 }, 'Push ArrayBuffer with default NFCPushOptions.');
140
141 nfc_test(nfc => {
142 return navigator.nfc.push(test_text_data) 136 return navigator.nfc.push(test_text_data)
143 .then(() => { navigator.nfc.cancelPush }); 137 .then(() => { return navigator.nfc.cancelPush(); });
144 }, 'nfc.cancelPush should succeed if there is pending push operation.'); 138 }, 'nfc.cancelPush should succeed if there is pending push operation.');
145 139
146 nfc_test(nfc => { 140 nfc_test(nfc => {
147 nfc.mockNFC.setPendingPushCompleted(false); 141 nfc.mockNFC.setPendingPushCompleted(false);
148 let promise = navigator.nfc.push(test_text_data, { timeout: 100 }); 142 let promise = navigator.nfc.push(test_text_data, { timeout: 100 });
149 navigator.nfc.cancelPush(); 143 navigator.nfc.cancelPush();
150 return assertRejectsWithError(promise, 'AbortError'); 144 return assertRejectsWithError(promise, 'AbortError');
151 }, 'nfc.cancelPush should reject pending promise with AbortError.') 145 }, 'nfc.cancelPush should reject pending promise with AbortError.')
152 146
153 nfc_test(nfc => { 147 nfc_test(nfc => {
154 return assertRejectsWithError( 148 return assertRejectsWithError(
155 navigator.nfc.push(new ArrayBuffer(32 * 1024 + 1)), 149 navigator.nfc.push(new ArrayBuffer(32 * 1024 + 1)),
156 'NotSupportedError'); 150 'NotSupportedError');
157 }, 'Reject promise with NotSupportedError if NFC message size exceeds 32KB.'); 151 }, 'Reject promise with NotSupportedError if NFC message size exceeds 32KB.');
158 152
159 </script> 153 </script>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698