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

Unified Diff: LayoutTests/compositing/copy-image-when-no-image-exists.html

Issue 389273002: Fix copyImage for WebGL elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: seperated negative test Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/compositing/copy-image-when-no-image-exists-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/compositing/copy-image-when-no-image-exists.html
diff --git a/LayoutTests/compositing/copy-image-when-no-image-exists.html b/LayoutTests/compositing/copy-image-when-no-image-exists.html
new file mode 100644
index 0000000000000000000000000000000000000000..56cd6bb460c04398b66c525575997e141f32385b
--- /dev/null
+++ b/LayoutTests/compositing/copy-image-when-no-image-exists.html
@@ -0,0 +1,49 @@
+<!-- This test checks copyImageAt() with position parameter
+ that actually doesn't point to an Image(Canvas).
+ (Negative test for crbug.com/392765) -->
+<head>
+<script src="../resources/js-test.js"></script>
+<script>
+
+function main()
+{
+ if (!window.testRunner) {
+ testFailed("Requires window.testRunner");
+ } else {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+ window.requestAnimationFrame(runTest);
+ }
+}
+
+function runTest() {
+ try {
+ testRunner.copyImageAtAndCapturePixelsAsyncThen(50, 50, completionCallback);
+ } catch (e) {
+ debug('error in runTest');
+ debug(e);
+ testRunner.notifyDone();
+ }
+}
+var width, height;
+function completionCallback(w, h, snapshot) {
+ try {
+ width = w;
+ height = h;
+ shouldBeEqualToNumber("width", 0);
+ shouldBeEqualToNumber("height", 0);
Ken Russell (switch to Gerrit) 2014/07/18 23:33:29 Ideally this would test the value of "snapshot", t
+ } catch (e) {
+ debug('error in completionCallback');
+ debug(e);
+ testRunner.notifyDone();
+ return;
+ }
+ testRunner.notifyDone();
+}
+
+main();
+</script>
+</head>
+<body>
+<div id="console"></div>
+</body>
« no previous file with comments | « no previous file | LayoutTests/compositing/copy-image-when-no-image-exists-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698