diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /layout/style/test/test_bug413958.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/style/test/test_bug413958.html')
-rw-r--r-- | layout/style/test/test_bug413958.html | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/layout/style/test/test_bug413958.html b/layout/style/test/test_bug413958.html new file mode 100644 index 000000000..273e4466e --- /dev/null +++ b/layout/style/test/test_bug413958.html @@ -0,0 +1,78 @@ +<!doctype html> +<html> +<!-- +https://bugzilla.mozilla.org/show_bug.cgi?id=413958 +--> +<head> + <title>Test for Bug 413958</title> + <meta charset="UTF-8"> + <script src="/tests/SimpleTest/SimpleTest.js"></script> + <link rel="stylesheet" href="/tests/SimpleTest/test.css"> +</head> +<body> +<style>span { color: red }</style><!-- backstop --> +<p><a target="_blank" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=413958" + >Mozilla Bug 413958</a>. All text below should be black on white.</p> +<p>Sheet: <span id="s1">1</span> + <span id="s2">2</span> + <span id="s3">3</span>. + Style attr: <span id="setStyle">4</span>. + Properties: <span id="setStyleProp" style="">5</span>.</p> +<script> +var tests = [ + function() { + var s = document.createTextNode( +"#s1{nosuchprop:auto; color:black}\n"+ +"#s2{nosuchprop:auto; color:black}invalid?sel{}#s3{color:black}"), + e = document.createElement("style"); + e.appendChild(s); + document.body.appendChild(e); + }, + function() { + document.getElementById("setStyle") + .setAttribute("style", "width:200;color:black"); + }, + function() { + var s = document.getElementById("setStyleProp").style; + s.width = "200"; + s.color = "black"; + }, +]; +var results = [ + [ { errorMessage: /Unknown property \u2018nosuchprop\u2019/, + lineNumber: 1, columnNumber: 14, + sourceLine: "#s1{nosuchprop:auto; color:black}" }, + { errorMessage: /Unknown property \u2018nosuchprop\u2019/, + lineNumber: 2, columnNumber: 14, sourceLine: + "#s2{nosuchprop:auto; color:black}invalid?sel{}#s3{color:black}" }, + { errorMessage: /Ruleset ignored due to bad selector/, + lineNumber: 2, columnNumber: 40, sourceLine: + "#s2{nosuchprop:auto; color:black}invalid?sel{}#s3{color:black}" } ], + [ { errorMessage: /parsing value for \u2018width\u2019/, + lineNumber: 0, columnNumber: 6, + sourceLine: "width:200;color:black" } ], + [ { errorMessage: /parsing value for \u2018width\u2019/, + lineNumber: 0, columnNumber: 0, + sourceLine: "200" } ], +]; +var curTest = -1; + +function doTest() { + if (++curTest == tests.length) { + var ss = document.getElementsByTagName("span"); + for (var i = 0; i < ss.length; i++) { + is(window.getComputedStyle(ss[i], "").color, "rgb(0, 0, 0)", + "recovery | " + ss[i].id); + } + SimpleTest.finish(); + } else { + SimpleTest.expectConsoleMessages(tests[curTest], results[curTest], doTest); + } +} + +SimpleTest.waitForExplicitFinish(); +doTest(); +</script> +</body> +</html> |