diff --git a/js/generic.js b/js/generic.js index 5c46c0d7..2cab1885 100644 --- a/js/generic.js +++ b/js/generic.js @@ -397,7 +397,7 @@ const get_isVer = () => new Promise(resolve => { } isVer = verNo if (verNo < 102) {isVerExtra = " or lower" - } else if (verNo == 119) {isVerExtra = "+"} + } else if (verNo == 120) {isVerExtra = "+"} log_perf(SECTG, "isVer", t0, "", isVer + isVerExtra) return resolve() } @@ -405,6 +405,7 @@ const get_isVer = () => new Promise(resolve => { function cascade() { try { + if ("function" === typeof CSSPropertyRule) return 120 // 1854937 try {location.href = "http://a>b/"} catch(e) {if (e.name === "SyntaxError") return 119} // 1817591 if (CSS2Properties.prototype.hasOwnProperty("fontSynthesisPosition")) return 118 // 1849010 if (CanvasRenderingContext2D.prototype.hasOwnProperty("fontStretch")) return 117 // 1842467 diff --git a/tests/testgeneric.js b/tests/testgeneric.js index cd734a53..83445462 100644 --- a/tests/testgeneric.js +++ b/tests/testgeneric.js @@ -338,8 +338,12 @@ const get_isTB = () => new Promise(resolve => { // extensions can block resources:// // FF ~5ms, TB ~20ms setTimeout(() => resolve(false), 100) + + let source = "resource://torbutton-assets/aboutTor.css" + // ToDo: TB13+: does not work on android + if (CanvasRenderingContext2D.prototype.hasOwnProperty("letterSpacing")) {source = "chrome://browser/content/abouttor/aboutTor.css"} // FF115+ let css = document.createElement("link") - css.href = "resource://torbutton-assets/aboutTor.css" + css.href = source css.type = "text/css" css.rel = "stylesheet" document.head.appendChild(css) @@ -379,7 +383,8 @@ const get_isVer = () => new Promise(resolve => { output(cascade()) function cascade() { - isVerMax = 119 + isVerMax = 120 + if ("function" === typeof CSSPropertyRule) return 120 // 1854937 try {location.href = "http://a>b/"} catch(e) {if (e.name === "SyntaxError") return 119} // 1817591 if ("function" === typeof CSS2Properties && CSS2Properties.prototype.hasOwnProperty("fontSynthesisPosition")) return 118 // 1849010 if (CanvasRenderingContext2D.prototype.hasOwnProperty("fontStretch")) return 117 // 1842467 diff --git a/tests/versions.html b/tests/versions.html index a598c5c7..6c779e91 100644 --- a/tests/versions.html +++ b/tests/versions.html @@ -208,7 +208,7 @@ if (debug.length) {dom.debug.innerHTML = debug.join("
")} } - let countTZP = 0, expectTZP = 70, maxVer = 119, oTZP = {}, oResults = {} + let countTZP = 0, expectTZP = 71, maxVer = 120, oTZP = {}, oResults = {} function run_tzp() { // start global timer gTZP = performance.now() @@ -277,12 +277,16 @@ offsetPosition : layout.css.motion-path-offset-position.enabled */ + // 120: 1854937 + let t120 = performance.now() + let ver120 = ("function" === typeof CSSPropertyRule) + rec(120, 120, "1854937", ver120, performance.now()-t120) + // 119: 1817591 let t119 = performance.now() try { location.href = "http://a>b/" } catch(e) { - debug.push("119 1817591 : "+ e.name) rec(119, 119, "1817591", e.name === "SyntaxError", performance.now()-t119) }