Video is not started even if play button has been pressed.
[framework/web/webkit-efl.git] / LayoutTests / fast / events / selectstart-on-selectall.html
1 <!DOCTYPE html>
2 <html>
3 <body onselectstart="handler(event)">
4 <p>This test ensures selectstart event fires when selecting all.</p>
5 <script>
6
7 if (window.testRunner) {
8     testRunner.dumpAsText();
9     testRunner.dumpEditingCallbacks();
10 }
11
12 var targetWasBody = true;
13 var handlerCount = 0;
14 var listenerCount = 0;
15
16 function handler(event) {
17     if (event.target != document.body)
18         targetWasBody = false;
19     handlerCount++;
20 }
21
22 document.body.addEventListener('selectstart', function (event) {
23     if (event.target != document.body)
24         targetWasBody = false;
25     listenerCount++;
26 });
27
28 document.execCommand('SelectAll', false, null);
29
30 if (handlerCount != 1)
31     document.writeln("FAIL: selectionstart's event handler was called " + handlerCount + ' times');
32 else if (listenerCount != 1)
33     document.writeln("FAIL: selectionstart's event listener was called " + listenerCount + ' times');
34 else if (!targetWasBody)
35     document.writeln("FAIL: target node wasn't body");
36 else if (window.getSelection().toString() != document.body.innerText)
37     document.writeln("FAIL: some contents on document was not selected");
38 else
39     document.writeln("PASS");
40
41 </script>
42 </body>
43 </html>