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

Side by Side Diff: LayoutTests/imported/web-platform-tests/webstorage/storage_string_conversion.html

Issue 1220543007: Import web-platform-tests/webstorage (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>WebStorage Test: Storage only store strings</title>
5 <script src="../../../resources/testharness.js"></script>
6 <script src="../../../resources/testharnessreport.js"></script>
7 </head>
8 <body>
9 <div id="log"></div>
10 <script>
11 ["localStorage", "sessionStorage"].forEach(function(name) {
12 test(function() {
13 assert_true(name in window, name + " exist");
14
15 var storage = window[name];
16 storage.clear();
17
18 assert_equals(storage.length, 0);
19
20 storage.a = null;
21 assert_equals(storage.a, "null");
22 storage.b = 0;
23 assert_equals(storage.b, "0");
24 storage.c = function(){};
25 assert_equals(storage.c, "function (){}");
26
27 storage.setItem('d', null);
28 assert_equals(storage.d, "null");
29 storage.setItem('e', 0);
30 assert_equals(storage.e, "0");
31 storage.setItem('f', function(){});
32 assert_equals(storage.f, "function (){}");
33
34 storage['g'] = null;
35 assert_equals(storage.g, "null");
36 storage['h'] = 0;
37 assert_equals(storage.h, "0");
38 storage['i'] = function(){};
39 assert_equals(storage.f, "function (){}");
40
41 }, name + " only stores strings");
42 });
43
44 </script>
45 </body>
46 </html>
OLDNEW
« no previous file with comments | « LayoutTests/imported/web-platform-tests/webstorage/storage_setitem.html ('k') | LayoutTests/resources/testharnessreport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698