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

Side by Side Diff: LayoutTests/editing/inserting/replace-in-heading-001.html

Issue 58533003: Move fast/js/resources files to resources. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 <script> 1 <script>
2 function $(id) { return document.getElementById(id); } 2 function $(id) { return document.getElementById(id); }
3 3
4 function testIt() 4 function testIt()
5 { 5 {
6 description('Replace in heading by heading'); 6 description('Replace in heading by heading');
7 7
8 var selection = window.getSelection(); 8 var selection = window.getSelection();
9 var range = document.createRange(); 9 var range = document.createRange();
10 range.selectNodeContents($('destination')); 10 range.selectNodeContents($('destination'));
11 selection.addRange(range); 11 selection.addRange(range);
12 document.execCommand('insertHTML', false, '<h2>source</h2>'); 12 document.execCommand('insertHTML', false, '<h2>source</h2>');
13 shouldBeEqualToString('$("destination").textContent', 'source'); 13 shouldBeEqualToString('$("destination").textContent', 'source');
14 14
15 if (window.testRunner) 15 if (window.testRunner)
16 $('content').outerHTML = ''; 16 $('content').outerHTML = '';
17 } 17 }
18 </script> 18 </script>
19 </head> 19 </head>
20 <body> 20 <body>
21 <div id="content"> 21 <div id="content">
22 <p id="description"></p> 22 <p id="description"></p>
23 <h1 contenteditable="true" id="destination">destination</h1> 23 <h1 contenteditable="true" id="destination">destination</h1>
24 </div> 24 </div>
25 <div id="console"></div> 25 <div id="console"></div>
26 <script src="../../fast/js/resources/js-test-pre.js"></script> 26 <script src="../../resources/js-test.js"></script>
27 <script> 27 <script>
28 testIt(); 28 testIt();
29 </script> 29 </script>
30 </body> 30 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698