зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1329171 (part 1) - Add some more cases to the data URI unit test. r=jduell.
--HG-- extra : rebase_source : d8c044cfa5ec79a1881e410b26f8eef48b0fe593
This commit is contained in:
Родитель
738fcd7d41
Коммит
a68390af93
|
@ -6,18 +6,25 @@ Cu.import("resource://gre/modules/NetUtil.jsm");
|
|||
// - Other content strips unescaped spaces
|
||||
// - Base64 content strips escaped and unescaped spaces
|
||||
var urls = [
|
||||
["data:,", "text/plain", ""],
|
||||
["data:,foo", "text/plain", "foo"],
|
||||
["data:application/octet-stream,foo bar", "application/octet-stream", "foobar"],
|
||||
["data:application/octet-stream,foo%20bar", "application/octet-stream", "foo bar"],
|
||||
["data:application/xhtml+xml,foo bar", "application/xhtml+xml", "foo bar"],
|
||||
["data:application/xhtml+xml,foo%20bar", "application/xhtml+xml", "foo bar"],
|
||||
["data:text/plain,foo%00 bar", "text/plain", "foo\x00 bar"],
|
||||
["data:text/plain;x=y,foo%00 bar", "text/plain", "foo\x00 bar"],
|
||||
["data:;x=y,foo%00 bar", "text/plain", "foo\x00 bar"],
|
||||
["data:text/plain;base64,Zm9 vI%20GJ%0Dhc%0Ag==", "text/plain", "foo bar"],
|
||||
["DATA:TEXT/PLAIN;BASE64,Zm9 vI%20GJ%0Dhc%0Ag==", "text/plain", "foo bar"],
|
||||
["DaTa:;BaSe64,Zm9 vI%20GJ%0Dhc%0Ag==", "text/plain", "foo bar"],
|
||||
["data:;x=y;base64,Zm9 vI%20GJ%0Dhc%0Ag==", "text/plain", "foo bar"],
|
||||
// Bug 774240
|
||||
["data:application/octet-stream;base64=y,foobar", "application/octet-stream", "foobar"],
|
||||
// Bug 781693
|
||||
["data:text/plain;base64;x=y,dGVzdA==", "text/plain", "test"]
|
||||
["data:text/plain;base64;x=y,dGVzdA==", "text/plain", "test"],
|
||||
["data:text/plain;x=y;base64,dGVzdA==", "text/plain", "test"],
|
||||
["data:text/plain;x=y;base64,", "text/plain", ""]
|
||||
];
|
||||
|
||||
function run_test() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче