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

Unified Diff: LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context-expected.txt

Issue 750273003: canvas: calling toDataURL without context doesn't create a buffer of canvas 2d. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix typo Created 6 years, 1 month 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: LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context-expected.txt
diff --git a/LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context-expected.txt b/LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context-expected.txt
new file mode 100644
index 0000000000000000000000000000000000000000..d73275018d551f6515a928b2f89888b773e71ab1
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context-expected.txt
@@ -0,0 +1,34 @@
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Check for drawing webgl to canvas 2d on the same frame.
+1) when drawingBuffer is preserved.
+PASS imgdata[0] is 255
+PASS imgdata[1] is 0
+PASS imgdata[2] is 0
+PASS imgdata[0] is 0
+PASS imgdata[1] is 255
+PASS imgdata[2] is 0
+2) when drawingBuffer is not preserved.
+PASS imgdata[0] is 255
+PASS imgdata[1] is 0
+PASS imgdata[2] is 0
+PASS imgdata[0] is 0
+PASS imgdata[1] is 255
+PASS imgdata[2] is 0
+Check for drawing webgl to canvas 2d several frames after drawing webgl contents.
+1) when drawingBuffer is preserved.
+PASS imgdata[0] is 255
+PASS imgdata[1] is 0
+PASS imgdata[2] is 0
+PASS imgdata[0] is 0
+PASS imgdata[1] is 255
+PASS imgdata[2] is 0
+2) when drawingBuffer is not preserved. It leads to undefined behavior.
+PASS imgdata[0] is 255
+PASS imgdata[1] is 0
+PASS imgdata[2] is 0
+PASS imgdata[0] is 255
+PASS imgdata[1] is 0
+PASS imgdata[2] is 0
+Everything is same to draw-webgl-to-canvas-2d.html except for calling redundant toDataURL(). Canvas spec allows to call toDataURL() without a context. Some bad things can happen if we call toDataURL() without a context and then create a context and then call toDataURL() again.

Powered by Google App Engine
This is Rietveld 408576698