Add tests for CSS Variables.

https://bugs.webkit.org/show_bug.cgi?id=86575

Reviewed by Dimitri Glazkov.

* fast/css/variables/colors-test-expected.html: Added.
* fast/css/variables/colors-test.html: Added.
* fast/css/variables/complex-cycle-expected.html: Added.
* fast/css/variables/complex-cycle.html: Added.
* fast/css/variables/computed-style-expected.html: Added.
* fast/css/variables/computed-style.html: Added.
* fast/css/variables/inherited-values-expected.html: Added.
* fast/css/variables/inherited-values.html: Added.
* fast/css/variables/inline-styles-expected.html: Added.
* fast/css/variables/inline-styles.html: Added.
* fast/css/variables/invalid-shorthand-expected.html: Added.
* fast/css/variables/invalid-shorthand.html: Added.
* fast/css/variables/invalid-variable-value-expected.html: Added.
* fast/css/variables/invalid-variable-value.html: Added.
* fast/css/variables/multi-level-cycle-expected.html: Added.
* fast/css/variables/multi-level-cycle.html: Added.
* fast/css/variables/redefinition-expected.html: Added.
* fast/css/variables/redefinition.html: Added.
* fast/css/variables/shorthand-expected.html: Added.
* fast/css/variables/shorthand.html: Added.
* fast/css/variables/simple-cycle-expected.html: Added.
* fast/css/variables/simple-cycle.html: Added.
* fast/css/variables/undefined-expected.html: Added.
* fast/css/variables/undefined.html: Added.
* fast/css/variables/use-before-defined-expected.html: Added.
* fast/css/variables/use-before-defined.html: Added.
* fast/css/variables/var-inside-shorthand-expected.html: Added.
* fast/css/variables/var-inside-shorthand.html: Added.
* fast/css/variables/variable-chain-expected.html: Added.
* fast/css/variables/variable-chain.html: Added.
* platform/chromium/test_expectations.txt: Skip tests until variables implementation lands.
* platform/efl/test_expectations.txt: Skip tests until variables implementation lands.
* platform/gtk/test_expectations.txt: Skip tests until variables implementation lands.
* platform/mac/test_expectations.txt: Skip tests until variables implementation lands.
* platform/qt/test_expectations.txt: Skip tests until variables implementation lands.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117390 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2cfc5cac
2012-05-16 Luke Macpherson <macpherson@chromium.org>
Add tests for CSS Variables.
https://bugs.webkit.org/show_bug.cgi?id=86575
Reviewed by Dimitri Glazkov.
* fast/css/variables/colors-test-expected.html: Added.
* fast/css/variables/colors-test.html: Added.
* fast/css/variables/complex-cycle-expected.html: Added.
* fast/css/variables/complex-cycle.html: Added.
* fast/css/variables/computed-style-expected.html: Added.
* fast/css/variables/computed-style.html: Added.
* fast/css/variables/inherited-values-expected.html: Added.
* fast/css/variables/inherited-values.html: Added.
* fast/css/variables/inline-styles-expected.html: Added.
* fast/css/variables/inline-styles.html: Added.
* fast/css/variables/invalid-shorthand-expected.html: Added.
* fast/css/variables/invalid-shorthand.html: Added.
* fast/css/variables/invalid-variable-value-expected.html: Added.
* fast/css/variables/invalid-variable-value.html: Added.
* fast/css/variables/multi-level-cycle-expected.html: Added.
* fast/css/variables/multi-level-cycle.html: Added.
* fast/css/variables/redefinition-expected.html: Added.
* fast/css/variables/redefinition.html: Added.
* fast/css/variables/shorthand-expected.html: Added.
* fast/css/variables/shorthand.html: Added.
* fast/css/variables/simple-cycle-expected.html: Added.
* fast/css/variables/simple-cycle.html: Added.
* fast/css/variables/undefined-expected.html: Added.
* fast/css/variables/undefined.html: Added.
* fast/css/variables/use-before-defined-expected.html: Added.
* fast/css/variables/use-before-defined.html: Added.
* fast/css/variables/var-inside-shorthand-expected.html: Added.
* fast/css/variables/var-inside-shorthand.html: Added.
* fast/css/variables/variable-chain-expected.html: Added.
* fast/css/variables/variable-chain.html: Added.
* platform/chromium/test_expectations.txt: Skip tests until variables implementation lands.
* platform/efl/test_expectations.txt: Skip tests until variables implementation lands.
* platform/gtk/test_expectations.txt: Skip tests until variables implementation lands.
* platform/mac/test_expectations.txt: Skip tests until variables implementation lands.
* platform/qt/test_expectations.txt: Skip tests until variables implementation lands.
2012-05-16 MORITA Hajime <morrita@google.com>
Unreviewed, marking failing test.
......
<style>
body {
color: green;
background-color: red;
background-color: rgb(255, 255, 255);
}
</style>
This text should be green on a white background. There should be no red visible.
<style>
body {
-webkit-var-foreground: green;
-webkit-var-background: rgb(255, 255, 255);
color: -webkit-var(foreground);
background-color: red;
background-color: -webkit-var(background);
}
</style>
This text should be green on a white background. There should be no red visible.
This test is successful if it does not result in a crash.
<style>
body {
-webkit-var-a: -webkit-var(f);
-webkit-var-b: -webkit-var(a);
-webkit-var-c: -webkit-var(b);
-webkit-var-d: -webkit-var(c);
-webkit-var-e: -webkit-var(d);
-webkit-var-f: -webkit-var(e);
color: -webkit-var(a);
}
</style>
This test is successful if it does not result in a crash.
<style>
body {
font-weight: bold;
}
</style>
<body>
Test passed - computed font weight is bold
</body>
<style>
body {
-webkit-var-a: bold;
font-weight: normal;
font-weight: -webkit-var(a);
}
</style>
<body>
Test failed - JS did not run
</body>
<script>
var element = document.body;
var weight = window.getComputedStyle(element, null).getPropertyValue("font-weight");
if (weight == "bold")
element.innerHTML = "Test passed - computed font weight is bold";
else
element.innerHTML = "Test failed - computed color is " + weight;
</script>
<style>
div {
color: green;
background-color: rgb(255, 255, 255);
}
</style>
<div>
This text should be green on a white background. There should be no red visible.
</div>
<style>
body {
-webkit-var-foreground: green;
-webkit-var-background: rgb(255, 255, 255);
}
div {
color: -webkit-var(foreground);
background-color: red;
background-color: -webkit-var(background);
}
</style>
<div>
This text should be green on a white background. There should be no red visible.
</div>
<div style="color: green;">
This text should be green on a white background.
</div>
<body style="-webkit-var-a: green;">
<div style="color: -webkit-var(a);">
This text should be green on a white background.
</div>
</body>
<div>
This text should not be surrounded by a border.
</div>
<style>
div {
-webkit-var-a: 10px solid green;
border: 10px -webkit-var(a) blue;
}
</style>
<div>
This text should not be surrounded by a border.
</div>
<style>
div {
-webkit-var-a: green;
-webkit-var-a: 10px;
color: -webkit-var(a);
}
</style>
<div>
This text should be black.
</div>
<div>
<div>
<div>
This test is successful if this text is black, and the test does not result in a crash.
</div>
</div>
</div>
<style>
.a {
-webkit-var-a: -webkit-var(b);
-webkit-var-b: red;
}
.b {
-webkit-var-b: -webkit-var(a);
}
.c {
-webkit-var-c: -webkit-var(a);
color: -webkit-var(c);
}
</style>
<div id="a">
<div id="b">
<div id="c">
This test is successful if this text is black, and the test does not result in a crash.
</div>
</div>
</div>
<div style="color: red;">
This text should be red.
</div>
<div id="a" style="color: green;">
This text should be green.
</div>
<div id="b" style="color: blue;">
This text should be blue.
</div>
<style>
body {
-webkit-var-a: red;
}
#a {
-webkit-var-a: green;
}
#b {
-webkit-var-a: blue;
}
div {
color: -webkit-var(a);
}
</style>
<div>
This text should be red.
</div>
<div id="a">
This text should be green.
</div>
<div id="b">
This text should be blue.
</div>
<style>
div {
border: 10px solid green;
}
</style>
<div>
This text should be surrounded by a green border. There should not be a red border.
</div>
<style>
div {
-webkit-var-myborder: 10px solid green;
border: 10px dashed red;
border: -webkit-var(myborder);
}
</style>
<div>
This text should be surrounded by a green border. There should not be a red border.
</div>
This test is successful if it does not result in a crash.
<style>
body {
-webkit-var-a: -webkit-var(a);
color: -webkit-var(a);
}
</style>
This test is successful if it does not result in a crash.
Test successful if it does not cause a crash.
<style>
body {
border: -webkit-var(myborder);
}
</style>
Test successful if it does not cause a crash.
<style>
div {
color: green;
}
</style>
<div>
This text should be green on a white background. There should be no red visible.
</div>
<style>
div {
color: -webkit-var(a);
-webkit-var-a: -webkit-var(b);
}
body {
-webkit-var-b: -webkit-var(c);
-webkit-var-c: green;
}
</style>
<div>
This text should be green on a white background. There should be no red visible.
</div>
<style>
body {
border: 10px solid green;
}
</style>
This text should be surrounded by a green border. There should be no red visible.
<style>
body {
-webkit-var-MyBorderColor: green;
border: 10px solid red;
border: 10px solid -webkit-var(MyBorderColor);
}
</style>
This text should be surrounded by a green border. There should be no red visible.
<style>
div {
color: green;
}
</style>
<div>
This text should be green on a white background. There should be no red visible.
</div>
<style>
body {
-webkit-var-c: green;
-webkit-var-b: -webkit-var(c);
}
div {
color: red;
-webkit-var-a: -webkit-var(b);
color: -webkit-var(a);
}
</style>
<div>
This text should be green on a white background. There should be no red visible.
</div>
......@@ -149,6 +149,9 @@ BUGWK73528 SKIP : networkinformation = PASS FAIL
// The intent tag is not yet enabled.
BUGGBILLOCK SKIP : webintents/intent-tag.html = FAIL
// CSS Variables are not yet enabled.
BUGWK85580 SKIP : fast/css/variables = PASS FAIL
// -----------------------------------------------------------------
// WONTFIX TESTS
// -----------------------------------------------------------------
......
......@@ -20,6 +20,9 @@ BUGWK83897 SKIP : fast/regions = FAIL
// Exclusions implementation not complete yet.
BUGWK83898 SKIP : fast/exclusions = FAIL
// CSS Variables are not yet enabled.
BUGWK85580 SKIP : fast/css/variables = PASS FAIL
BUGWK83906 : ietestcenter/css3/grid/grid-column-001.htm = IMAGE
BUGWK83907 : ietestcenter/css3/grid/grid-column-002.htm = IMAGE
BUGWK83909 : ietestcenter/css3/grid/grid-column-003.htm = IMAGE
......
......@@ -302,6 +302,9 @@ BUGWK60318 : fast/sub-pixel = FAIL
// Mediastream implementation is not complete yet.
BUGWK79203 SKIP : fast/mediastream = FAIL
// CSS Variables are not yet enabled.
BUGWK85580 SKIP : fast/css/variables = PASS FAIL
//////////////////////////////////////////////////////////////////////////////////////////
// End of Expected failures
//////////////////////////////////////////////////////////////////////////////////////////
......
......@@ -9,6 +9,9 @@ BUGWK76489 : compositing/webgl/webgl-reflection.html = IMAGE
BUGWK76439 DEBUG : fast/dom/shadow/content-element-api.html = TEXT
BUGWK76439 DEBUG : fast/dom/shadow/content-element-outside-shadow.html = TEXT
// CSS Variables are not yet enabled.
BUGWK85580 SKIP : fast/css/variables = PASS FAIL
// Our slow tests, in alphabetical order.
BUGWK57672 : http/tests/local/fileapi/send-sliced-dragged-file.html = TEXT PASS
......
......@@ -75,3 +75,6 @@ BUGWK84167 : fast/css-generated-content/inline-display-types.html = IMAGE+TEXT
BUGWK84167 : fast/css-generated-content/nested-tables-with-before-after-content-crash.html = IMAGE+TEXT
BUGWK84167 : fast/inline-block/001.html = IMAGE+TEXT
BUGWK84167 : tables/mozilla/bugs/bug2479-2.html = IMAGE+TEXT
// CSS Variables are not yet enabled.
BUGWK85580 SKIP : fast/css/variables = PASS FAIL
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment