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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/drag-dataTransferItemList.html

Issue 2508773005: DataTransferItemList#add() file argument should not be nullable (Closed)
Patch Set: Added layout tests for dataTransferItemList.add() 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/drag-dataTransferItemList-expected.txt » ('j') | 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 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <style> 5 <style>
6 #drag { 6 #drag {
7 border: 1px solid black; 7 border: 1px solid black;
8 height: 200px; 8 height: 200px;
9 width: 200px; 9 width: 200px;
10 } 10 }
(...skipping 11 matching lines...) Expand all
22 dataTransfer.setData('text/html', '<em>Markup</em>'); 22 dataTransfer.setData('text/html', '<em>Markup</em>');
23 dataTransfer.setData('custom-data', 'hello world'); 23 dataTransfer.setData('custom-data', 'hello world');
24 } 24 }
25 25
26 var testDataTransfer; 26 var testDataTransfer;
27 var testItem; 27 var testItem;
28 function itemListDragStart(dataTransfer) 28 function itemListDragStart(dataTransfer)
29 { 29 {
30 testDataTransfer = dataTransfer; 30 testDataTransfer = dataTransfer;
31 shouldThrow('testDataTransfer.items.add()'); 31 shouldThrow('testDataTransfer.items.add()');
32 shouldThrow('testDataTransfer.items.add(undefined)');
32 shouldThrow('testDataTransfer.items.add("sample")'); 33 shouldThrow('testDataTransfer.items.add("sample")');
34 shouldThrow('testDataTransfer.items.add(null)');
33 testItem = dataTransfer.items.add('sample', 'text/plain'); 35 testItem = dataTransfer.items.add('sample', 'text/plain');
34 shouldBeEqualToString('testItem.kind', 'string'); 36 shouldBeEqualToString('testItem.kind', 'string');
35 shouldBeEqualToString('testItem.type', 'text/plain'); 37 shouldBeEqualToString('testItem.type', 'text/plain');
36 testItem = dataTransfer.items.add('http://www.google.com/', 'text/uri-list') ; 38 testItem = dataTransfer.items.add('http://www.google.com/', 'text/uri-list') ;
37 shouldBeEqualToString('testItem.kind', 'string'); 39 shouldBeEqualToString('testItem.kind', 'string');
38 shouldBeEqualToString('testItem.type', 'text/uri-list'); 40 shouldBeEqualToString('testItem.type', 'text/uri-list');
39 testItem = dataTransfer.items.add('<em>Markup</em>', 'text/html'); 41 testItem = dataTransfer.items.add('<em>Markup</em>', 'text/html');
40 shouldBeEqualToString('testItem.kind', 'string'); 42 shouldBeEqualToString('testItem.kind', 'string');
41 shouldBeEqualToString('testItem.type', 'text/html'); 43 shouldBeEqualToString('testItem.type', 'text/html');
42 testItem = dataTransfer.items.add('hello world', 'custom-data'); 44 testItem = dataTransfer.items.add('hello world', 'custom-data');
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 <div>Drop handler: <select id="dropMethod"><option>Legacy</option><option>DataTr ansferItemList</option></select></div> 186 <div>Drop handler: <select id="dropMethod"><option>Legacy</option><option>DataTr ansferItemList</option></select></div>
185 <div id="console"></div> 187 <div id="console"></div>
186 <script> 188 <script>
187 description("Tests drag'n drop and well as DataTransferItemList"); 189 description("Tests drag'n drop and well as DataTransferItemList");
188 window.jsTestIsAsync = true; 190 window.jsTestIsAsync = true;
189 191
190 runNext(); 192 runNext();
191 </script> 193 </script>
192 </body> 194 </body>
193 </html> 195 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/drag-dataTransferItemList-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698