2 <title>String handling of NULL (U+
0000) characters
</title>
3 <script src=
"../../resources/js-test.js"></script>
5 description("Test that embedded NULL (U+0000) characters don't truncate strings.");
6 window
.jsTestIsAsync
= true;
8 function errorCallback(transaction
, error
)
10 testFailed("Database error code: " + error
.code
+ ", message: " + error
.message
);
13 var string
= "foo\0bar";
18 if (window
.testRunner
)
19 testRunner
.clearAllDatabases();
21 openDatabase("NullCharacterTest", "1.0", "Database for null characters test", 1,
23 db
.readTransaction(function(t
) {
24 t
.executeSql("SELECT ? AS string", [string
], function(t
, data
) {
25 result
= data
.rows
[0].string
;
26 shouldBeEqualToString("result", string
);