Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / execCommand / insertImage-src.html
blobdd0e61af0c1ec953493fbdd1256829aded835c46
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>execCommand("insertImage") src attribute</title>
5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script>
7 </head>
8 <body>
9 <div id="log"></div>
10 <script>
11 function insertImageTest(value, innerHTML) {
12 test(function() {
13 var element = document.createElement("div");
14 element.contentEditable = true;
15 document.body.appendChild(element);
16 element.focus();
17 document.execCommand("insertImage", false, value);
18 assert_equals(element.innerHTML, innerHTML);
19 document.body.removeChild(element);
20 }, 'document.execCommand("insertImage", false, ' + value + ')');
22 insertImageTest(undefined, "<img>");
23 insertImageTest(null, '<img src="null">');
24 insertImageTest("", "<img>");
25 insertImageTest(" ", '<img src=" ">');
26 insertImageTest("image", '<img src="image">');
27 </script>
28 </body>
29 </html>