Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
1 <!DOCTYPE html>
2 <title>Test for Bug 922669</title>
3 <script src="/MochiKit/MochiKit.js"></script>
4 <script src="/tests/SimpleTest/SimpleTest.js"></script>
5 <script src="/tests/SimpleTest/EventUtils.js"></script>
6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
8 <style></style>
10 <script>
11 var style = document.querySelector("style");
13 var gValidTests = [
14 "::-moz-progress-bar",
15 "::-moz-progress-bar:hover",
16 "::-moz-progress-bar:active",
17 "::-moz-progress-bar:focus",
18 "::-moz-progress-bar:hover:focus",
19 "#a::-moz-progress-bar:hover",
20 ":hover::-moz-progress-bar"
21 ];
23 var gInvalidTests = [
24 "::foo",
25 "::-moz-progress-bar::-moz-progress-bar",
26 "::-moz-progress-bar::first-line",
27 "::-moz-progress-bar#a",
28 "::-moz-progress-bar:invalid",
29 "::-moz-focus-inner:active"
30 ];
32 gValidTests.forEach(function(aTest) {
33 style.textContent = aTest + "{}";
34 is(style.sheet.cssRules.length, 1, aTest);
35 style.textContent = "";
36 });
38 gInvalidTests.forEach(function(aTest) {
39 style.textContent = aTest + "{}";
40 is(style.sheet.cssRules.length, 0, aTest);
41 style.textContent = "";
42 });
43 </script>