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

Side by Side Diff: LayoutTests/fast/events/clipboard-dataTransferItemList.html

Issue 23496045: Have V8Clipboard::clearDataMethodCustom() use V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/events/clipboard-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="../js/resources/js-test-pre.js"></script> 4 <script src="../js/resources/js-test-pre.js"></script>
5 <script> 5 <script>
6 var testDataTransfer;
7 var nonConvertibleToString = {toString: function() { throw "Exception in toStrin g()"; }};
6 function legacyCopyStart(dataTransfer) 8 function legacyCopyStart(dataTransfer)
7 { 9 {
10 testDataTransfer = dataTransfer;
8 dataTransfer.setData('text', 'sample'); 11 dataTransfer.setData('text', 'sample');
9 dataTransfer.setData('url', 'http://www.google.com/'); 12 dataTransfer.setData('url', 'http://www.google.com/');
10 dataTransfer.setData('text/html', '<em>Markup</em>'); 13 dataTransfer.setData('text/html', '<em>Markup</em>');
11 dataTransfer.setData('custom-data', 'hello world'); 14 dataTransfer.setData('custom-data', 'hello world');
15 shouldBeEqualToString('testDataTransfer.getData("custom-data")', 'hello worl d');
16 shouldThrow('testDataTransfer.clearData(nonConvertibleToString)', '"Exceptio n in toString()"');
17 shouldBeEqualToString('testDataTransfer.getData("custom-data")', 'hello worl d');
12 } 18 }
13 19
14 var testDataTransfer;
15 function itemListCopyStart(dataTransfer) 20 function itemListCopyStart(dataTransfer)
16 { 21 {
17 testDataTransfer = dataTransfer; 22 testDataTransfer = dataTransfer;
18 shouldBeUndefined('testDataTransfer.items.item'); 23 shouldBeUndefined('testDataTransfer.items.item');
19 dataTransfer.items.add('sample', 'text/plain'); 24 dataTransfer.items.add('sample', 'text/plain');
20 dataTransfer.items.add('http://www.google.com/', 'text/uri-list'); 25 dataTransfer.items.add('http://www.google.com/', 'text/uri-list');
21 dataTransfer.items.add('<em>Markup</em>', 'text/html'); 26 dataTransfer.items.add('<em>Markup</em>', 'text/html');
22 dataTransfer.items.add('hello world', 'custom-data'); 27 dataTransfer.items.add('hello world', 'custom-data');
23 } 28 }
24 29
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 <script> 148 <script>
144 description("Tests copy / paste and DataTransferItemList"); 149 description("Tests copy / paste and DataTransferItemList");
145 150
146 window.jsTestIsAsync = true; 151 window.jsTestIsAsync = true;
147 152
148 runNext(); 153 runNext();
149 </script> 154 </script>
150 <script src="../js/resources/js-test-post.js"></script> 155 <script src="../js/resources/js-test-post.js"></script>
151 </body> 156 </body>
152 </html> 157 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/clipboard-dataTransferItemList-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698