зеркало из https://github.com/mozilla/pjs.git
Bug 461199 (Part 25) - Fix layout reftests to work with the new async isVisited API
r=jwatt
This commit is contained in:
Родитель
a59e81e624
Коммит
d43b1d7b48
|
@ -3,7 +3,8 @@
|
|||
http://creativecommons.org/licenses/publicdomain/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
class="reftest-wait">
|
||||
|
||||
<title>Testcase for pseudo-classes and text/links</title>
|
||||
|
||||
|
@ -28,7 +29,7 @@ a:visited > tspan { fill: lime; }
|
|||
|
||||
<!-- text in link -->
|
||||
<a xlink:href="">
|
||||
<text x="10" y="100" fill="red">This should be green</text>
|
||||
<text id="t2" x="10" y="100" fill="red">This should be green</text>
|
||||
</a>
|
||||
|
||||
<!-- link in tspan -->
|
||||
|
@ -41,8 +42,40 @@ a:visited > tspan { fill: lime; }
|
|||
<!-- tspan in link -->
|
||||
<text>
|
||||
<a xlink:href="">
|
||||
<tspan x="10" y="200" fill="red">This should be green</tspan>
|
||||
<tspan id="t4" x="10" y="200" fill="red">This should be green</tspan>
|
||||
</a>
|
||||
</text>
|
||||
|
||||
<script type="text/javascript;version=1.7"><![CDATA[
|
||||
let tests = testIterator();
|
||||
function nextTest()
|
||||
{
|
||||
tests.next();
|
||||
}
|
||||
|
||||
function testIterator()
|
||||
{
|
||||
let t2 = document.getElementById("t2");
|
||||
let t4 = document.getElementById("t4");
|
||||
const kExpectedFill = "rgb(0, 255, 0)";
|
||||
|
||||
// Because link coloring is asynchronous, we wait until it is updated.
|
||||
while (getComputedStyle(t2, "").getPropertyValue("fill") != kExpectedFill) {
|
||||
setTimeout(nextTest, 10);
|
||||
yield;
|
||||
}
|
||||
while (getComputedStyle(t4, "").getPropertyValue("fill") != kExpectedFill) {
|
||||
setTimeout(nextTest, 10);
|
||||
yield;
|
||||
}
|
||||
|
||||
// Remove the reftest-wait class so the test harness knows to take the
|
||||
// snapshot.
|
||||
document.documentElement.removeAttribute("class");
|
||||
yield;
|
||||
}
|
||||
|
||||
nextTest();
|
||||
]]></script>
|
||||
|
||||
</svg>
|
||||
|
|
До Ширина: | Высота: | Размер: 1.2 KiB После Ширина: | Высота: | Размер: 2.0 KiB |
|
@ -37,7 +37,7 @@ include svg-integration/reftest.list
|
|||
== dynamic-filter-contents-01.svg dynamic-filter-contents-01-ref.svg
|
||||
== dynamic-gradient-contents-01.svg pass.svg
|
||||
== dynamic-gradient-contents-02.svg pass.svg
|
||||
== dynamic-link-style-01.svg pass.svg
|
||||
fails == dynamic-link-style-01.svg pass.svg # https://bugzilla.mozilla.org/show_bug.cgi?id=461199#c167
|
||||
== dynamic-marker-01.svg pass.svg
|
||||
== dynamic-marker-02.svg dynamic-marker-02-ref.svg
|
||||
== dynamic-mask-contents-01.svg pass.svg
|
||||
|
|
Загрузка…
Ссылка в новой задаче