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

Side by Side Diff: LayoutTests/fast/css/content-language-dynamically-added.html

Issue 1090423007: Serialize <string> with double quotes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 5 years, 8 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 <html> 2 <html>
3 <head id="head"> 3 <head id="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 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=76701">bug 76701</a >: 7 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=76701">bug 76701</a >:
8 map http-equiv content-language to -webkit-locale. This particular test tests 8 map http-equiv content-language to -webkit-locale. This particular test tests
9 that a dynamically added content-language is processed. This expectation may 9 that a dynamically added content-language is processed. This expectation may
10 change, see bug. The HTML 5 spec decrees that http-equiv content-language be 10 change, see bug. The HTML 5 spec decrees that http-equiv content-language be
11 processed when it is 11 processed when it is
12 <a href="http://dev.w3.org/html5/spec/Overview.html#insert-an-element-into-a-doc ument">inserted into the document</a>. 12 <a href="http://dev.w3.org/html5/spec/Overview.html#insert-an-element-into-a-doc ument">inserted into the document</a>.
13 In Firefox and IE adding the meta element dynamically doesn't seem to affect 13 In Firefox and IE adding the meta element dynamically doesn't seem to affect
14 the page, but in Firefox the meta content-language displayed in "Page 14 the page, but in Firefox the meta content-language displayed in "Page
15 Information" is affected. 15 Information" is affected.
16 </p> 16 </p>
17 <div id="console"></div> 17 <div id="console"></div>
18 <div id="x"></div> 18 <div id="x"></div>
19 <div id="y" lang="ar"></div> 19 <div id="y" lang="ar"></div>
20 <script> 20 <script>
21 function languageOfNode(id) { 21 function languageOfNode(id) {
22 var element = document.getElementById(id); 22 var element = document.getElementById(id);
23 return window.getComputedStyle(element).webkitLocale; 23 return window.getComputedStyle(element).webkitLocale;
24 } 24 }
25 shouldBeEqualToString("languageOfNode('x')", "auto"); 25 shouldBeEqualToString("languageOfNode('x')", "auto");
26 shouldBeEqualToString("languageOfNode('y')", "'ar'"); 26 shouldBeEqualToString("languageOfNode('y')", '"ar"');
27 27
28 var meta = document.createElement("meta"); 28 var meta = document.createElement("meta");
29 meta.httpEquiv = "content-language"; 29 meta.httpEquiv = "content-language";
30 meta.content = "ja"; 30 meta.content = "ja";
31 document.getElementById("head").appendChild(meta); 31 document.getElementById("head").appendChild(meta);
32 shouldBeEqualToString("languageOfNode('x')", "'ja'"); 32 shouldBeEqualToString("languageOfNode('x')", '"ja"');
33 shouldBeEqualToString("languageOfNode('y')", "'ar'"); 33 shouldBeEqualToString("languageOfNode('y')", '"ar"');
34 </script> 34 </script>
35 </body> 35 </body>
36 </html> 36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698