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

Unified Diff: LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage.html

Issue 19393004: Allow eviction of ImageBitmaps that are created from ImageElements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix for assertion failure. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage.html
diff --git a/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage.html b/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage.html
index db05ca72e6b27a06117c4fe4f3d7adc0ff78d89e..9635e200b52d8e5cfdcd3f4a88e2ea5bfef8b05b 100644
--- a/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage.html
+++ b/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage.html
@@ -138,6 +138,7 @@ function loaded() {
if (imageLoaded && imageBitmapLoaded) {
// check all of these elements
elements = [image, aCanvas, d, aCtx, testBitmap];
+
// wait for callback to finish before each check to ensure synchronous behavior
nextCheck(0);
}
@@ -170,7 +171,6 @@ function nextCheck(elementIndex) {
checkCrop(imageBitmaps.negativeCrop);
checkEmpty(imageBitmaps.empty);
checkEmpty(imageBitmaps.emptyTwo);
- checkImmutable(imageBitmaps.noCrop, elementIndex);
nextCheck(elementIndex + 1);
}, function() {
testFailed("createImageBitmap promise rejected.");
@@ -394,34 +394,6 @@ function checkEmpty(imageBitmap) {
shouldBeClear(11, 11);
shouldBeClear(22, 22);
}
-
-function checkImmutable(imageBitmap, elementIndex) {
- debug("Check immutable.");
- // change the underlying element to ensure that it does not change the imageBitmap
- switch(elementIndex) {
- case 0: // image
- image = new Image();
- break;
- case 1: // canvas
- clearContext(aCtx);
- break;
- case 2: // data
- d = 0;
- break;
- case 3: // context
- clearContext(aCtx);
- break;
- case 4: // bitmap
- testBitmap = 0;
- break;
- default:
- testFailed("Default should not be called.");
- }
- // should be drawn to (0, 0), (20, 20)
- checkNoCrop(imageBitmap);
- drawPattern(aCtx);
-}
-
</script>
<script src="../js/resources/js-test-post.js"></script>
</body>
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698