From df14baa628d8636255bddcbc8d786c71f45b86d3 Mon Sep 17 00:00:00 2001 From: Jeff Gilbert Date: Thu, 6 Sep 2012 18:46:39 -0700 Subject: [PATCH] Bug 782860 - Add basic WebGL reftests - r=bjacob --- content/canvas/test/reftest/black.png | Bin 0 -> 1027 bytes .../canvas/test/reftest/colors-half-alpha.png | Bin 0 -> 1936 bytes content/canvas/test/reftest/colors.png | Bin 0 -> 1907 bytes content/canvas/test/reftest/green.png | Bin 0 -> 1358 bytes .../test/reftest/half-colors-half-alpha.png | Bin 0 -> 1937 bytes content/canvas/test/reftest/half-colors.png | Bin 0 -> 1894 bytes content/canvas/test/reftest/reftest.list | 187 ++++++++++++++++++ .../canvas/test/reftest/webgl-clear-test.html | 43 ++++ .../test/reftest/webgl-color-alpha-test.html | 96 +++++++++ .../canvas/test/reftest/webgl-color-test.html | 80 ++++++++ .../test/reftest/webgl-disable-test.html | 55 ++++++ .../test/reftest/webgl-hanging-fb-test.html | 53 +++++ .../reftest/webgl-hanging-scissor-test.html | 52 +++++ .../test/reftest/webgl-orientation-test.html | 55 ++++++ content/canvas/test/reftest/webgl-utils.js | 63 ++++++ .../canvas/test/reftest/white-top-left.png | Bin 0 -> 1418 bytes content/canvas/test/reftest/white.png | Bin 0 -> 1401 bytes content/canvas/test/reftest/wrapper.html | 27 +++ content/test/reftest/reftest.list | 5 + .../reftest/bmp/bmp-corrupted/wrapper.html | 2 +- 20 files changed, 717 insertions(+), 1 deletion(-) create mode 100644 content/canvas/test/reftest/black.png create mode 100644 content/canvas/test/reftest/colors-half-alpha.png create mode 100644 content/canvas/test/reftest/colors.png create mode 100644 content/canvas/test/reftest/green.png create mode 100644 content/canvas/test/reftest/half-colors-half-alpha.png create mode 100644 content/canvas/test/reftest/half-colors.png create mode 100644 content/canvas/test/reftest/reftest.list create mode 100644 content/canvas/test/reftest/webgl-clear-test.html create mode 100644 content/canvas/test/reftest/webgl-color-alpha-test.html create mode 100644 content/canvas/test/reftest/webgl-color-test.html create mode 100644 content/canvas/test/reftest/webgl-disable-test.html create mode 100644 content/canvas/test/reftest/webgl-hanging-fb-test.html create mode 100644 content/canvas/test/reftest/webgl-hanging-scissor-test.html create mode 100644 content/canvas/test/reftest/webgl-orientation-test.html create mode 100644 content/canvas/test/reftest/webgl-utils.js create mode 100644 content/canvas/test/reftest/white-top-left.png create mode 100644 content/canvas/test/reftest/white.png create mode 100644 content/canvas/test/reftest/wrapper.html diff --git a/content/canvas/test/reftest/black.png b/content/canvas/test/reftest/black.png new file mode 100644 index 0000000000000000000000000000000000000000..7e3e4b53747914a3eaf1a961a5b09945da0c0337 GIT binary patch literal 1027 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911L)MWvCLlCbx$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&eBK4*bPWHAE+-(e7DJf6QI1t=(0;u=vBoS#-wo>-L15RjOeSEA?V8lq5U ztY@lcXkhTAXdwdwbCIWuV@O5Z+Y5#uI}a`R>i;&CyTc*zKm#K)8;^uR!YE@j5Jpo1 e)pEfBb~Z*`2F3(a$x2{;WAJqKb6Mw<&;$SyeChH4 literal 0 HcmV?d00001 diff --git a/content/canvas/test/reftest/colors-half-alpha.png b/content/canvas/test/reftest/colors-half-alpha.png new file mode 100644 index 0000000000000000000000000000000000000000..e64729dedf2bb2f539fcc572541fbf4f7229d394 GIT binary patch literal 1936 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911L)MWvCLmt=wDo#XdN2yZxW|hUfip z3^y2i=KmMeV#rZACVt=#(+!87`S$ht3}yn4xfALbfuiTrkv_zbK)89ZJ6T-G@yGywqBH|F60 literal 0 HcmV?d00001 diff --git a/content/canvas/test/reftest/colors.png b/content/canvas/test/reftest/colors.png new file mode 100644 index 0000000000000000000000000000000000000000..02764182e5850fbc2648d8d03fcc19f003c83456 GIT binary patch literal 1907 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911L)MWvCLlCbx$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&eBK4*bPWHAE+-(e7DJf6QI1t=(0;u=vBoS#-wo>-L15RjOeSEA?V8lq5U ztY@lcXkhTAXdwdw+apgG$B>G+x7QEmIy(v+zVLSc%lvXj#?MW6mM%P6`f19=vpYGL7MIFQM-yq{lQ?xHe`BVXBag@aRoq46?{pS--C z%_4UWD98R2$4WsV1qP<&oOA5#YARg%1)!X|CxSuBDh>=Re!>>DH9tOd$SFcOe@-Yb zar0%hy$ zhuhu1aKJe3a*C!-Fh7iXXf%dspX9{l7CsmD;H;?&V(MqmZTxas{NH~*ulx2d&29)O zIQ%Kk`2Epaoq^FW+JS*d;J|)H*~ZJSr7iB6H{>@oN|uRoI5gzdGM{8oIBiVVau^sKUdP19abaz~!b}Dhi5ZFEjSMU=u9;8pVPN7p zvtc#R=#tmc9%>AXY-u+_6&M(IedSdVZeU-L15RjOeSEA?V8lq5U ztY@lcXkhTAXd%#~y`CFgH@0mCy7#g=Y?Ar5RIe~%Y64T31|N0vk1w6Qyoc?VOQ}mx>RMBV;C=O%W%V?N5A1GD^S$F{$CtJj>0kV1Amx+qVw(R z^%=|r9&;zuF#<);&)+Z3Al>ni)nGqJ^!fSw+zq@(elX352Z?@u{+{&!TT%_<8GVrG z&(GhPfEMgycqR@M{qyH%HRGtYqk%k{qzGrAJ9-Y{6}2yzmNUFz`ts{wJmUj{9&s;VSkpKoj)Ap7bjuGW4TfxmW#SHu39P#N7`P5db-ZK^V2E(+ j)*sa}8e$_N!PNh@mi}@g^AE7nWnl1h^>bP0l+XkKP`~72 literal 0 HcmV?d00001 diff --git a/content/canvas/test/reftest/half-colors.png b/content/canvas/test/reftest/half-colors.png new file mode 100644 index 0000000000000000000000000000000000000000..838b9566119961ac8cb51095733428734d1e93fb GIT binary patch literal 1894 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911L)MWvCLmXhnymm^XG)}5;u-NrAM#sB^1^SW>U((Hzig2SKkjNc!<)fpK5 zq8%8R1P<(Hlx@8HTH4~Cc|(3fqhy&VheJbNE%Qkhg#!n8c5|^PIBeh7n8GBGkkA&( z$|SHL`o4n^BZq;(;dM-m92eH+E6ikIk(iMf-pIi6;+pvc9|k6#GaFU|jV^gD?V-lN z$d+~^RDpqU*H>N@;RXg~<2PCY4GedGu}$K17`1LRFo$1KdC1;(y<6FHnSVR5PGsbP0l+XkKkx-GR literal 0 HcmV?d00001 diff --git a/content/canvas/test/reftest/reftest.list b/content/canvas/test/reftest/reftest.list new file mode 100644 index 00000000000..70686dda5c1 --- /dev/null +++ b/content/canvas/test/reftest/reftest.list @@ -0,0 +1,187 @@ +# WebGL Reftests! +# If you add new tests, don't forget to add sanity (&nogl) tests! (if needed) + +# Check that disabling works: + == webgl-disable-test.html?nogl wrapper.html?green.png +pref(webgl.disabled,true) == webgl-disable-test.html wrapper.html?green.png + +# Basic WebGL tests: +# Do we get pixels to the screen at all? +# Try to just hit the different rendering paths here. +# Test: {aa, alpha, preserve, readback} = 16 +== webgl-clear-test.html?nogl wrapper.html?green.png + +== webgl-clear-test.html?__&_____&________ wrapper.html?green.png +== webgl-clear-test.html?aa&_____&________ wrapper.html?green.png +== webgl-clear-test.html?__&alpha&________ wrapper.html?green.png +== webgl-clear-test.html?aa&alpha&________ wrapper.html?green.png +== webgl-clear-test.html?__&_____&preserve wrapper.html?green.png +== webgl-clear-test.html?aa&_____&preserve wrapper.html?green.png +== webgl-clear-test.html?__&alpha&preserve wrapper.html?green.png +== webgl-clear-test.html?aa&alpha&preserve wrapper.html?green.png + +pref(webgl.force-layers-readback,true) == webgl-clear-test.html?readback&__&_____&________ wrapper.html?green.png +pref(webgl.force-layers-readback,true) == webgl-clear-test.html?readback&aa&_____&________ wrapper.html?green.png +pref(webgl.force-layers-readback,true) == webgl-clear-test.html?readback&__&alpha&________ wrapper.html?green.png +pref(webgl.force-layers-readback,true) == webgl-clear-test.html?readback&aa&alpha&________ wrapper.html?green.png +pref(webgl.force-layers-readback,true) == webgl-clear-test.html?readback&__&_____&preserve wrapper.html?green.png +pref(webgl.force-layers-readback,true) == webgl-clear-test.html?readback&aa&_____&preserve wrapper.html?green.png +pref(webgl.force-layers-readback,true) == webgl-clear-test.html?readback&__&alpha&preserve wrapper.html?green.png +pref(webgl.force-layers-readback,true) == webgl-clear-test.html?readback&aa&alpha&preserve wrapper.html?green.png + +# Check orientation: +== webgl-orientation-test.html?nogl wrapper.html?white-top-left.png + +== webgl-orientation-test.html?__&_____&________ wrapper.html?white-top-left.png +== webgl-orientation-test.html?aa&_____&________ wrapper.html?white-top-left.png +== webgl-orientation-test.html?__&alpha&________ wrapper.html?white-top-left.png +== webgl-orientation-test.html?aa&alpha&________ wrapper.html?white-top-left.png +== webgl-orientation-test.html?__&_____&preserve wrapper.html?white-top-left.png +== webgl-orientation-test.html?aa&_____&preserve wrapper.html?white-top-left.png +== webgl-orientation-test.html?__&alpha&preserve wrapper.html?white-top-left.png +== webgl-orientation-test.html?aa&alpha&preserve wrapper.html?white-top-left.png + +pref(webgl.force-layers-readback,true) == webgl-orientation-test.html?readback&__&_____&________ wrapper.html?white-top-left.png +pref(webgl.force-layers-readback,true) == webgl-orientation-test.html?readback&aa&_____&________ wrapper.html?white-top-left.png +pref(webgl.force-layers-readback,true) == webgl-orientation-test.html?readback&__&alpha&________ wrapper.html?white-top-left.png +pref(webgl.force-layers-readback,true) == webgl-orientation-test.html?readback&aa&alpha&________ wrapper.html?white-top-left.png +pref(webgl.force-layers-readback,true) == webgl-orientation-test.html?readback&__&_____&preserve wrapper.html?white-top-left.png +pref(webgl.force-layers-readback,true) == webgl-orientation-test.html?readback&aa&_____&preserve wrapper.html?white-top-left.png +pref(webgl.force-layers-readback,true) == webgl-orientation-test.html?readback&__&alpha&preserve wrapper.html?white-top-left.png +pref(webgl.force-layers-readback,true) == webgl-orientation-test.html?readback&aa&alpha&preserve wrapper.html?white-top-left.png + +# Does we draw the correct color in the correct places with all context creation options? +# (Note that our context creation option matrix is 2^6 = 64) +== webgl-color-test.html?nogl wrapper.html?colors.png + +== webgl-color-test.html?__&_____&_____&_______&________&_______ wrapper.html?colors.png +== webgl-color-test.html?aa&_____&_____&_______&________&_______ wrapper.html?colors.png +== webgl-color-test.html?__&alpha&_____&_______&________&_______ wrapper.html?colors.png +== webgl-color-test.html?aa&alpha&_____&_______&________&_______ wrapper.html?colors.png +== webgl-color-test.html?__&_____&depth&_______&________&_______ wrapper.html?colors.png +== webgl-color-test.html?aa&_____&depth&_______&________&_______ wrapper.html?colors.png +== webgl-color-test.html?__&alpha&depth&_______&________&_______ wrapper.html?colors.png +== webgl-color-test.html?aa&alpha&depth&_______&________&_______ wrapper.html?colors.png +== webgl-color-test.html?__&_____&_____&premult&________&_______ wrapper.html?colors.png +== webgl-color-test.html?aa&_____&_____&premult&________&_______ wrapper.html?colors.png +== webgl-color-test.html?__&alpha&_____&premult&________&_______ wrapper.html?colors.png +== webgl-color-test.html?aa&alpha&_____&premult&________&_______ wrapper.html?colors.png +== webgl-color-test.html?__&_____&depth&premult&________&_______ wrapper.html?colors.png +== webgl-color-test.html?aa&_____&depth&premult&________&_______ wrapper.html?colors.png +== webgl-color-test.html?__&alpha&depth&premult&________&_______ wrapper.html?colors.png +== webgl-color-test.html?aa&alpha&depth&premult&________&_______ wrapper.html?colors.png + +== webgl-color-test.html?__&_____&_____&_______&preserve&_______ wrapper.html?colors.png +== webgl-color-test.html?aa&_____&_____&_______&preserve&_______ wrapper.html?colors.png +== webgl-color-test.html?__&alpha&_____&_______&preserve&_______ wrapper.html?colors.png +== webgl-color-test.html?aa&alpha&_____&_______&preserve&_______ wrapper.html?colors.png +== webgl-color-test.html?__&_____&depth&_______&preserve&_______ wrapper.html?colors.png +== webgl-color-test.html?aa&_____&depth&_______&preserve&_______ wrapper.html?colors.png +== webgl-color-test.html?__&alpha&depth&_______&preserve&_______ wrapper.html?colors.png +== webgl-color-test.html?aa&alpha&depth&_______&preserve&_______ wrapper.html?colors.png +== webgl-color-test.html?__&_____&_____&premult&preserve&_______ wrapper.html?colors.png +== webgl-color-test.html?aa&_____&_____&premult&preserve&_______ wrapper.html?colors.png +== webgl-color-test.html?__&alpha&_____&premult&preserve&_______ wrapper.html?colors.png +== webgl-color-test.html?aa&alpha&_____&premult&preserve&_______ wrapper.html?colors.png +== webgl-color-test.html?__&_____&depth&premult&preserve&_______ wrapper.html?colors.png +== webgl-color-test.html?aa&_____&depth&premult&preserve&_______ wrapper.html?colors.png +== webgl-color-test.html?__&alpha&depth&premult&preserve&_______ wrapper.html?colors.png +== webgl-color-test.html?aa&alpha&depth&premult&preserve&_______ wrapper.html?colors.png + +== webgl-color-test.html?__&_____&_____&_______&________&stencil wrapper.html?colors.png +== webgl-color-test.html?aa&_____&_____&_______&________&stencil wrapper.html?colors.png +== webgl-color-test.html?__&alpha&_____&_______&________&stencil wrapper.html?colors.png +== webgl-color-test.html?aa&alpha&_____&_______&________&stencil wrapper.html?colors.png +== webgl-color-test.html?__&_____&depth&_______&________&stencil wrapper.html?colors.png +== webgl-color-test.html?aa&_____&depth&_______&________&stencil wrapper.html?colors.png +== webgl-color-test.html?__&alpha&depth&_______&________&stencil wrapper.html?colors.png +== webgl-color-test.html?aa&alpha&depth&_______&________&stencil wrapper.html?colors.png +== webgl-color-test.html?__&_____&_____&premult&________&stencil wrapper.html?colors.png +== webgl-color-test.html?aa&_____&_____&premult&________&stencil wrapper.html?colors.png +== webgl-color-test.html?__&alpha&_____&premult&________&stencil wrapper.html?colors.png +== webgl-color-test.html?aa&alpha&_____&premult&________&stencil wrapper.html?colors.png +== webgl-color-test.html?__&_____&depth&premult&________&stencil wrapper.html?colors.png +== webgl-color-test.html?aa&_____&depth&premult&________&stencil wrapper.html?colors.png +== webgl-color-test.html?__&alpha&depth&premult&________&stencil wrapper.html?colors.png +== webgl-color-test.html?aa&alpha&depth&premult&________&stencil wrapper.html?colors.png + +== webgl-color-test.html?__&_____&_____&_______&preserve&stencil wrapper.html?colors.png +== webgl-color-test.html?aa&_____&_____&_______&preserve&stencil wrapper.html?colors.png +== webgl-color-test.html?__&alpha&_____&_______&preserve&stencil wrapper.html?colors.png +== webgl-color-test.html?aa&alpha&_____&_______&preserve&stencil wrapper.html?colors.png +== webgl-color-test.html?__&_____&depth&_______&preserve&stencil wrapper.html?colors.png +== webgl-color-test.html?aa&_____&depth&_______&preserve&stencil wrapper.html?colors.png +== webgl-color-test.html?__&alpha&depth&_______&preserve&stencil wrapper.html?colors.png +== webgl-color-test.html?aa&alpha&depth&_______&preserve&stencil wrapper.html?colors.png +== webgl-color-test.html?__&_____&_____&premult&preserve&stencil wrapper.html?colors.png +== webgl-color-test.html?aa&_____&_____&premult&preserve&stencil wrapper.html?colors.png +== webgl-color-test.html?__&alpha&_____&premult&preserve&stencil wrapper.html?colors.png +== webgl-color-test.html?aa&alpha&_____&premult&preserve&stencil wrapper.html?colors.png +== webgl-color-test.html?__&_____&depth&premult&preserve&stencil wrapper.html?colors.png +== webgl-color-test.html?aa&_____&depth&premult&preserve&stencil wrapper.html?colors.png +== webgl-color-test.html?__&alpha&depth&premult&preserve&stencil wrapper.html?colors.png +== webgl-color-test.html?aa&alpha&depth&premult&preserve&stencil wrapper.html?colors.png + + +# Check a smaller selection for readback: +pref(webgl.force-layers-readback,true) == webgl-color-test.html?readback&__&_____&________ wrapper.html?colors.png +pref(webgl.force-layers-readback,true) == webgl-color-test.html?readback&aa&_____&________ wrapper.html?colors.png +pref(webgl.force-layers-readback,true) == webgl-color-test.html?readback&__&alpha&________ wrapper.html?colors.png +pref(webgl.force-layers-readback,true) == webgl-color-test.html?readback&aa&alpha&________ wrapper.html?colors.png +pref(webgl.force-layers-readback,true) == webgl-color-test.html?readback&__&_____&preserve wrapper.html?colors.png +pref(webgl.force-layers-readback,true) == webgl-color-test.html?readback&aa&_____&preserve wrapper.html?colors.png +pref(webgl.force-layers-readback,true) == webgl-color-test.html?readback&__&alpha&preserve wrapper.html?colors.png +pref(webgl.force-layers-readback,true) == webgl-color-test.html?readback&aa&alpha&preserve wrapper.html?colors.png + + +# Check alpha behavior: +== webgl-color-alpha-test.html?colorVal=1.0&alphaVal=1.0&nogl wrapper.html?colors.png +== webgl-color-alpha-test.html?colorVal=1.0&alphaVal=1.0 wrapper.html?colors.png +fuzzy(1,65536) == webgl-color-alpha-test.html?colorVal=0.5&alphaVal=1.0&nogl wrapper.html?half-colors.png +fuzzy(1,65536) == webgl-color-alpha-test.html?colorVal=0.5&alphaVal=1.0 wrapper.html?half-colors.png +== webgl-color-alpha-test.html?colorVal=0.0&alphaVal=1.0&nogl wrapper.html?black.png +== webgl-color-alpha-test.html?colorVal=0.0&alphaVal=1.0 wrapper.html?black.png + +== webgl-color-alpha-test.html?colorVal=1.0&alphaVal=0.0&nogl wrapper.html?colors.png +== webgl-color-alpha-test.html?colorVal=1.0&alphaVal=0.0 wrapper.html?colors.png +== webgl-color-alpha-test.html?colorVal=1.0&alphaVal=0.0&alpha&nogl wrapper.html?white.png +== webgl-color-alpha-test.html?colorVal=1.0&alphaVal=0.0&alpha wrapper.html?white.png + +# Test premult: +fuzzy(1,65536) == webgl-color-alpha-test.html?colorVal=1.0&alphaVal=0.5&alpha&nogl wrapper.html?colors-half-alpha.png +fuzzy(1,65536) == webgl-color-alpha-test.html?colorVal=1.0&alphaVal=0.5&alpha wrapper.html?colors-half-alpha.png +fuzzy(1,65536) == webgl-color-alpha-test.html?colorVal=0.5&alphaVal=0.5&alpha&nogl wrapper.html?half-colors-half-alpha.png +fuzzy(1,65536) == webgl-color-alpha-test.html?colorVal=0.5&alphaVal=0.5&alpha wrapper.html?half-colors-half-alpha.png +fuzzy(1,65536) == webgl-color-alpha-test.html?colorVal=0.5&alphaVal=0.5&alpha&premult&nogl wrapper.html?colors-half-alpha.png +fuzzy(1,65536) == webgl-color-alpha-test.html?colorVal=0.5&alphaVal=0.5&alpha&premult wrapper.html?colors-half-alpha.png + +# Test over-bright premult: +fuzzy(1,65536) == webgl-color-alpha-test.html?colorVal=1.0&alphaVal=0.5&alpha&premult&nogl wrapper.html?colors-half-alpha.png +fuzzy(1,65536) == webgl-color-alpha-test.html?colorVal=1.0&alphaVal=0.5&alpha&premult wrapper.html?colors-half-alpha.png + + +# Check for hanging framebuffer bindings: +== webgl-hanging-fb-test.html?nogl wrapper.html?green.png + +== webgl-hanging-fb-test.html wrapper.html?green.png +== webgl-hanging-fb-test.html?aa wrapper.html?green.png +pref(webgl.force-layers-readback,true) == webgl-hanging-fb-test.html?readback wrapper.html?green.png +pref(webgl.force-layers-readback,true) == webgl-hanging-fb-test.html?readback&aa wrapper.html?green.png + +== webgl-hanging-scissor-test.html wrapper.html?green.png +== webgl-hanging-scissor-test.html?aa wrapper.html?green.png +pref(webgl.force-layers-readback,true) == webgl-hanging-scissor-test.html?readback wrapper.html?green.png +pref(webgl.force-layers-readback,true) == webgl-hanging-scissor-test.html?readback&aa wrapper.html?green.png + + +# Check that our experimental prefs still work: + +# 16bpp: +pref(webgl.prefer-16bpp,true) == webgl-color-test.html?16bpp wrapper.html?colors.png +pref(webgl.prefer-16bpp,true) pref(webgl.force-layers-readback,true) == webgl-color-test.html?16bpp&readback wrapper.html?colors.png + +# Force native GL (Windows): +skip-if(!winWidget) pref(webgl.prefer-native-gl,true) == webgl-clear-test.html?native-gl wrapper.html?green.png +skip-if(!winWidget) pref(webgl.prefer-native-gl,true) == webgl-orientation-test.html?native-gl wrapper.html?white-top-left.png +skip-if(!winWidget) pref(webgl.prefer-native-gl,true) == webgl-color-test.html?native-gl wrapper.html?colors.png +skip-if(!winWidget) pref(webgl.prefer-native-gl,true) pref(webgl.prefer-16bpp,true) == webgl-color-test.html?native-gl&16bpp wrapper.html?colors.png diff --git a/content/canvas/test/reftest/webgl-clear-test.html b/content/canvas/test/reftest/webgl-clear-test.html new file mode 100644 index 00000000000..15d049abfd1 --- /dev/null +++ b/content/canvas/test/reftest/webgl-clear-test.html @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + diff --git a/content/canvas/test/reftest/webgl-color-alpha-test.html b/content/canvas/test/reftest/webgl-color-alpha-test.html new file mode 100644 index 00000000000..8ff67ff1d0b --- /dev/null +++ b/content/canvas/test/reftest/webgl-color-alpha-test.html @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + diff --git a/content/canvas/test/reftest/webgl-color-test.html b/content/canvas/test/reftest/webgl-color-test.html new file mode 100644 index 00000000000..2c6ea45bf76 --- /dev/null +++ b/content/canvas/test/reftest/webgl-color-test.html @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + diff --git a/content/canvas/test/reftest/webgl-disable-test.html b/content/canvas/test/reftest/webgl-disable-test.html new file mode 100644 index 00000000000..dc969d463e2 --- /dev/null +++ b/content/canvas/test/reftest/webgl-disable-test.html @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + diff --git a/content/canvas/test/reftest/webgl-hanging-fb-test.html b/content/canvas/test/reftest/webgl-hanging-fb-test.html new file mode 100644 index 00000000000..3e1cb1601c3 --- /dev/null +++ b/content/canvas/test/reftest/webgl-hanging-fb-test.html @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + diff --git a/content/canvas/test/reftest/webgl-hanging-scissor-test.html b/content/canvas/test/reftest/webgl-hanging-scissor-test.html new file mode 100644 index 00000000000..32b14d1e387 --- /dev/null +++ b/content/canvas/test/reftest/webgl-hanging-scissor-test.html @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + diff --git a/content/canvas/test/reftest/webgl-orientation-test.html b/content/canvas/test/reftest/webgl-orientation-test.html new file mode 100644 index 00000000000..21ff2a8ad7b --- /dev/null +++ b/content/canvas/test/reftest/webgl-orientation-test.html @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + diff --git a/content/canvas/test/reftest/webgl-utils.js b/content/canvas/test/reftest/webgl-utils.js new file mode 100644 index 00000000000..fb494eb1d77 --- /dev/null +++ b/content/canvas/test/reftest/webgl-utils.js @@ -0,0 +1,63 @@ +"use strict"; + +function parseArgs() { + var query = window.location.search.substring(1); + + var split = query.split("&"); + + var args = {} + for (var i = 0; i < split.length; i++) { + var pair = split[i].split("="); + + var key = pair[0]; + var value = true; + if (pair.length >= 2) { + eval("value = " + decodeURIComponent(pair[1]) + ";"); + } + + args[key] = value; + } + + return args; +} + +var gArgs = null; +function arg(key) { + if (gArgs === null) { + gArgs = parseArgs(); + } + + var ret = gArgs[key]; + if (ret === undefined) + ret = false; + + return ret; +} + +function initGL(canvas) { + if (arg("nogl")) + return null; + + var gl = null; + + var withAA = arg("aa"); + var withAlpha = arg("alpha"); + var withDepth = arg("depth"); + var withPremult = arg("premult"); + var withPreserve = arg("preserve"); + var withStencil = arg("stencil"); + + try { + var argDict = { + alpha: withAlpha, + depth: withDepth, + stencil: withStencil, + antialias: withAA, + premultipliedAlpha: withPremult, + preserveDrawingBuffer: withPreserve, + }; + gl = canvas.getContext("experimental-webgl", argDict); + } catch(e) {} + + return gl; +} diff --git a/content/canvas/test/reftest/white-top-left.png b/content/canvas/test/reftest/white-top-left.png new file mode 100644 index 0000000000000000000000000000000000000000..224b193a5ec4d4f76d7dfc5bb8fa843336970a5f GIT binary patch literal 1418 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911L)MWvCLlCbx$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&eBK4*bPWHAE+-(e7DJf6QI1t=(0;u=vBoS#-wo>-L15RjOeSEA?V8lq5U ztY@lcXkhTAXd%#~pPnv`Ar*0NFF6V_7zi*K{+Ye+)D62P#xy2tPgb?H4!ib!%D#Tx zPCkb<#y~9N`E|MT>+i8fGxGPa-uk)q_~+H-2g439CpVVWz5V#-RqO`Q4+kO^%#E+M z*-L15RjOeSEA?V8lq5U ztY@lcXkhTAXd%#~7oIMTAr*0NFEaw|dog5VP$fF&b? Mr>mdKI;Vst0IFvTK>z>% literal 0 HcmV?d00001 diff --git a/content/canvas/test/reftest/wrapper.html b/content/canvas/test/reftest/wrapper.html new file mode 100644 index 00000000000..1b59b226c32 --- /dev/null +++ b/content/canvas/test/reftest/wrapper.html @@ -0,0 +1,27 @@ + + + +Image reftest wrapper + + + + + + + + + diff --git a/content/test/reftest/reftest.list b/content/test/reftest/reftest.list index 0b0630fb4f9..f105e4cb4c2 100644 --- a/content/test/reftest/reftest.list +++ b/content/test/reftest/reftest.list @@ -1,3 +1,8 @@ +# Canvas reftests +# From: /content/test/reftest +# To: /content/canvas/test/reftest +include ../../canvas/test/reftest/reftest.list + == bug453105.html bug453105-ref.html == optiontext.html optiontext-ref.html == bug456008.xhtml bug456008-ref.html diff --git a/image/test/reftest/bmp/bmp-corrupted/wrapper.html b/image/test/reftest/bmp/bmp-corrupted/wrapper.html index 5bbe75e01ce..8c7259169e6 100644 --- a/image/test/reftest/bmp/bmp-corrupted/wrapper.html +++ b/image/test/reftest/bmp/bmp-corrupted/wrapper.html @@ -16,7 +16,7 @@