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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Attr/update-attribute-node-no-crash.html

Issue 1747403002: Make Document.createAttribute lowercase the name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/Attr/update-attribute-node-no-crash-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <iframe></iframe> 7 <iframe></iframe>
8 <div id="test" style="background-color: red"></div> 8 <div id="test" style="background-color: red"></div>
9 <script> 9 <script>
10 description("Updating value of replaced attribute node"); 10 description("Updating value of replaced attribute node");
11 var element = document.getElementById("test"); 11 var element = document.getElementById("test");
12 var attr = document.createAttribute("STYLE"); 12 var attr = document.createAttribute("STYLE");
13 // This aligns with Trident rather than Gecko. 13 // This aligns with Trident rather than Gecko.
14 shouldBeEqualToString("replaced = element.setAttributeNode(attr); replaced.name" , "STYLE"); 14 shouldBeEqualToString("replaced = element.setAttributeNode(attr); replaced.name" , "style");
15 shouldBeEqualToString("replaced.value", "background-color: red"); 15 shouldBeEqualToString("replaced.value", "background-color: red");
16 shouldBeEqualToString("attr.name", "STYLE"); 16 shouldBeEqualToString("attr.name", "style");
17 shouldBeEqualToString("attr.value", ""); 17 shouldBeEqualToString("attr.value", "");
18 shouldBeEqualToString("element.getAttribute('style')", ""); 18 shouldBeEqualToString("element.getAttribute('style')", "");
19 shouldBeEqualToString("element.getAttribute('StyLE')", ""); 19 shouldBeEqualToString("element.getAttribute('StyLE')", "");
20 // Setting the value must correctly locate attribute on the element and update i t, 20 // Setting the value must correctly locate attribute on the element and update i t,
21 // even if the local name differs. PASS if no crash (crbug.com/376718) 21 // even if the local name differs. PASS if no crash (crbug.com/376718)
22 shouldBeEqualToString("attr.value = 'background-color: green'; attr.value", "bac kground-color: green"); 22 shouldBeEqualToString("attr.value = 'background-color: green'; attr.value", "bac kground-color: green");
23 shouldBeEqualToString("element.getAttribute('stylE')", "background-color: green" ); 23 shouldBeEqualToString("element.getAttribute('stylE')", "background-color: green" );
24 </script> 24 </script>
25 </body> 25 </body>
26 </html> 26 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/Attr/update-attribute-node-no-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698