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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/setting-style-attribute-update-inline-style.html

Issue 1384973004: Forward assigning to style on HTMLElement, SVGElement and CSSStyleRule to style.cssText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4
5 <style>
6 body {
7 font-size: 16px;
8 }
9 </style>
10
11 <div id="div0" style="background-color: red"></div>
12 <div id="div1" style="background-color: red"></div>
13 <div id="div2" style="background-color: red"></div>
14 <div id="div3"></div>
15 <svg id="svg0" style="background-color: red"></svg>
16
17 <script>
18 div0.style = '';
19 div1.style = 'color:green';
20 div2.style = 'color:green; font-size:30px';
21 div3.style = 'color:green';
22
23 document.styleSheets[0].cssRules[0].style = 'font-size:30px';
24
25 svg0.style = '';
26
27 test(function() {
28 assert_equals(div0.style.backgroundColor, "");
29
30 assert_equals(div1.style.backgroundColor, "");
31 assert_equals(div1.style.color, "green");
32
33 assert_equals(div2.style.backgroundColor, "");
34 assert_equals(div2.style.color, "green");
35 assert_equals(div2.style.fontSize, "30px");
36
37 assert_equals(div3.style.color, "green");
38
39 }, 'Assigning to HTMLElement.style updates the style declaration');
40
41 test(function() {
42 assert_equals(svg0.style.backgroundColor, "");
43 }, 'Assigning to SVGElement.style updates the style declaration');
44
45 test(function() {
46 assert_equals(document.styleSheets[0].cssRules[0].style.cssText, "font-size: 3 0px;");
47 }, 'Assigning to CSSStyleRule.style updates the style declaration');
48
49 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698