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

Side by Side Diff: third_party/WebKit/LayoutTests/storage/websql/open-database-utf8-name.html

Issue 2634473002: [websql] Filenames are utf-8, not latin1. (Closed)
Patch Set: final changes? Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/storage/websql/open-database-utf8-name-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
(Empty)
1 <html>
2 <head>
3 <meta charset="utf-8"/>
4 <script>
5 function log(message)
6 {
7 document.getElementById("console").innerHTML += message + "<br>";
8 }
9
10 function finishTest()
11 {
12 if (window.testRunner)
13 testRunner.notifyDone();
14 }
15
16 function runTest()
17 {
18 if (window.testRunner) {
19 testRunner.clearAllDatabases();
20 testRunner.dumpAsText();
21 testRunner.waitUntilDone();
22 }
23
24 var transactionsRun = 0;
25
26 // Open database with non-ASCII name.
27 var db = openDatabase("¥£€$", "1.0", "utf8 db test", 1024 * 1024);
28 if (!db) {
29 log("Database creation failed");
30 finishTest();
31 return
32 }
33 log("Database creation succeeded");
34
35 db.transaction(function(t) {
36 t.executeSql("DROP TABLE IF EXISTS t");
37 t.executeSql("CREATE TABLE t (id INTEGER PRIMARY KEY, v TEXT)");
38 t.executeSql("INSERT INTO t VALUES (1, 'hello')");
39 t.executeSql("INSERT INTO t VALUES (2, 'world')");
40 }, function(e) {
41 log("Update transaction failed: " + e.message);
42 finishTest();
43 }, function() {
44 log("Update transaction succeeded");
45 db.transaction(function(t) {
46 t.executeSql("SELECT * FROM t ORDER BY id", [], function (t, r) {
47 if (r.rows.length != 2) {
48 log("Wrong number of rows returned");
49 finishTest();
50 } else if (r.rows.item(0).id != 1) {
51 log("Unexpected row 0.id");
52 finishTest();
53 } else if (r.rows.item(0).v != 'hello') {
54 log("Unexpected row 0.v");
55 finishTest();
56 } else if (r.rows.item(1).id != 2) {
57 log("Unexpected row 1.id");
58 finishTest();
59 } else if (r.rows.item(1).v != 'world') {
60 log("Unexpected row 1.v");
61 finishTest();
62 }
63 });
64 }, function(e) {
65 log("Read transaction failed: " + e.message);
66 finishTest();
67 }, function() {
68 log("Read transaction succeeded");
69 finishTest();
70 });
71 });
72 }
73
74 </script>
75 </head>
76
77 <body onload="runTest()">
78 Test openDatabase() with name outside the ASCII set.
79 <pre id="console">
80 </pre>
81 </body>
82
83 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/storage/websql/open-database-utf8-name-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698