| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /* Reports an event to DragAndDropBrowserTest and DOMDragEventWaiter */ | 5 /* Reports an event to DragAndDropBrowserTest and DOMDragEventWaiter */ |
| 6 window.reportDragAndDropEvent = function(ev) { | 6 window.reportDragAndDropEvent = function(ev) { |
| 7 function safe(f) { | 7 function safe(f) { |
| 8 try { | 8 try { |
| 9 return f(); | 9 return f(); |
| 10 } catch(err) { | 10 } catch(err) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 .map(function(file) { return file.name; }) | 28 .map(function(file) { return file.name; }) |
| 29 .sort().join(); | 29 .sort().join(); |
| 30 }), | 30 }), |
| 31 mime_types: safe(function() { | 31 mime_types: safe(function() { |
| 32 return Array.from(ev.dataTransfer.types).sort().join(); | 32 return Array.from(ev.dataTransfer.types).sort().join(); |
| 33 }), | 33 }), |
| 34 window_name: window.name | 34 window_name: window.name |
| 35 }); | 35 }); |
| 36 } | 36 } |
| 37 } | 37 } |
| OLD | NEW |