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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/pasteboard/paste-webkit-editable-content-changed-crash.html

Issue 1636883003: Perform Spellcheck Requesting before Dispatching Events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test case Created 4 years, 11 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2
yosin_UTC9 2016/01/27 06:02:38 nit: We don't need to have an extra blank line.
Xiaocheng 2016/01/27 07:20:37 Done.
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5
yosin_UTC9 2016/01/27 06:02:38 nit: We don't need to have an extra blank line.
Xiaocheng 2016/01/27 07:20:37 Done.
6 <div id="src">
7 <div>Some text.</div>
8 <div>Some other text.</div>
9 </div>
10
yosin_UTC9 2016/01/27 06:02:38 nit: We don't need to have an extra blank line.
Xiaocheng 2016/01/27 07:20:37 Done.
11 <div contenteditable="true" id="dest">
12 </div>
13
yosin_UTC9 2016/01/27 06:02:38 nit: We don't need to have an extra blank line.
Xiaocheng 2016/01/27 07:20:37 Done.
14 <script>
15 // A repro of crbug.com/580950, which crashes in debug build.
16 document.body.onload = function() {
17 var src = document.getElementById('src');
18 var dest = document.getElementById('dest');
19 var sel = window.getSelection();
20 dest.addEventListener('webkitEditableContentChanged', function() { dest.inne rHTML='' });
yosin_UTC9 2016/01/27 06:02:38 nit: Should be multiple lines. nit: Need spaces ar
Xiaocheng 2016/01/27 07:20:37 Done.
21
22 test(function() {
23 sel.setBaseAndExtent(src, 0, src, src.childNodes.length);
24 document.execCommand('copy');
25 dest.focus();
26 document.execCommand('paste');
27
28 assert_equals(dest.innerHTML, '');
29 }, 'A pasting that fires a webkitEditableContentChanged event should not cra sh.');
30
31 src.style.display = "none";
yosin_UTC9 2016/01/27 06:02:38 Add <div id="log"></div> instead of hide output.
Xiaocheng 2016/01/27 07:20:37 Ah I didn't know this. Done.
32 dest.style.display = "none";
33 }
34 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/Editor.h » ('j') | third_party/WebKit/Source/core/editing/Editor.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698