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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/pasteboard/onpaste-text-html-types.html

Issue 2685723005: evaluating clipboard event target acording to w3c specification (Closed)
Patch Set: Make Editor::findEventTargetFrom() to align Clipboard API specification Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <div id="test" onpaste="paste(event)">This test verifies that we can get types f rom the clipboard 1 <body onpaste="paste(event)">
2 <div id="test">This test verifies that we can get types from the clipboard
2 during an onpaste event. This test requires DRT.</div> 3 during an onpaste event. This test requires DRT.</div>
3 4
4 <div id="results">FAIL</div> 5 <div id="results">FAIL</div>
5 6
6 <script src="../editing.js"></script> 7 <script src="../editing.js"></script>
7 <script> 8 <script>
8 function paste(ev) 9 function paste(ev)
9 { 10 {
10 var types = ev.clipboardData.types; 11 var types = ev.clipboardData.types;
11 if (types.indexOf('text/plain') >= 0 && 12 if (types.indexOf('text/plain') >= 0 &&
12 types.indexOf('text/html') >= 0) 13 types.indexOf('text/html') >= 0)
13 document.getElementById("results").innerHTML = "PASS"; 14 document.getElementById("results").innerHTML = "PASS";
14 } 15 }
15 16
16 function editingTest() 17 function editingTest()
17 { 18 {
18 var selection = window.getSelection(); 19 var selection = window.getSelection();
19 selection.modify("extend", "forward", "sentence"); 20 selection.modify("extend", "forward", "sentence");
20 copyCommand(); 21 copyCommand();
21 22
22 pasteCommand(); 23 pasteCommand();
23 } 24 }
24 25
25 runDumpAsTextEditingTest(false); 26 runDumpAsTextEditingTest(false);
26 </script> 27 </script>
28 </body>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698