Bug 1839315: part 4) Link from `SheetLoadData::mWasAlternate` to spec. r=emilio DONTBUILD
[gecko.git] / layout / style / test / test_background_blend_mode.html
blob23551ebda938f7029e8c79b6487f1e47ce7b26ab
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Test for miscellaneous computed style issues</title>
5 <script src="/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
7 </head>
8 <body>
9 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
10 <p id="display"></p>
11 <div id="content" style="display: none">
13 </div>
14 <pre id="test">
15 <script type="application/javascript">
17 /** Test for miscellaneous computed style issues **/
19 var frame_container = document.getElementById("display");
20 var noframe_container = document.getElementById("content");
22 function test_bug_841601() {
23 // Test handling of background-blend-mode
24 var p = document.createElement("p");
25 var cs = getComputedStyle(p, "");
27 frame_container.appendChild(p);
28 is(cs.backgroundBlendMode, "normal",
29 "default value of background-blend-mode");
31 p.setAttribute("style", "background-blend-mode: normal, invalid");
32 cs = getComputedStyle(p, "");
33 is(cs.backgroundBlendMode, "normal",
34 "set invalid blendmode");
36 p.setAttribute("style", "background-blend-mode: normal, normal");
37 cs = getComputedStyle(p, "");
38 is(cs.backgroundBlendMode, "normal, normal",
39 "set normal blendmode twice");
41 p.setAttribute("style", "background-blend-mode: normal, multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, hue, saturation, color, luminosity");
42 cs = getComputedStyle(p, "");
43 is(cs.backgroundBlendMode, "normal, multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, hue, saturation, color, luminosity",
44 "set all blendmodes");
46 p.remove();
48 SimpleTest.finish();
51 SimpleTest.waitForExplicitFinish();
52 test_bug_841601();
54 </script>
55 </pre>
56 </body>
57 </html>