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

Side by Side Diff: LayoutTests/http/tests/misc/extract-http-content-language-malformed.php

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 <?php 1 <?php
2 header("Content-Language: ,es"); 2 header("Content-Language: ,es");
3 ?> 3 ?>
4 <!DOCTYPE html> 4 <!DOCTYPE html>
5 <html xmlns="http://www.w3.org/1999/xhtml"> 5 <html xmlns="http://www.w3.org/1999/xhtml">
6 <head> 6 <head>
7 <script src="../../js-test-resources/js-test.js"></script> 7 <script src="../../js-test-resources/js-test.js"></script>
8 </head> 8 </head>
9 <body> 9 <body>
10 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=97929">bug 97929</a >: 10 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=97929">bug 97929</a >:
11 Extract HTTP Content-Language header.</p> 11 Extract HTTP Content-Language header.</p>
12 <div id="console"></div> 12 <div id="console"></div>
13 <div id="x"></div> 13 <div id="x"></div>
14 <div id="y" lang="ar"></div> 14 <div id="y" lang="ar"></div>
15 <script> 15 <script>
16 debug('==> Value extracted from malformed HTTP "Content-Language" header...'); 16 debug('==> Value extracted from malformed HTTP "Content-Language" header...');
17 // A malformed header may be fixed by the browser ("es") or left bad and so re main unset ("auto"). 17 // A malformed header may be fixed by the browser ("es") or left bad and so re main unset ("auto").
18 // Chrome does the former; Safari does the latter. 18 // Chrome does the former; Safari does the latter.
19 shouldBeTrue('window.getComputedStyle(document.getElementById("x")).webkitLoca le == "\'es\'" || window.getComputedStyle(document.getElementById("x")).webkitLo cale == "auto"') 19 shouldBeTrue('window.getComputedStyle(document.getElementById("x")).webkitLoca le == \'"es"\' || window.getComputedStyle(document.getElementById("x")).webkitLo cale == "auto"')
20 debug('==> Value set by div "lang" tag...'); 20 debug('==> Value set by div "lang" tag...');
21 shouldBe('window.getComputedStyle(document.getElementById("y")).webkitLocale', '"\'ar\'"') 21 shouldBe('window.getComputedStyle(document.getElementById("y")).webkitLocale', "'\"ar\"'")
22 debug('==> All done...'); 22 debug('==> All done...');
23 </script> 23 </script>
24 </body> 24 </body>
25 </html> 25 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698