Chromium Code Reviews| Index: LayoutTests/fast/svg/different-overflow-values.html |
| diff --git a/LayoutTests/fast/svg/different-overflow-values.html b/LayoutTests/fast/svg/different-overflow-values.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..80cf7d62a78ace112431caf533e4d7a1d5736b62 |
| --- /dev/null |
| +++ b/LayoutTests/fast/svg/different-overflow-values.html |
| @@ -0,0 +1,40 @@ |
| +<!DOCTYPE html> |
| +<html> |
| + <head> |
|
esprehn
2014/04/12 06:22:47
We often leave off the <html>, <head> and <body>.
|
| + <script src="../../resources/js-test.js"></script> |
| + <script type="text/javascript" charset="utf-8"> |
|
esprehn
2014/04/12 06:22:47
Leave off type and charset.
|
| + if (window.testRunner) |
| + testRunner.dumpAsText(); |
|
esprehn
2014/04/12 06:22:47
You don't need this, js-test.js does this.
|
| + |
| + function shouldBeEqual(a, b) |
|
esprehn
2014/04/12 06:22:47
js-test has this already.
|
| + { |
| + if (a == b) |
| + testPassed("Overflow values are the same."); |
| + else |
| + testFailed("Overflow values should be the same. overflow-x: " + a + ", overflow-y: " + b + "."); |
| + } |
| + |
| + function test() |
|
esprehn
2014/04/12 06:22:47
onload = function() {
|
| + { |
| + description("This test checks the overflow equality in case of SVG.") |
| + |
| + var cases = document.getElementsByClassName("case"); |
|
esprehn
2014/04/12 06:22:47
Use querySelector
|
| + for (var i = 0; i < cases.length; ++i) { |
| + var computedStyle = getComputedStyle(cases[i]); |
|
esprehn
2014/04/12 06:22:47
remove var
|
| + var overflowX = computedStyle.getPropertyValue("overflow-x"); |
| + var overflowY = computedStyle.getPropertyValue("overflow-y"); |
|
esprehn
2014/04/12 06:22:47
remove this.
|
| + |
| + shouldBeEqual(overflowX, overflowY); |
|
esprehn
2014/04/12 06:22:47
shouldBe("computedStyle.getPropertyValue('overflow
|
| + } |
| + } |
| + </script> |
| + </head> |
| + <body> |
| + <svg class="case"/> |
| + <svg class="case" style="overflow-x: auto"/> |
| + <svg class="case" style="overflow-x: visible; overflow-y: hidden"/> |
| + <script> |
| + test(); |
|
esprehn
2014/04/12 06:22:47
remove
|
| + </script> |
| + </body> |
| +</html> |