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

Side by Side Diff: LayoutTests/editing/execCommand/insertImage-src.html

Issue 751553005: Sync execCommand() and queryCommand*() IDL with spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>execCommand("insertImage") src attribute</title> 4 <title>execCommand("insertImage") src attribute</title>
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 </head> 7 </head>
8 <body> 8 <body>
9 <div id="log"></div> 9 <div id="log"></div>
10 <script> 10 <script>
11 function insertImageTest(value, innerHTML) { 11 function insertImageTest(value, innerHTML) {
12 test(function() { 12 test(function() {
13 var element = document.createElement("div"); 13 var element = document.createElement("div");
14 element.contentEditable = true; 14 element.contentEditable = true;
15 document.body.appendChild(element); 15 document.body.appendChild(element);
16 element.focus(); 16 element.focus();
17 document.execCommand("insertImage", false, value); 17 document.execCommand("insertImage", false, value);
18 assert_equals(element.innerHTML, innerHTML); 18 assert_equals(element.innerHTML, innerHTML);
19 document.body.removeChild(element); 19 document.body.removeChild(element);
20 }, 'document.execCommand("insertImage", false, ' + value + ')'); 20 }, 'document.execCommand("insertImage", false, ' + value + ')');
21 } 21 }
22 insertImageTest(undefined, "<img>"); 22 insertImageTest(undefined, "<img>");
23 insertImageTest(null, "<img>"); 23 insertImageTest(null, '<img src="null">');
24 insertImageTest("", "<img>"); 24 insertImageTest("", "<img>");
25 insertImageTest(" ", '<img src=" ">'); 25 insertImageTest(" ", '<img src=" ">');
26 insertImageTest("image", '<img src="image">'); 26 insertImageTest("image", '<img src="image">');
27 </script> 27 </script>
28 </body> 28 </body>
29 </html> 29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698