Index: LayoutTests/fast/events/clipboard-dataTransferItemList.html |
diff --git a/LayoutTests/fast/events/clipboard-dataTransferItemList.html b/LayoutTests/fast/events/clipboard-dataTransferItemList.html |
index 6ca335e5e96e30128e5e104db838da704c970a35..5698a0a65b849f81c72c522d9ac239b9d7694f7e 100644 |
--- a/LayoutTests/fast/events/clipboard-dataTransferItemList.html |
+++ b/LayoutTests/fast/events/clipboard-dataTransferItemList.html |
@@ -3,15 +3,20 @@ |
<head> |
<script src="../js/resources/js-test-pre.js"></script> |
<script> |
+var testDataTransfer; |
+var nonConvertibleToString = {toString: function() { throw "Exception in toString()"; }}; |
function legacyCopyStart(dataTransfer) |
{ |
+ testDataTransfer = dataTransfer; |
dataTransfer.setData('text', 'sample'); |
dataTransfer.setData('url', 'http://www.google.com/'); |
dataTransfer.setData('text/html', '<em>Markup</em>'); |
dataTransfer.setData('custom-data', 'hello world'); |
+ shouldBeEqualToString('testDataTransfer.getData("custom-data")', 'hello world'); |
+ shouldThrow('testDataTransfer.clearData(nonConvertibleToString)', '"Exception in toString()"'); |
+ shouldBeEqualToString('testDataTransfer.getData("custom-data")', 'hello world'); |
} |
-var testDataTransfer; |
function itemListCopyStart(dataTransfer) |
{ |
testDataTransfer = dataTransfer; |