Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: LayoutTests/fast/dom/custom/unresolved-pseudoclass.html

Issue 14626005: Upgrade elements that are created before a custom element definition is registered (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moar^2 better Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <style> 2 <style>
3 x-x { 3 x-x {
4 color: rgb(0, 222, 0); 4 color: rgb(0, 222, 0);
5 } 5 }
6 6
7 [is=x-y]:not(:unresolved) { 7 [is=x-y]:not(:unresolved) {
8 color: rgb(0, 111, 0); 8 color: rgb(0, 111, 0);
9 } 9 }
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 var b = document.querySelector('#b'); 30 var b = document.querySelector('#b');
31 shouldBe('window.getComputedStyle(b).color', '"rgb(0, 0, 222)"'); 31 shouldBe('window.getComputedStyle(b).color', '"rgb(0, 0, 222)"');
32 shouldBe('window.getComputedStyle(b).borderColor', '"rgb(0, 0, 111)"'); 32 shouldBe('window.getComputedStyle(b).borderColor', '"rgb(0, 0, 111)"');
33 33
34 var X = document.webkitRegister('x-x', {prototype: Object.create(HTMLElement.pro totype)}); 34 var X = document.webkitRegister('x-x', {prototype: Object.create(HTMLElement.pro totype)});
35 var c = new X(); 35 var c = new X();
36 document.body.insertBefore(c, b); 36 document.body.insertBefore(c, b);
37 shouldBe('window.getComputedStyle(c).color', '"rgb(0, 222, 0)"'); 37 shouldBe('window.getComputedStyle(c).color', '"rgb(0, 222, 0)"');
38 38
39 // Registering x-x should have changed the styles of #a.
40 shouldBe('window.getComputedStyle(a).color', '"rgb(0, 222, 0)"');
41
39 var Y = document.webkitRegister('x-y', {prototype: Object.create(HTMLSpanElement .prototype)}); 42 var Y = document.webkitRegister('x-y', {prototype: Object.create(HTMLSpanElement .prototype)});
40 var d = new Y(); 43 var d = new Y();
41 document.body.insertBefore(d, b); 44 document.body.insertBefore(d, b);
42 shouldBe('window.getComputedStyle(d).color', '"rgb(0, 111, 0)"'); 45 shouldBe('window.getComputedStyle(d).color', '"rgb(0, 111, 0)"');
43 46
44 // FIXME: When upgrade is implemented check that a and b's styles have changed. 47 // Registering is="x-y" should have changed the styles of #b.
48 shouldBe('window.getComputedStyle(b).color', '"rgb(0, 111, 0)"');
45 49
46 successfullyParsed = true; 50 successfullyParsed = true;
47 </script> 51 </script>
48 <script src="../../js/resources/js-test-post.js"></script> 52 <script src="../../js/resources/js-test-post.js"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698