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

Side by Side Diff: LayoutTests/imported/web-platform-tests/FileAPI/url/url_createobjecturl_blob.html

Issue 1236713002: Import FileAPI tests from web-platform-tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ugh, stupid baselines Created 5 years, 5 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <title>FileAPI Test: Creating Blob URL with Blob</title>
4 <link rel="author" title="Intel" href="http://www.intel.com">
5 <link rel="author" title="JunChen Xia" href="mailto:xjconlyme@gmail.com">
6 <script src="../../../../resources/testharness.js"></script>
7 <script src="../../../../resources/testharnessreport.js"></script>
8
9 <div id="log"></div>
10
11 <script>
12 var blob = new Blob(["Test Blob"]);
13
14 test(function() {
15 var testBlob = window.URL.createObjectURL(blob);
16 assert_equals(typeof testBlob, "string", "Blob URI is typeof string");
17 assert_equals(testBlob.indexOf("blob"), 0, "Blob URI starts with 'blob'");
18 }, "Check if the Blob URI starts with 'blob' using createObjectURL()");
19
20 test(function() {
21 var testBlob = window.URL.createFor(blob);
22 assert_equals(typeof testBlob, "string", "Blob URI is typeof string");
23 assert_equals(testBlob.indexOf("blob"), 0, "Blob URI starts with 'blob'");
24 }, "Check if the Blob URI starts with 'blob' using createFor()");
25 </script>
26
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698