layout/style/test/test_pseudoelement_parsing.html

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

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

mercurial