Video is not started even if play button has been pressed.
[framework/web/webkit-efl.git] / LayoutTests / fast / layers / script-tests / negative-scroll-positions.js
1 description(
2 "This tests that negative scrollTop and scrollLeft values are clamped to zero."
3 );
4
5 var scroller = document.createElement('div');
6 scroller.id = 'scroller';
7 scroller.style.overflow = 'scroll';
8 scroller.style.width = '200px';
9 scroller.style.height = '200px';
10
11 var contents = document.createElement('div');
12 contents.style.width = '400px';
13 contents.style.height = '400px';
14
15 scroller.appendChild(contents);
16 document.body.appendChild(scroller);
17
18 function attemptScroll(x, y)
19 {
20   scroller.scrollTop = x;
21   scroller.scrollLeft = y;
22   return scroller.scrollTop + ',' + scroller.scrollLeft;
23 }
24
25 shouldBe("attemptScroll(0, 0)", "'0,0'");
26 shouldBe("attemptScroll(50, 50)", "'50,50'");
27 shouldBe("attemptScroll(-50, -50)", "'0,0'");