blob: c35c5164d8325543665b8ee9572d18cccfe87538 (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
<html>
<head>
<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script>
<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script>
<link rel="stylesheet" type="text/css" href="resources/keyframes.css"></link>
<script type="text/javascript">
function test()
{
InspectorTest.sendCommandOrDie("DOM.enable", {});
InspectorTest.sendCommandOrDie("CSS.enable", {}, onCSSEnabled);
function onCSSEnabled()
{
InspectorTest.sendCommandOrDie("DOM.getDocument", {}, onDocumentId);
}
function onDocumentId(result)
{
documentNodeId = result.root.nodeId;
InspectorTest.requestNodeId(documentNodeId, "#element", onNodeId);
}
function onNodeId(nodeId)
{
InspectorTest.loadAndDumpCSSAnimationsForNode(nodeId, InspectorTest.completeTest.bind(InspectorTest));
}
}
</script>
<style>
#element {
animation: animName 1s 2s, mediaAnim 2s, doesNotExist 3s, styleSheetAnim 0s;
}
@keyframes animName {
from {
width: 100px;
}
10% {
width: 150px;
}
100% {
width: 200px;
}
}
@media (min-width: 1px) {
@keyframes mediaAnim {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
}
</style>
</head>
<body onload="runTest()">
<div id="element"></div>
</body>
</html>
|