OLD | NEW |
---|---|
(Empty) | |
1 <!-- This test checks copyImageAt() with position parameter | |
2 that actually doesn't point to an Image(Canvas). | |
3 (Negative test for crbug.com/392765) --> | |
4 <head> | |
5 <script src="../resources/js-test.js"></script> | |
6 <script> | |
7 | |
8 function main() | |
9 { | |
10 if (!window.testRunner) { | |
11 testFailed("Requires window.testRunner"); | |
12 } else { | |
13 testRunner.waitUntilDone(); | |
14 testRunner.dumpAsText(); | |
15 window.requestAnimationFrame(runTest); | |
16 } | |
17 } | |
18 | |
19 function runTest() { | |
20 try { | |
21 testRunner.copyImageAtAndCapturePixelsAsyncThen(50, 50, completionCallback); | |
22 } catch (e) { | |
23 debug('error in runTest'); | |
24 debug(e); | |
25 testRunner.notifyDone(); | |
26 } | |
27 } | |
28 var width, height; | |
29 function completionCallback(w, h, snapshot) { | |
30 try { | |
31 width = w; | |
32 height = h; | |
33 shouldBeEqualToNumber("width", 0); | |
34 shouldBeEqualToNumber("height", 0); | |
Ken Russell (switch to Gerrit)
2014/07/18 23:33:29
Ideally this would test the value of "snapshot", t
| |
35 } catch (e) { | |
36 debug('error in completionCallback'); | |
37 debug(e); | |
38 testRunner.notifyDone(); | |
39 return; | |
40 } | |
41 testRunner.notifyDone(); | |
42 } | |
43 | |
44 main(); | |
45 </script> | |
46 </head> | |
47 <body> | |
48 <div id="console"></div> | |
49 </body> | |
OLD | NEW |