summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css-generated-content/pseudo-element-events.html
blob: 75bd82477d39ea717eebaf223490120ed7060aea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>

<script src="../../resources/js-test.js"></script>

<style>
div:before {
  width: 100px;
  content: "";
  display: block;
  -webkit-transition: width 1ms;
}

div {
    padding: 10px;
    -webkit-transition: padding 20ms;
}

.transition {
    padding: 0px;
}

.transition:before {
    width: 10px;
}
</style>

<p>Pseudo elements should not dispatch events.</p>

<div></div>

<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

onload = function() {
    var div = document.querySelector('div');
    div.className = 'transition';
    div.addEventListener('webkitTransitionEnd', function(event) {
        window.event = event;
        shouldBeEqualToString('event.target.tagName', 'DIV');
        if (event.target == div) {
            isSuccessfullyParsed();
            testRunner.notifyDone();
        }
    });
}
</script>