Skip to content
Permalink
Browse files

Merge branch 't/13709'

  • Loading branch information...
Reinmar committed Aug 31, 2015
2 parents 5a583ea + f2ae38e commit e994879221c0170c2a96f856bf1a110cd7d37d50
Showing with 26 additions and 8 deletions.
  1. +26 −8 tests/core/editable/keystrokes/delbackspacequirks/collapsed.js
@@ -84,35 +84,53 @@
// --- BACKSPACE ------------------------------------------------------

'test backspace #1': b( '<p>x</p><p>[]y</p>', '<p>x^y</p>' ),
'test backspace #2': b( '<p>x</p><p><strong>[]y</strong></p>', '<p>x<strong>^y</strong></p>' ),
'test backspace #3': b( '<p>x</p><p><a href="z">[]y</a></p>', '<p>x<a href="z">^y</a></p>' ),
'test backspace #2': b( '<p>x</p><p><strong>[]y</strong></p>', [
'<p>x<strong>^y</strong></p>',
'<p>x^<strong>y</strong></p>' // For WebKit (#13709).
] ),
'test backspace #3': b( '<p>x</p><p><a href="z">[]y</a></p>', [
'<p>x<a href="z">^y</a></p>',
'<p>x^<a href="z">y</a></p>' // For WebKit (#13709).
] ),
'test backspace #4': b( '<p>x</p><blockquote><p>[]y</p></blockquote>', '<p>x^y</p>' ),
'test backspace #5': b( '<h1>x</h1><p>[]y</p>', '<h1>x^y</h1>' ),
'test backspace #6': b( '<p>x</p><h1>[]y</h1>', '<p>x^y</p>' ),
'test backspace #7': b( '<p>x</p><p>[]f<strong>o</strong>o</p>', '<p>x^f<strong>o</strong>o</p>' ),
'test backspace #8': b( '<div><p>x</p></div><blockquote><p>[]y</p></blockquote>', '<div><p>x^y</p></div>' ),
'test backspace #9': b( '<div><p><strong>f<em>oo</em></strong></p></div><blockquote><p><u>{}y</u></p></blockquote>',
'<div><p><strong>f<em>oo</em></strong><u>^y</u></p></div>' ),
'test backspace #10': b( '<p>x</p><p>[]@</p>', '<p>x^@!</p>' ),
[
'<div><p><strong>f<em>oo</em></strong><u>^y</u></p></div>',
'<div><p><strong>f<em>oo^</em></strong><u>y</u></p></div>' // For WebKit (#13709).
] ),
'test backspace #10': b( '<p>x</p><p>[]@</p>', '<p>x^@!</p>' ),
'test backspace #11': b( '<ul><li><p>x</p><p>[]y</p></li></ul>', '<ul><li><p>x^y</p></li></ul>' ),
'test backspace #12': b( '<table><tbody><tr><td><p>x</p><p>[]y</p></td></tr></tbody></table>',
'<table><tbody><tr><td><p>x^y</p></td></tr></tbody></table>' ),
'test backspace #13': b( '<aside><p>x</p></aside><section><p>[]y</p></section>', '<aside><p>x^y</p></aside>' ),
'test backspace #14': b( '<aside><p>x</p></aside><section><p>[]y</p><p>z</p></section>', '<aside><p>x^y</p></aside><section><p>z</p></section>' ),
'test backspace #15': b( '<p>a</p><hr /><p>[]y</p>', '<p>a</p><p>^y</p>' ),
'test backspace #16': b( '<hr /><p>[]y</p>', '<p>^y</p>' ),
'test backspace #17': b( '<p>a</p><hr id="h1" /><hr id="h2" /><p>[]y</p>', '<p>a</p><hr id="h1" /><p>^y</p>' ),
'test backspace #17': b( '<p>a</p><hr id="h1" /><hr id="h2" /><p>[]y</p>', '<p>a</p><hr id="h1" /><p>^y</p>' ),

// Merge inline elements after keystroke.
'test backspace, merge #1': b( '<p><em>x</em></p><p><em>[]y</em></p>', '<p><em>x^y</em></p>' ),
'test backspace, merge #2': b( '<p><em id="x">x</em></p><p><em id="y">[]y</em></p>', '<p><em id="x">x</em><em id="y">^y</em></p>' ),
'test backspace, merge #3': b( '<p><a href="x">x</a></p><p><a href="y">[]y</a></p>', '<p><a href="x">x</a><a href="y">^y</a></p>' ),
'test backspace, merge #2': b( '<p><em id="x">x</em></p><p><em id="y">[]y</em></p>', [
'<p><em id="x">x</em><em id="y">^y</em></p>',
'<p><em id="x">x^</em><em id="y">y</em></p>' // For WebKit (#13709).
] ),
'test backspace, merge #3': b( '<p><a href="x">x</a></p><p><a href="y">[]y</a></p>', [
'<p><a href="x">x</a><a href="y">^y</a></p>',
'<p><a href="x">x^</a><a href="y">y</a></p>' // For WebKit (#13709).
] ),
'test backspace, merge #4': b( '<p><em>x</em></p><div><p><em>[]y</em></p><p>z</p></div>', '<p><em>x^y</em></p><div><p>z</p></div>' ),
'test backspace, merge #5': b( '<p id="foo">x</p><p id="bar">[]y</p>', '<p id="foo">x^y</p>' ),
'test backspace, merge #6': b( '<p data-foo="x">x</p><p data-foo="y">[]y</p>', '<p data-foo="x">x^y</p>' ),
'test backspace, merge #7': b( '<p style="color:red">x</p><p style="color:blue">[]y</p>', '<p style="color:red">x^y</p>' ),
'test backspace, merge #8': b( '<p><em style="color:red">x</em></p><p><em style="color:blue">[]y</em></p>',
'<p><em style="color:red">x</em><em style="color:blue">^y</em></p>' ),
[
'<p><em style="color:red">x</em><em style="color:blue">^y</em></p>',
'<p><em style="color:red">x^</em><em style="color:blue">y</em></p>' // For WebKit (#13709).
] ),
'test backspace, merge #9': b( '<p style="color:red">x</p><p style="color:blue;text-align:right;">[]y</p>',
'<p style="color:red">x^y</p>' ),

0 comments on commit e994879

Please sign in to comment.
You can’t perform that action at this time.