Regression(r188105): Seems to have caused crashes during PLT on some iPads
[WebKit-https.git] / LayoutTests / fast / css / attribute-selector-dynamic.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--book xmlns="http://docbook.org/ns/docbook" xmlns:xhtml="http://www.w3.org/1999/xhtml" version="5.0"--> 
3 <book xmlns="http://docbook.org/ns/docbook" xmlns:xhtml="http://www.w3.org/1999/xhtml" version="5.0">
4     <xhtml:style>
5         test { color: red; display: block }
6         test:before { content: 'FAILED' }
7         *[test="0"] { color: green; }
8         *[test="0"]:before { content: 'PASSED' }
9     </xhtml:style>
10     
11     <xhtml:div id="description">This test checks whether CSS21 attribute selectors are re-evaluated after attribute changes in xml elements.</xhtml:div>
12
13     <test test="1"></test>
14
15     <xhtml:script>
16       
17         function change() {
18             var element = document.getElementsByTagName('test')[0];
19             element.attributes.test.value = 0;
20             if (window.testRunner)
21                 testRunner.notifyDone();
22         }
23       
24         window.onload = function () {
25             if (window.testRunner)
26                 testRunner.waitUntilDone();
27             // Trigger an attribute change after all load processing is done. Doing the change
28             // here immediately does not exhibit the problem.
29             setTimeout("change();", 0);
30         }
31
32     </xhtml:script>
33 </book>