Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / custom / unresolved-pseudoclass.html
blobdab422ff1c5509707dfbc2dbab043616e0f12d55
1 <!DOCTYPE html>
2 <style>
3 x-x {
4 color: rgb(0, 222, 0);
7 [is=x-y]:not(:unresolved) {
8 color: rgb(0, 111, 0);
11 :unresolved {
12 color: rgb(0, 0, 222);
15 [is=x-y]:unresolved {
16 border-color: rgb(0, 0, 111);
18 </style>
19 <script src="../../../resources/js-test.js"></script>
20 <div id="container"></div>
21 <x-x id="a"></x-x>
22 <span id="b" is="x-y"></span>
23 <script>
24 description('Tests the :unresolved pseudoclass.');
26 var a = document.querySelector('#a');
27 shouldBe('document.querySelector("x-x:unresolved")', 'a');
28 shouldBe('window.getComputedStyle(a).color', '"rgb(0, 0, 222)"');
30 var b = document.querySelector('#b');
31 shouldBe('window.getComputedStyle(b).color', '"rgb(0, 0, 222)"');
32 shouldBe('window.getComputedStyle(b).borderColor', '"rgb(0, 0, 111)"');
34 var X = document.registerElement('x-x', {prototype: Object.create(HTMLElement.prototype)});
35 var c = new X();
36 document.body.insertBefore(c, b);
37 shouldBe('window.getComputedStyle(c).color', '"rgb(0, 222, 0)"');
39 // Registering x-x should have changed the styles of #a.
40 shouldBe('window.getComputedStyle(a).color', '"rgb(0, 222, 0)"');
42 var Y = document.registerElement('x-y', {extends: 'span', prototype: Object.create(HTMLSpanElement.prototype)});
43 var d = new Y();
44 document.body.insertBefore(d, b);
45 shouldBe('window.getComputedStyle(d).color', '"rgb(0, 111, 0)"');
47 // Registering is="x-y" should have changed the styles of #b.
48 shouldBe('window.getComputedStyle(b).color', '"rgb(0, 111, 0)"');
50 successfullyParsed = true;
51 </script>