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

Side by Side Diff: third_party/WebKit/LayoutTests/virtual/threaded/fast/canvas-toBlob/canvas-toBlob-case-insensitive-mimetype.html

Issue 2189733003: Remove virtual test suits virtual/threaded/fast/canvas-toBlob (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
(Empty)
1 <script src = "../../../../resources/js-test.js"></script>
2 <script type = "text/javascript">
3 if (window.testRunner)
4 {
5 testRunner.dumpAsText();
6 testRunner.waitUntilDone();
7 }
8
9 description("Test that toBlob(mimeType) ignores the case of 'mimeType'.");
10
11 canvas = document.createElement('canvas');
12 var counter;
13
14 function tryMimeType(mimeType, expectedMimeType)
15 {
16 canvas.toBlob(function(blob) {
17 if (blob.type === expectedMimeType) {
18 testPassed("");
19 }
20 else {
21 testFailed(blob.type + " does not match " + expectedMimeType);
22 }
23 counter = counter - 1;
24 if (window.testRunner) {
25 if (counter == 0) {
26 testRunner.notifyDone();
27 }
28 }
29 }, mimeType);
30 }
31
32 counter = 4;
33
34 //Note that due to the async nature of toBlob, these callbacks may complete
35 // at random order but they will all print PASS when they pass.
36 tryMimeType("image/PNG", "image/png");
37
38 tryMimeType("imaGE/jpEg", "image/jpeg");
39
40 tryMimeType("ImAgE/WeBp", "image/webp");
41
42 //Unsupported mime type falls back to png
43 tryMimeType("image/bmp", "image/png");
44
45 </Script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698