Title: [198096] trunk/LayoutTests
- Revision
- 198096
- Author
- [email protected]
- Date
- 2016-03-13 23:27:43 -0700 (Sun, 13 Mar 2016)
Log Message
Add copy/paste plug-in check for XHTML document
https://bugs.webkit.org/show_bug.cgi?id=106350
Reviewed by David Kilzer.
This bug was filed because of the assumption that there was a bug, but it
turns out that even in XHTML documents, we use HTML tree builder, so there is
no bug. Thus this just adds the test that demonstrates this.
* editing/pasteboard/paste-noplugin-xhtml-expected.txt: Added.
* editing/pasteboard/paste-noplugin-xhtml.xhtml: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (198095 => 198096)
--- trunk/LayoutTests/ChangeLog 2016-03-14 06:20:29 UTC (rev 198095)
+++ trunk/LayoutTests/ChangeLog 2016-03-14 06:27:43 UTC (rev 198096)
@@ -1,3 +1,17 @@
+2016-03-13 Darin Adler <[email protected]>
+
+ Add copy/paste plug-in check for XHTML document
+ https://bugs.webkit.org/show_bug.cgi?id=106350
+
+ Reviewed by David Kilzer.
+
+ This bug was filed because of the assumption that there was a bug, but it
+ turns out that even in XHTML documents, we use HTML tree builder, so there is
+ no bug. Thus this just adds the test that demonstrates this.
+
+ * editing/pasteboard/paste-noplugin-xhtml-expected.txt: Added.
+ * editing/pasteboard/paste-noplugin-xhtml.xhtml: Added.
+
2016-03-13 Sam Weinig <[email protected]>
Implement unprivileged execCommand("copy") and execCommand("cut")
Added: trunk/LayoutTests/editing/pasteboard/paste-noplugin-xhtml-expected.txt (0 => 198096)
--- trunk/LayoutTests/editing/pasteboard/paste-noplugin-xhtml-expected.txt (rev 0)
+++ trunk/LayoutTests/editing/pasteboard/paste-noplugin-xhtml-expected.txt 2016-03-14 06:27:43 UTC (rev 198096)
@@ -0,0 +1,27 @@
+This test copies embed and object elements, pastes them into an editable area, and verifies that unsafe tags are not pasted when the setting prohibits this.
+
+Original contents:
+| "
+"
+| <p>
+| "Some text to paste."
+| "
+"
+| <embed>
+| src=""
+| "
+"
+| <object>
+| data=""
+| <param>
+| name="src"
+| value="http://localhost:8000/evil.swf"
+| <embed>
+| src=""
+| "
+"
+
+Pasted contents:
+| <p>
+| "Some text to paste."
+| " <#selection-caret>"
Property changes on: trunk/LayoutTests/editing/pasteboard/paste-noplugin-xhtml-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/editing/pasteboard/paste-noplugin-xhtml.xhtml (0 => 198096)
--- trunk/LayoutTests/editing/pasteboard/paste-noplugin-xhtml.xhtml (rev 0)
+++ trunk/LayoutTests/editing/pasteboard/paste-noplugin-xhtml.xhtml 2016-03-14 06:27:43 UTC (rev 198096)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.setBlockAllPlugins(true);
+ internals.settings.setUnsafePluginPastingEnabled(false);
+}
+</script>
+<script src=""
+<body>
+<div id="source">
+<p>Some text to paste.</p>
+<embed src=""
+<object data="" name="src" value="http://localhost:8000/evil.swf"/><embed src=""
+</div>
+<div id="destination" contenteditable="true"></div>
+<ul id="console"></ul>
+<script>
+var source = document.getElementById("source");
+var destination = document.getElementById("destination");
+var selection = window.getSelection();
+selection.setBaseAndExtent(source, 0, source, 5);
+document.execCommand("Copy");
+selection.setPosition(destination, 0);
+document.execCommand("Paste");
+Markup.description("This test copies embed and object elements, pastes them into an editable area, and verifies that unsafe tags are not pasted when the setting prohibits this.");
+Markup.dump("source", "Original contents");
+Markup.dump("destination", "Pasted contents");
+</script>
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes