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

Side by Side Diff: LayoutTests/editing/execCommand/indent-button-crash.html

Issue 291143002: Don't indent if selection is none. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2014-05-20T05:00:38 Created 6 years, 7 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 <script>
3 if (window.testRunner)
4 testRunner.dumpAsText();
5
6 var aoScriptElements = document.getElementsByTagName('script');
yoichio 2014/05/20 09:19:50 |aoScriptElements| violates the Blink style.
yosin_UTC9 2014/05/20 09:42:17 Done.
7 for (var i = 0; i < aoScriptElements.length; i++) {
8 aoScriptElements[i].parentNode.removeChild(aoScriptElements[i]);
Yuta Kitamura 2014/05/20 09:44:36 Wrong indent.
yosin_UTC9 2014/05/21 03:44:07 Done.
9 }
10
11 document.addEventListener('DOMCharacterDataModified', function() {
12 document.execCommand('Indent');
13 });
14
15 document.addEventListener('selectstart', function() {
16 var element = event.srcElement;
17 element.insertAdjacentElement('beforebegin', document.createElement('foo'));
18 element.insertAdjacentHTML('beforebegin', '<bar1><bar2><bar3>abc');
19 });
20
21 onload = function(){
Yuta Kitamura 2014/05/20 09:44:36 No space before '{'.
yosin_UTC9 2014/05/21 03:44:07 Done.
22 document.execCommand('SelectAll', false);
23 document.designMode = 'on';
24 window.getSelection().getRangeAt(0).deleteContents();
25 document.body.textContent = 'PASS if Blink doesn\'t crash.';
26 };
27 </script>
28 <style>
29 *:read-write {
30 -webkit-appearance: push-button;
31 }
32 </style>
33 <link>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698