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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-toDataURL-race-imageEncoder-png.html

Issue 2695963004: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-toDataURL-race-imageEncoder-png.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-toDataURL-race-imageEncoder-png.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-toDataURL-race-imageEncoder-png.html
index 6a4a15123433431f2e7cc877f529c1a5a5173198..81e437bfad30e03605764895951d1abb4453cd63 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-toDataURL-race-imageEncoder-png.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-toDataURL-race-imageEncoder-png.html
@@ -1,21 +1,27 @@
-<script src = "../../resources/js-test.js"></script>
-<script src = "../../fast/canvas/script-tests/canvas-toBlob-toDataURL-race.js"></script>
-<script type = 'text/javascript'>
-description("Verifies if synchronous PNG image encoding (toDataURL) conflicts with asynchronous image encoding (toBlob)");
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src = "./script-tests/canvas-toBlob-toDataURL-race.js"></script>
-//Fire a bunch of toBlob operations of canvas to keep the async thread busy
-var j = 0; // due to async nature of toBlob we need a separate counter
-for (var i = 0; i < numToBlobCalls; i++)
-{
- canvas.toBlob(function(blob) {
- url = URL.createObjectURL(blob);
- testImages[j++].src = url;
- });
-}
+<script>
+async_test(function(t) {
-//Then file a bunch of toDataURL operation on main thread, so both threads now compete for image encoding
-for (var i = numToBlobCalls; i < (numToDataURLCalls + numToBlobCalls); i++)
-{
- testImages[i].src = canvas.toDataURL();
-}
+ createAllTestCases(t);
+
+ //Fire a bunch of toBlob operations of canvas to keep the async thread busy
+ var j = 0; // due to async nature of toBlob we need a separate counter
+ for (var i = 0; i < numToBlobCalls; i++)
+ {
+ canvas.toBlob(function(blob) {
+ url = URL.createObjectURL(blob);
+ testImages[j++].src = url;
+ });
+ }
+
+ //Then file a bunch of toDataURL operation on main thread, so both threads now compete for image encoding
+ for (var i = numToBlobCalls; i < (numToDataURLCalls + numToBlobCalls); i++)
+ {
+ testImages[i].src = canvas.toDataURL();
+ }
+
+}, "Verifies if synchronous PNG image encoding (toDataURL) conflicts with asynchronous image encoding (toBlob)");
</script>

Powered by Google App Engine
This is Rietveld 408576698