| Index: third_party/WebKit/LayoutTests/nfc/resources/push-from-iframe.html
|
| diff --git a/third_party/WebKit/LayoutTests/nfc/resources/push-from-iframe.html b/third_party/WebKit/LayoutTests/nfc/resources/push-from-iframe.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..cb7faed99b0f550a638b0e43dad737a9fecd1888
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/nfc/resources/push-from-iframe.html
|
| @@ -0,0 +1,19 @@
|
| +<!DOCTYPE html>
|
| +<script>
|
| +'use strict';
|
| +
|
| +window.onmessage = message => {
|
| + if (message.data === 'Ready') {
|
| + let onSuccess = () => { parent.postMessage('Failure', '*'); };
|
| + let onError = error => {
|
| + if (error.name == 'SecurityError') {
|
| + parent.postMessage('Success', '*');
|
| + } else {
|
| + parent.postMessage('Failure', '*');
|
| + }
|
| + }
|
| + navigator.nfc.push('Test').then(onSuccess, onError);
|
| + }
|
| +};
|
| +
|
| +</script>
|
|
|