Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / webgl / webgl-context-attributes-default-value.html
blob966f21955c1b94556381996ca2ed90070a6dbf85
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 <script src="resources/webgl-test.js"></script>
6 <script>
8 var defaultAttributes = {
9 alpha : true,
10 depth : true,
11 stencil : false,
12 // FIXME: context.getContextAttributes().antialias is always false on
13 // content shell with --run-layout-test option. See http://crbug.com/375682
14 // antialias : true,
15 premultipliedAlpha : true,
16 preserveDrawingBuffer : false,
17 failIfMajorPerformanceCaveat : false,
20 var falseAttributes = {
21 alpha : false,
22 depth : false,
23 stencil : false,
24 // FIXME: context.getContextAttributes().antialias is always false on
25 // content shell with --run-layout-test option. See http://crbug.com/375682
26 // antialias : true,
27 premultipliedAlpha : false,
28 preserveDrawingBuffer : false,
29 failIfMajorPerformanceCaveat : false,
32 function testAttributes(expectedAttributes, checkValue) {
34 if (arguments.length != 1 && arguments.length != 2)
35 return;
37 var canvas = document.createElement("canvas");
38 var initialAttributes = {};
39 var isUndefinedOrNull = arguments.length == 2 &&
40 (checkValue == undefined || checkValue == null);
42 if (isUndefinedOrNull)
43 for (key in expectedAttributes)
44 initialAttributes[key] = checkValue;
46 var context = create3DContext(canvas, initialAttributes);
48 window.actualContextAttributes = context.getContextAttributes();
50 for (key in expectedAttributes)
51 shouldBe("actualContextAttributes." + key,
52 expectedAttributes[key].toString());
55 </script>
56 </head>
57 <body>
58 <script>
60 debug("Testing default value:");
61 testAttributes(defaultAttributes);
62 debug("")
64 debug("Testing undefined value:");
65 testAttributes(defaultAttributes, undefined);
66 debug("")
68 debug("Testing null value:");
69 testAttributes(falseAttributes, null);
70 debug("")
72 </script>
73 </body>