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

Side by Side Diff: LayoutTests/fast/css/invalidation/style-update-with-added-stylesheet.html

Issue 375293002: Node.insertBefore and Node.appendChild do not use custom binding anymore (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Replace assert with condition Created 6 years, 5 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <head> 2 <head>
3 <script src="../../../resources/js-test.js"></script> 3 <script src="../../../resources/js-test.js"></script>
4 <style id="s1">span { color: red}</style> 4 <style id="s1">span { color: red}</style>
5 <style id="s2">span { color: red}</style> 5 <style id="s2">span { color: red}</style>
6 6
7 <style> 7 <style>
8 div { width: 100px } 8 div { width: 100px }
9 .class { width: 200px } 9 .class { width: 200px }
10 </style> 10 </style>
11 </head> 11 </head>
12 <body> 12 <body>
13 <div id="target"> 13 <div id="target">
14 <div id="other"> 14 <div id="other">
15 </div> 15 </div>
16 16
17 <script> 17 <script>
18 description("Test that adding a class then synchronously adding a style sheet pr oduces correct styles. See also crbug.com/346873"); 18 description("Test that adding a class then synchronously adding a style sheet pr oduces correct styles. See also crbug.com/346873");
19 19
20 var target = document.getElementById("target"); 20 var target = document.getElementById("target");
21 target.offsetHeight; 21 target.offsetHeight;
22 22
23 // Set the class, which should schedule an async style recalc to change width to 200px. 23 // Set the class, which should schedule an async style recalc to change width to 200px.
24 target.className = 'class'; 24 target.className = 'class';
25 25
26 var styleElement = document.createElement("style"); 26 var styleElement = document.createElement("style");
27 styleElement.textContent = '#useless {width: 300px}'; 27 styleElement.textContent = '#useless {width: 300px}';
28 // Insert before style sheet s2 in order to trigger style resolver reconstructio n. 28 // Insert before style sheet s2 in order to trigger style resolver reconstructio n.
29 document.getElementById('s2').insertBefore(styleElement); 29 document.getElementById('s2').insertBefore(styleElement, null);
30 30
31 shouldBe("getComputedStyle(target).width", '"200px"'); 31 shouldBe("getComputedStyle(target).width", '"200px"');
32 32
33 </script> 33 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/block/basic/empty-anonymous-block-remove-crash.html ('k') | LayoutTests/fast/dom/Node/fragment-mutation.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698