Make pseudo-classes-02 run using test_visited_reftests.html instead of the normal reftest harness. (Bug 147777) r=jwatt

This commit is contained in:
L. David Baron 2010-04-02 18:58:27 -07:00
Родитель 8468f0a0b1
Коммит 98bbe9a494
5 изменённых файлов: 17 добавлений и 44 удалений

Просмотреть файл

@ -8,15 +8,15 @@
<title>Reference for pseudo-classes and text/links</title>
<!-- link in text -->
<text x="10" y="50" fill="lime" font-size="2em">This should be green</text>
<text x="10" y="25" fill="lime" font-size="1em">This should be green</text>
<!-- text in link -->
<text x="10" y="100" fill="lime" font-size="2em">This should be green</text>
<text x="10" y="50" fill="lime" font-size="1em">This should be green</text>
<!-- link in tspan -->
<text x="10" y="150" fill="lime" font-size="2em">This should be green</text>
<text x="10" y="75" fill="lime" font-size="1em">This should be green</text>
<!-- tspan in link -->
<text x="10" y="200" fill="lime" font-size="2em">This should be green</text>
<text x="10" y="100" fill="lime" font-size="1em">This should be green</text>
</svg>

До

Ширина:  |  Высота:  |  Размер: 708 B

После

Ширина:  |  Высота:  |  Размер: 706 B

Просмотреть файл

@ -3,8 +3,7 @@
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink"
class="reftest-wait">
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Testcase for pseudo-classes and text/links</title>
@ -13,7 +12,7 @@
<style type="text/css">
<![CDATA[
:root { font-size: 2em; }
:root { font-size: 1em; }
text > a:link { fill: lime; }
a:visited > text { fill: lime; }
tspan > a:link { fill: lime; }
@ -23,18 +22,18 @@ a:visited > tspan { fill: lime; }
</style>
<!-- link in text -->
<text x="10" y="50">
<text x="10" y="25">
<a xlink:href="do-not-visit-me.xxx" fill="red">This should be green</a>
</text>
<!-- text in link -->
<a xlink:href="">
<text id="t2" x="10" y="100" fill="red">This should be green</text>
<text x="10" y="50" fill="red">This should be green</text>
</a>
<!-- link in tspan -->
<text>
<tspan x="10" y="150">
<tspan x="10" y="75">
<a xlink:href="do-not-visit-me.xxx" fill="red">This should be green</a>
</tspan>
</text>
@ -42,40 +41,8 @@ a:visited > tspan { fill: lime; }
<!-- tspan in link -->
<text>
<a xlink:href="">
<tspan id="t4" x="10" y="200" fill="red">This should be green</tspan>
<tspan x="10" y="100" 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>

До

Ширина:  |  Высота:  |  Размер: 2.0 KiB

После

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Просмотреть файл

@ -119,7 +119,10 @@ fails == inline-in-xul-basic-01.xul pass.svg
== pattern-live-01b.svg pattern-live-01-ref.svg
== pattern-live-01c.svg pattern-live-01-ref.svg
== pseudo-classes-01.svg pass.svg
== pseudo-classes-02.svg pseudo-classes-02-ref.svg
# This test depends on :visited styles (which are asynchronous), so we run
# it in layout/style/test/test_visited_reftests.html instead of using the
# reftest harness.
# == pseudo-classes-02.svg pseudo-classes-02-ref.svg
== radialGradient-basic-01.svg pass.svg
== radialGradient-basic-02.svg pass.svg
== radialGradient-basic-03.svg radialGradient-basic-03-ref.svg

Просмотреть файл

@ -208,6 +208,8 @@ _TEST_FILES = test_acid3_test46.html \
_VISITED_REFTEST_FILES = \
$(shell find $(topsrcdir)/layout/reftests/css-visited/ -name '*.html' -o -name '*.xhtml') \
$(topsrcdir)/layout/reftests/svg/pseudo-classes-02.svg \
$(topsrcdir)/layout/reftests/svg/pseudo-classes-02-ref.svg \
$(NULL)
_BROWSER_FILES = \

Просмотреть файл

@ -32,6 +32,7 @@ var gTests = [
// snapshotted in the same way. The REFERENCE (second file) is
// assumed to be complete when loaded, but we poll for visited link
// coloring on the TEST (first file) until the test passes.
"== pseudo-classes-02.svg pseudo-classes-02-ref.svg",
"!= color-on-link-1-ref.html color-on-visited-1-ref.html",
"== color-on-link-1.html color-on-link-1-ref.html",
"== color-on-link-before-1.html color-on-link-1-ref.html",