mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix tests broken by default text color change.
R=abarth@chromium.org, ianh@google.com Review URL: https://codereview.chromium.org/1215023003.
This commit is contained in:
parent
2894f9e7e9
commit
5b8c62476d
@ -1,9 +0,0 @@
|
||||
layer at (0,0) size 800x600
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
RenderFlexibleBox {sky} at (0,0) size 800x238
|
||||
RenderParagraph {p} at (0,0) size 800x38
|
||||
RenderText {#text} at (0,0) size 778x38
|
||||
text run at (0,0) width 778: "Test passes if the image below shows nested green, blue and yellow squares with a dotted black"
|
||||
text run at (0,19) width 59: "border."
|
||||
RenderFlexibleBox {div} at (0,38) size 200x200 [border: (25px dotted #000000)]
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
<sky>
|
||||
<import src="../resources/dump-as-render-tree.sky" />
|
||||
<style>
|
||||
div {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 25px;
|
||||
border: 25px dotted;
|
||||
/* TODO(ojan): background-image appears to be broken. */
|
||||
background-image: linear-gradient(top, yellow, yellow), linear-gradient(top, blue, blue), -linear-gradient(top, green, green);
|
||||
background-clip: content-box, padding-box, border-box;
|
||||
}
|
||||
</style>
|
||||
<!-- TODO(ojan): Make this a reftest once we support them. -->
|
||||
<p>Test passes if the image below shows nested green, blue and yellow squares with a dotted black border.</p>
|
||||
<div></div>
|
||||
</sky>
|
||||
@ -1,14 +0,0 @@
|
||||
<import src="../resources/run-after-display.sky" />
|
||||
<img src="http://storage.googleapis.com/mojo/sky-pngs/77c37e9285340992042008792e29c861306cdc9e" />
|
||||
<script>
|
||||
import "dart:sky";
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
void main() {
|
||||
window.addEventListener('load', (_) {
|
||||
runAfterDisplay(() {
|
||||
internals.notifyTestComplete("");
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@ -1,28 +0,0 @@
|
||||
<import src="../resources/run-after-display.sky" />
|
||||
|
||||
<style>
|
||||
transformer {
|
||||
transform: translateY(-500px);
|
||||
}
|
||||
child {
|
||||
opacity: 0.5;
|
||||
background-image: linear-gradient(green, yellow);
|
||||
height: 1900px;
|
||||
}
|
||||
</style>
|
||||
<transformer>
|
||||
<child />
|
||||
</transformer>
|
||||
|
||||
<script>
|
||||
import "dart:sky";
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
void main() {
|
||||
window.addEventListener('load', (_) {
|
||||
runAfterDisplay(() {
|
||||
internals.notifyTestComplete("");
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@ -1,4 +1,9 @@
|
||||
<foo>
|
||||
<style>
|
||||
foo {
|
||||
background-color: black;
|
||||
}
|
||||
</style>
|
||||
<import src="../resources/run-after-display.sky" />
|
||||
This is a mismatch reftest.
|
||||
<script>
|
||||
|
||||
@ -1,4 +1,9 @@
|
||||
<foo>
|
||||
<style>
|
||||
foo {
|
||||
background-color: black;
|
||||
}
|
||||
</style>
|
||||
<import src="../resources/run-after-display.sky" />
|
||||
<p>This is a mismatch reftest. Should not match.</p>
|
||||
<script>
|
||||
|
||||
@ -1,21 +0,0 @@
|
||||
layer at (0,0) size 800x600
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
RenderFlexibleBox {sky} at (0,0) size 800x438
|
||||
RenderParagraph {p} at (0,0) size 800x194
|
||||
RenderText {#text} at (0,175) size 81x19
|
||||
text run at (0,175) width 81: "This is an "
|
||||
RenderText {#text} at (420,175) size 77x19
|
||||
text run at (420,175) width 77: " element."
|
||||
RenderParagraph {p} at (0,194) size 800x200
|
||||
RenderText {#text} at (0,0) size 99x19
|
||||
text run at (0,0) width 99: "Placeholder."
|
||||
RenderParagraph {p} at (0,394) size 800x44
|
||||
RenderText {#text} at (0,25) size 223x19
|
||||
text run at (0,25) width 223: "Small iframe should render "
|
||||
RenderText {#text} at (522,25) size 82x19
|
||||
text run at (522,25) width 82: " correctly."
|
||||
layer at (81,0) size 340x190
|
||||
RenderReplaced {iframe} at (80.67,0) size 340x190 [border: (20px solid #000000)]
|
||||
layer at (223,394) size 300x40
|
||||
RenderReplaced {iframe} at (222.81,0) size 300x40
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
<sky>
|
||||
<import src="../resources/dump-as-render-tree.sky"/>
|
||||
<iframe id="removeMe" src="text.sky">Should not render</iframe>
|
||||
<p>This is an <iframe style="border-style: solid; border-width: 20px" src="abarth.sky">iframe</iframe> element.</p>
|
||||
<p style="height: 200px">Placeholder.</p>
|
||||
<p>Small iframe should render <iframe style="height: 40px" src="abarth.sky">iframe</iframe> correctly.</p>
|
||||
|
||||
<script>
|
||||
import "dart:sky";
|
||||
|
||||
void main() {
|
||||
document.getElementById("removeMe").remove();
|
||||
}
|
||||
</script>
|
||||
</sky>
|
||||
@ -1,7 +0,0 @@
|
||||
CONSOLE: unittest-suite-wait-for-done
|
||||
CONSOLE: PASS: should allow sheets to apply when they match
|
||||
CONSOLE: PASS: should cause sheets to be skipped when they do not match
|
||||
CONSOLE:
|
||||
CONSOLE: All 2 tests passed.
|
||||
CONSOLE: unittest-suite-success
|
||||
DONE
|
||||
@ -1,34 +0,0 @@
|
||||
<html>
|
||||
|
||||
<style media="(max-width: 0px)">
|
||||
#test { color: rgb(255, 0, 0); }
|
||||
</style>
|
||||
<div id="does-not-match">Should not be red.</div>
|
||||
|
||||
<style media="(max-width: 10000px)">
|
||||
#matches { color: rgb(255, 0, 0); }
|
||||
</style>
|
||||
|
||||
<div id="matches">Should be red.</div>
|
||||
|
||||
<script>
|
||||
import "../resources/third_party/unittest/unittest.dart";
|
||||
import "../resources/unit.dart";
|
||||
|
||||
import "dart:sky";
|
||||
|
||||
void main() {
|
||||
initUnit();
|
||||
|
||||
test('should allow sheets to apply when they match', () {
|
||||
var element = document.getElementById('matches');
|
||||
expect(window.getComputedStyle(element)["color"], equals("rgb(255, 0, 0)"));
|
||||
});
|
||||
|
||||
test('should cause sheets to be skipped when they do not match', () {
|
||||
var element = document.getElementById('does-not-match');
|
||||
expect(window.getComputedStyle(element)["color"], equals("rgb(0, 0, 0)"));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user