Index: LayoutTests/fast/css/scroll-blocks-on-parsing.html |
diff --git a/LayoutTests/fast/css/scroll-blocks-on-parsing.html b/LayoutTests/fast/css/scroll-blocks-on-parsing.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d5d17425b4f7f529d9584127b6de5592c8c26188 |
--- /dev/null |
+++ b/LayoutTests/fast/css/scroll-blocks-on-parsing.html |
@@ -0,0 +1,42 @@ |
+<!DOCTYPE HTML> |
+<script src="../../resources/js-test.js"></script> |
+<style> |
+/* |
+ Give some rules below something to override in order to test |
+ that they really are being parsed |
+*/ |
+.defwheel { |
+ scroll-blocks-on: wheel-event; |
+} |
+</style> |
+<div class="test" id="default" expected="none"></div> |
+<div class="test defwheel" id="stylesheet-wheel" expected="wheel-event"></div> |
+<div class="test defwheel" id="explicit-none" style="scroll-blocks-on: none;" expected="none"></div> |
+<div class="test" id="explicit-start-touch" style="scroll-blocks-on: start-touch;" expected="start-touch"></div> |
+<div class="test" id="explicit-wheel-event" style="scroll-blocks-on: wheel-event;" expected="wheel-event"></div> |
+<div class="test" id="explicit-scroll-event" style="scroll-blocks-on: scroll-event;" expected="scroll-event"></div> |
+<div class="test" id="explicit-all" style="scroll-blocks-on: start-touch wheel-event scroll-event;" expected="start-touch wheel-event scroll-event"></div> |
+<div class="test" id="explicit-touch-wheel" style="scroll-blocks-on: start-touch wheel-event;" expected="start-touch wheel-event"></div> |
+<div class="test" id="explicit-invalid-bogus" style="scroll-blocks-on: bogus;" expected="none"></div> |
+<div class="test" id="explicit-invalid-combination" style="scroll-blocks-on: wheel-event none;" expected="none"></div> |
+<div class="test defwheel" id="explicit-invalid-override" style="scroll-blocks-on: none start-touch;" expected="wheel-event"></div> |
+<div class="test" id="explicit-invalid-duplicate" style="scroll-blocks-on: start-touch start-touch;" expected="none"></div> |
+<div class="test" id="explicit-invalid-bogus-list" style="scroll-blocks-on: wheel-event bogus scroll-event;" expected="none"></div> |
+<div style="scroll-blocks-on: wheel-event;"> |
+ <div class="test" id="not-inherited" expected="none"></div> |
+ <div class="test" id="inherit" style="scroll-blocks-on: inherit;" expected="wheel-event"></div> |
+</div> |
+<div class="test defwheel" id="initial" style="scroll-blocks-on: initial;" expected="none"></div> |
+ |
+<script> |
+description("Test the parsing and application of the scroll-blocks-on property."); |
+ |
+var tests = document.querySelectorAll('.test'); |
+var style; |
+for (var i = 0; i < tests.length; i++) { |
+ debug('Test case: ' + tests[i].id); |
+ style = window.getComputedStyle(tests[i]); |
+ shouldBeEqualToString('style.scrollBlocksOn', tests[i].attributes.expected.value); |
+ debug(''); |
+} |
+</script> |