Put Blob URL online

This commit is contained in:
Zhen Zhang 2016-07-15 01:02:21 +08:00
parent 4b78b9adab
commit fdc3a8e3ac
17 changed files with 260 additions and 191 deletions

View file

@ -5782,6 +5782,18 @@
"url": "/_mozilla/css/word_break_a.html"
}
],
"mozilla/blob_url_upload.html": [
{
"path": "mozilla/blob_url_upload.html",
"references": [
[
"/_mozilla/mozilla/blob_url_upload_ref.html",
"=="
]
],
"url": "/_mozilla/mozilla/blob_url_upload.html"
}
],
"mozilla/canvas/drawimage_html_image_1.html": [
{
"path": "mozilla/canvas/drawimage_html_image_1.html",
@ -14852,6 +14864,18 @@
"url": "/_mozilla/css/word_break_a.html"
}
],
"mozilla/blob_url_upload.html": [
{
"path": "mozilla/blob_url_upload.html",
"references": [
[
"/_mozilla/mozilla/blob_url_upload_ref.html",
"=="
]
],
"url": "/_mozilla/mozilla/blob_url_upload.html"
}
],
"mozilla/canvas/drawimage_html_image_1.html": [
{
"path": "mozilla/canvas/drawimage_html_image_1.html",

View file

@ -0,0 +1,3 @@
[blob_url_upload.html]
type: reftest
prefs: [dom.testing.htmlinputelement.select_files.enabled:true]

View file

@ -0,0 +1,22 @@
<!doctype html>
<meta charset="utf-8">
<title>Blob URL with File Upload</title>
<link rel="match" href="blob_url_upload_ref.html">
<body>
<img src="" id="image">
<input type="file" id="file-input"">
</body>
<script type="text/javascript">
var image = document.getElementById("image");
var inputElem = document.getElementById("file-input");
inputElem.selectFiles(["./tests/wpt/mozilla/tests/mozilla/test.jpg"]);
var f = inputElem.files[0];
var url = URL.createObjectURL(f);
image.src = url;
</script>

View file

@ -0,0 +1,7 @@
<!doctype html>
<meta charset="utf-8">
<title>Reference: Blob URL with File Upload</title>
<body>
<img src="test.jpg" id="image">
<input type="file" id="file-input"">
</body>