Chromium Code Reviews| Index: LayoutTests/editing/execCommand/insertImage-src.html |
| diff --git a/LayoutTests/editing/execCommand/insertImage-src.html b/LayoutTests/editing/execCommand/insertImage-src.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7b6bb016bab0c46560096f7806dfdfce86fc6e55 |
| --- /dev/null |
| +++ b/LayoutTests/editing/execCommand/insertImage-src.html |
| @@ -0,0 +1,29 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| +<title>execCommand("insertImage") src attribute</title> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +</head> |
| +<body> |
| +<div id="log"></div> |
| +<script> |
| +function t(value, innerHTML) { |
| + test(function() { |
|
Yuta Kitamura
2014/12/11 02:35:50
We usually apply Blink's (C++) coding style in Jav
philipj_slow
2014/12/11 08:20:38
http://www.chromium.org/blink/coding-style/layout-
|
| + var e = document.createElement("div"); |
| + e.contentEditable = true; |
| + document.body.appendChild(e); |
| + e.focus(); |
| + document.execCommand("insertImage", false, value); |
| + assert_equals(e.innerHTML, innerHTML); |
| + document.body.removeChild(e); |
| + }, 'document.execCommand("insertImage", false, ' + value + ')'); |
| +} |
| +t(undefined, "<img>"); |
| +t(null, "<img>"); |
| +t("", "<img>"); |
| +t(" ", '<img src=" ">'); |
| +t("image", '<img src="image">'); |
| +</script> |
| +</body> |
| +</html> |