blob: 6920f75d75e58eaa47f7ff6b83f7a219b5ef051c [file] [log] [blame]
This tests calling setData to set a URL in a null origin document. The URL should be sanitized when reading in another document.
To manually test, drag and drop the "1. Drag this" above to "2. Drop here" and "3. Drop here".
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
dragstart in the null origin document:
PASS url is "http://webkit.org/b/🤔?x=8 + 6"
PASS html is "testing"
PASS JSON.stringify(types) is "[\"text/uri-list\",\"text/html\"]"
PASS JSON.stringify(items) is "[{\"kind\":\"string\",\"type\":\"text/uri-list\"},{\"kind\":\"string\",\"type\":\"text/html\"}]"
dragover in the null origin document:
PASS url is ""
PASS html is ""
PASS JSON.stringify(types) is "[\"text/uri-list\",\"text/html\"]"
PASS JSON.stringify(items) is "[{\"kind\":\"string\",\"type\":\"text/uri-list\"},{\"kind\":\"string\",\"type\":\"text/html\"}]"
drop in the null origin document:
PASS url is "http://webkit.org/b/🤔?x=8 + 6"
PASS html is "testing"
PASS JSON.stringify(types) is "[\"text/uri-list\",\"text/html\"]"
PASS JSON.stringify(items) is "[{\"kind\":\"string\",\"type\":\"text/uri-list\"},{\"kind\":\"string\",\"type\":\"text/html\"}]"
dragstart in the null origin document:
PASS url is "http://webkit.org/b/🤔?x=8 + 6"
PASS html is "testing"
PASS JSON.stringify(types) is "[\"text/uri-list\",\"text/html\"]"
PASS JSON.stringify(items) is "[{\"kind\":\"string\",\"type\":\"text/uri-list\"},{\"kind\":\"string\",\"type\":\"text/html\"}]"
dragover in the file URL document:
PASS url is ""
PASS html is ""
PASS JSON.stringify(types) is "[\"text/uri-list\",\"text/html\"]"
PASS JSON.stringify(items) is "[{\"kind\":\"string\",\"type\":\"text/uri-list\"},{\"kind\":\"string\",\"type\":\"text/html\"}]"
drop in the file URL document:
PASS url is "http://webkit.org/b/%F0%9F%A4%94?x=8%20+%206"
PASS html.includes("testing") is true
PASS JSON.stringify(types) is "[\"text/uri-list\",\"text/html\"]"
PASS JSON.stringify(items) is "[{\"kind\":\"string\",\"type\":\"text/uri-list\"},{\"kind\":\"string\",\"type\":\"text/html\"}]"
PASS successfullyParsed is true
TEST COMPLETE