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

Side by Side Diff: LayoutTests/imported/web-platform-tests/encoding/gbk-encoder.html

Issue 727883002: update-w3c-deps import using blink 7f8c8ee3e30dc15b7b821c627fc7ac32331d2253: (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!doctype html>
2 <meta charset=gbk> <!-- if the server overrides this, it is stupid, as this is a testsuite -->
3 <script src=../../../resources/testharness.js></script>
4 <script src=../../../resources/testharnessreport.js></script>
5 <div id=log></div>
6 <script>
7 function encode(input, output, desc) {
8 test(function() {
9 var a = document.createElement("a") // <a> uses document encoding for URL's query
10 a.href = "https://example.com/?" + input
11 assert_equals(a.search.substr(1), output) // remove leading "?"
12 }, "gbk encoder: " + desc)
13 }
14
15 encode("s", "s", "very basic")
16 encode("\u20AC", "%80", "Euro")
17 encode("\u4E02", "%81@", "character")
18 encode("\uE4C6", "%A1@", "PUA")
19 encode("\uE4C5", "%FE%FE", "PUA #2")
20 encode("\ud83d\udca9", "%26%23128169%3B", "poo")
21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698