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

Unified Diff: LayoutTests/editing/execCommand/insertImage-src.html

Issue 788153003: Make execCommand("insertImage", false, "") not add a src attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tweak test style 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/editing/EditorCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c733e95870126ef570c2a34ebf033afad18dd6d0
--- /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 insertImageTest(value, innerHTML) {
+ test(function() {
+ var element = document.createElement("div");
+ element.contentEditable = true;
+ document.body.appendChild(element);
+ element.focus();
+ document.execCommand("insertImage", false, value);
+ assert_equals(element.innerHTML, innerHTML);
+ document.body.removeChild(element);
+ }, 'document.execCommand("insertImage", false, ' + value + ')');
+}
+insertImageTest(undefined, "<img>");
+insertImageTest(null, "<img>");
+insertImageTest("", "<img>");
+insertImageTest(" ", '<img src=" ">');
+insertImageTest("image", '<img src="image">');
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | Source/core/editing/EditorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698