зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1288761 part 2 - Add perf reftest for bidi resolution. r=jfkthame,rwood
MozReview-Commit-ID: 12GXuPuvDHa --HG-- extra : rebase_source : cf06beaeb4f2bfedb0088871fce68e7b289d55a4
This commit is contained in:
Родитель
1eff6830a6
Коммит
c0f60ed5b9
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html style="overflow-y: scroll">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script src="util.js"></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
const TEST_WORD = "iqwdzx zzaعظأkvcg rvde";
|
||||
let div = document.getElementById("test");
|
||||
|
||||
div.textContent = TEST_WORD;
|
||||
flush_layout();
|
||||
|
||||
perf_start();
|
||||
div.textContent = build_text(TEST_WORD, 30, 800);
|
||||
flush_layout(div);
|
||||
perf_finish();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="test" style="white-space: normal"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -13,3 +13,5 @@
|
|||
% http://localhost/tests/perf-reftest-singletons/tiny-traversal-singleton.html
|
||||
% http://localhost/tests/perf-reftest-singletons/nth-index-1.html
|
||||
% http://localhost/tests/perf-reftest-singletons/nth-index-2.html
|
||||
|
||||
% http://localhost/tests/perf-reftest-singletons/bidi-resolution-1.html
|
||||
|
|
|
@ -34,10 +34,21 @@ function build_rule(selector, selectorRepeat, declaration, ruleRepeat) {
|
|||
return s;
|
||||
}
|
||||
|
||||
function build_text(word, wordRepeat, paraRepeat) {
|
||||
wordRepeat = wordRepeat || 1;
|
||||
paraRepeat = paraRepeat || 1;
|
||||
let para = Array(wordRepeat).fill(word).join(" ");
|
||||
return Array(paraRepeat).fill(para).join("\n");
|
||||
}
|
||||
|
||||
function flush_style(element) {
|
||||
getComputedStyle(element || document.documentElement).color;
|
||||
}
|
||||
|
||||
function flush_layout(element) {
|
||||
(element || document.documentElement).offsetHeight;
|
||||
}
|
||||
|
||||
function perf_start() {
|
||||
if (perf_data.start !== null) {
|
||||
throw "already started timing!";
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html style="overflow-y: scroll">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script src="util.js"></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
const TEST_WORD = "iqwdzx zzaعظأkvcg rvde";
|
||||
let div = document.getElementById("test");
|
||||
|
||||
div.textContent = TEST_WORD;
|
||||
flush_layout();
|
||||
|
||||
perf_start();
|
||||
div.textContent = build_text(TEST_WORD, 30, 800);
|
||||
flush_layout(div);
|
||||
perf_finish();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="test" style="white-space: pre-line"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html style="overflow-y: scroll">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script src="util.js"></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
const TEST_WORD = "iqwdzx zzaعظأkvcg rvde";
|
||||
let div = document.getElementById("test");
|
||||
|
||||
div.textContent = TEST_WORD;
|
||||
flush_layout();
|
||||
|
||||
perf_start();
|
||||
div.textContent = build_text(TEST_WORD, 30, 800);
|
||||
flush_layout(div);
|
||||
perf_finish();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="test" style="white-space: normal"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -18,3 +18,5 @@
|
|||
& http://localhost/tests/perf-reftest/style-attr-1.html, http://localhost/tests/perf-reftest/style-attr-1-ref.html
|
||||
& http://localhost/tests/perf-reftest/stop-cascade-1.html, http://localhost/tests/perf-reftest/stop-cascade-ref.html
|
||||
& http://localhost/tests/perf-reftest/stop-cascade-2.html, http://localhost/tests/perf-reftest/stop-cascade-ref.html
|
||||
|
||||
& http://localhost/tests/perf-reftest/bidi-resolution-1.html, http://localhost/tests/perf-reftest/bidi-resolution-1-ref.html
|
||||
|
|
|
@ -34,10 +34,21 @@ function build_rule(selector, selectorRepeat, declaration, ruleRepeat) {
|
|||
return s;
|
||||
}
|
||||
|
||||
function build_text(word, wordRepeat, paraRepeat) {
|
||||
wordRepeat = wordRepeat || 1;
|
||||
paraRepeat = paraRepeat || 1;
|
||||
let para = Array(wordRepeat).fill(word).join(" ");
|
||||
return Array(paraRepeat).fill(para).join("\n");
|
||||
}
|
||||
|
||||
function flush_style(element) {
|
||||
getComputedStyle(element || document.documentElement).color;
|
||||
}
|
||||
|
||||
function flush_layout(element) {
|
||||
(element || document.documentElement).offsetHeight;
|
||||
}
|
||||
|
||||
function perf_start() {
|
||||
if (perf_data.start !== null) {
|
||||
throw "already started timing!";
|
||||
|
|
Загрузка…
Ссылка в новой задаче