Index: LayoutTests/fast/events/drag-dataTransferItemList.html |
diff --git a/LayoutTests/fast/events/drag-dataTransferItemList.html b/LayoutTests/fast/events/drag-dataTransferItemList.html |
index 978b3cd1dd9d1a7d8e7df63806db9fe89b21bc36..61bcad274fe5e9a7ee680e5418f162d3d1574c45 100644 |
--- a/LayoutTests/fast/events/drag-dataTransferItemList.html |
+++ b/LayoutTests/fast/events/drag-dataTransferItemList.html |
@@ -24,15 +24,24 @@ function legacyDragStart(dataTransfer) |
} |
var testDataTransfer; |
+var testItem; |
function itemListDragStart(dataTransfer) |
{ |
testDataTransfer = dataTransfer; |
shouldThrow('testDataTransfer.items.add()', '"TypeError: Not enough arguments"'); |
shouldThrow('testDataTransfer.items.add("sample")', '"TypeError: Type error"'); |
- dataTransfer.items.add('sample', 'text/plain'); |
- dataTransfer.items.add('http://www.google.com/', 'text/uri-list'); |
- dataTransfer.items.add('<em>Markup</em>', 'text/html'); |
- dataTransfer.items.add('hello world', 'custom-data'); |
+ testItem = dataTransfer.items.add('sample', 'text/plain'); |
+ shouldBeEqualToString('testItem.kind', 'string'); |
+ shouldBeEqualToString('testItem.type', 'text/plain'); |
+ testItem = dataTransfer.items.add('http://www.google.com/', 'text/uri-list'); |
+ shouldBeEqualToString('testItem.kind', 'string'); |
+ shouldBeEqualToString('testItem.type', 'text/uri-list'); |
+ testItem = dataTransfer.items.add('<em>Markup</em>', 'text/html'); |
+ shouldBeEqualToString('testItem.kind', 'string'); |
+ shouldBeEqualToString('testItem.type', 'text/html'); |
+ testItem = dataTransfer.items.add('hello world', 'custom-data'); |
+ shouldBeEqualToString('testItem.kind', 'string'); |
+ shouldBeEqualToString('testItem.type', 'custom-data'); |
} |
function dragstart(event) |
@@ -77,6 +86,8 @@ function itemListDrop(dataTransfer) |
testDataTransfer = dataTransfer; |
outstandingRequests = 0; |
shouldBe('testDataTransfer.items.length', '4'); |
+ shouldBeNull('testDataTransfer.items.add("test", "text/plain")'); // Read-only. |
+ shouldBe('testDataTransfer.items.length', '4'); |
types = []; |
for (var i = 0; i < dataTransfer.items.length; ++i) { |
types.push({kind: dataTransfer.items[i].kind, type: dataTransfer.items[i].type}); |