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

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: Created 4 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/Editor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <div id="src">
5 <div>Some text.</div>
6 <div>Some other text.</div>
7 </div>
8 <div contenteditable="true" id="dest"></div>
9 <div id="log"></div>
10 <script>
11 // A repro of crbug.com/580950, which crashes in debug build.
12 document.body.onload = function() {
13 var src = document.getElementById('src');
14 var dest = document.getElementById('dest');
15 var sel = window.getSelection();
16 dest.addEventListener('webkitEditableContentChanged', () => dest.innerHTML = '');
yosin_UTC9 2016/01/27 08:40:29 nit: It is better to insert non-empty string and n
Xiaocheng 2016/01/27 08:50:56 Done.
17
18 test(function() {
19 sel.setBaseAndExtent(src, 0, src, src.childNodes.length);
20 document.execCommand('copy');
21 dest.focus();
22 document.execCommand('paste');
23
24 assert_equals(dest.innerHTML, '');
25 }, 'A pasting that fires a webkitEditableContentChanged event should not cra sh.');
26 }
27 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/Editor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698