• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Test some corner case DOM Storage values.
2
3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6Testing sessionStorage
7storage.clear()
8PASS storage.length is 0
9
10PASS typeof storage['foo'] is "undefined"
11PASS storage['foo'] is undefined.
12PASS typeof storage.foo is "undefined"
13PASS storage.foo is undefined.
14PASS typeof storage.getItem('foo') is "object"
15PASS storage.getItem('foo') is null
16
17storage.foo1 = null
18PASS typeof storage['foo1'] is "string"
19PASS storage['foo1'] is "null"
20PASS typeof storage.foo1 is "string"
21PASS storage.foo1 is "null"
22PASS typeof storage.getItem('foo1') is "string"
23PASS storage.getItem('foo1') is "null"
24storage['foo2'] = null
25PASS typeof storage['foo2'] is "string"
26PASS storage['foo2'] is "null"
27PASS typeof storage.foo2 is "string"
28PASS storage.foo2 is "null"
29PASS typeof storage.getItem('foo2') is "string"
30PASS storage.getItem('foo2') is "null"
31storage.setItem('foo3', null)
32PASS typeof storage['foo3'] is "string"
33PASS storage['foo3'] is "null"
34PASS typeof storage.foo3 is "string"
35PASS storage.foo3 is "null"
36PASS typeof storage.getItem('foo3') is "string"
37PASS storage.getItem('foo3') is "null"
38
39storage.foo4 = undefined
40PASS typeof storage['foo4'] is "string"
41PASS storage['foo4'] is "undefined"
42PASS typeof storage.foo4 is "string"
43PASS storage.foo4 is "undefined"
44PASS typeof storage.getItem('foo4') is "string"
45PASS storage.getItem('foo4') is "undefined"
46storage['foo5'] = undefined
47PASS typeof storage['foo5'] is "string"
48PASS storage['foo5'] is "undefined"
49PASS typeof storage.foo5 is "string"
50PASS storage.foo5 is "undefined"
51PASS typeof storage.getItem('foo5') is "string"
52PASS storage.getItem('foo5') is "undefined"
53storage.setItem('foo6', undefined)
54PASS typeof storage['foo6'] is "string"
55PASS storage['foo6'] is "undefined"
56PASS typeof storage.foo6 is "string"
57PASS storage.foo6 is "undefined"
58PASS typeof storage.getItem('foo6') is "string"
59PASS storage.getItem('foo6') is "undefined"
60
61storage.foo7 = 2
62PASS typeof storage['foo7'] is "string"
63PASS storage['foo7'] is "2"
64PASS typeof storage.foo7 is "string"
65PASS storage.foo7 is "2"
66PASS typeof storage.getItem('foo7') is "string"
67PASS storage.getItem('foo7') is "2"
68storage['foo8'] = 2
69PASS typeof storage['foo8'] is "string"
70PASS storage['foo8'] is "2"
71PASS typeof storage.foo8 is "string"
72PASS storage.foo8 is "2"
73PASS typeof storage.getItem('foo8') is "string"
74PASS storage.getItem('foo8') is "2"
75storage.setItem('foo9', 2)
76PASS typeof storage['foo9'] is "string"
77PASS storage['foo9'] is "2"
78PASS typeof storage.foo9 is "string"
79PASS storage.foo9 is "2"
80PASS typeof storage.getItem('foo9') is "string"
81PASS storage.getItem('foo9') is "2"
82
83storage.foo10 = k
84PASS typeof storage['foo10'] is "string"
85PASS storage['foo10'] is "ÿ찡\0hello"
86PASS typeof storage.foo10 is "string"
87PASS storage.foo10 is "ÿ찡\0hello"
88PASS typeof storage.getItem('foo10') is "string"
89PASS storage.getItem('foo10') is "ÿ찡\0hello"
90storage['foo11'] = k
91PASS typeof storage['foo11'] is "string"
92PASS storage['foo11'] is "ÿ찡\0hello"
93PASS typeof storage.foo11 is "string"
94PASS storage.foo11 is "ÿ찡\0hello"
95PASS typeof storage.getItem('foo11') is "string"
96PASS storage.getItem('foo11') is "ÿ찡\0hello"
97storage.setItem('foo12', k)
98PASS typeof storage['foo12'] is "string"
99PASS storage['foo12'] is "ÿ찡\0hello"
100PASS typeof storage.foo12 is "string"
101PASS storage.foo12 is "ÿ찡\0hello"
102PASS typeof storage.getItem('foo12') is "string"
103PASS storage.getItem('foo12') is "ÿ찡\0hello"
104
105
106Testing localStorage
107storage.clear()
108PASS storage.length is 0
109
110PASS typeof storage['foo'] is "undefined"
111PASS storage['foo'] is undefined.
112PASS typeof storage.foo is "undefined"
113PASS storage.foo is undefined.
114PASS typeof storage.getItem('foo') is "object"
115PASS storage.getItem('foo') is null
116
117storage.foo1 = null
118PASS typeof storage['foo1'] is "string"
119PASS storage['foo1'] is "null"
120PASS typeof storage.foo1 is "string"
121PASS storage.foo1 is "null"
122PASS typeof storage.getItem('foo1') is "string"
123PASS storage.getItem('foo1') is "null"
124storage['foo2'] = null
125PASS typeof storage['foo2'] is "string"
126PASS storage['foo2'] is "null"
127PASS typeof storage.foo2 is "string"
128PASS storage.foo2 is "null"
129PASS typeof storage.getItem('foo2') is "string"
130PASS storage.getItem('foo2') is "null"
131storage.setItem('foo3', null)
132PASS typeof storage['foo3'] is "string"
133PASS storage['foo3'] is "null"
134PASS typeof storage.foo3 is "string"
135PASS storage.foo3 is "null"
136PASS typeof storage.getItem('foo3') is "string"
137PASS storage.getItem('foo3') is "null"
138
139storage.foo4 = undefined
140PASS typeof storage['foo4'] is "string"
141PASS storage['foo4'] is "undefined"
142PASS typeof storage.foo4 is "string"
143PASS storage.foo4 is "undefined"
144PASS typeof storage.getItem('foo4') is "string"
145PASS storage.getItem('foo4') is "undefined"
146storage['foo5'] = undefined
147PASS typeof storage['foo5'] is "string"
148PASS storage['foo5'] is "undefined"
149PASS typeof storage.foo5 is "string"
150PASS storage.foo5 is "undefined"
151PASS typeof storage.getItem('foo5') is "string"
152PASS storage.getItem('foo5') is "undefined"
153storage.setItem('foo6', undefined)
154PASS typeof storage['foo6'] is "string"
155PASS storage['foo6'] is "undefined"
156PASS typeof storage.foo6 is "string"
157PASS storage.foo6 is "undefined"
158PASS typeof storage.getItem('foo6') is "string"
159PASS storage.getItem('foo6') is "undefined"
160
161storage.foo7 = 2
162PASS typeof storage['foo7'] is "string"
163PASS storage['foo7'] is "2"
164PASS typeof storage.foo7 is "string"
165PASS storage.foo7 is "2"
166PASS typeof storage.getItem('foo7') is "string"
167PASS storage.getItem('foo7') is "2"
168storage['foo8'] = 2
169PASS typeof storage['foo8'] is "string"
170PASS storage['foo8'] is "2"
171PASS typeof storage.foo8 is "string"
172PASS storage.foo8 is "2"
173PASS typeof storage.getItem('foo8') is "string"
174PASS storage.getItem('foo8') is "2"
175storage.setItem('foo9', 2)
176PASS typeof storage['foo9'] is "string"
177PASS storage['foo9'] is "2"
178PASS typeof storage.foo9 is "string"
179PASS storage.foo9 is "2"
180PASS typeof storage.getItem('foo9') is "string"
181PASS storage.getItem('foo9') is "2"
182
183storage.foo10 = k
184PASS typeof storage['foo10'] is "string"
185PASS storage['foo10'] is "ÿ찡\0hello"
186PASS typeof storage.foo10 is "string"
187PASS storage.foo10 is "ÿ찡\0hello"
188PASS typeof storage.getItem('foo10') is "string"
189PASS storage.getItem('foo10') is "ÿ찡\0hello"
190storage['foo11'] = k
191PASS typeof storage['foo11'] is "string"
192PASS storage['foo11'] is "ÿ찡\0hello"
193PASS typeof storage.foo11 is "string"
194PASS storage.foo11 is "ÿ찡\0hello"
195PASS typeof storage.getItem('foo11') is "string"
196PASS storage.getItem('foo11') is "ÿ찡\0hello"
197storage.setItem('foo12', k)
198PASS typeof storage['foo12'] is "string"
199PASS storage['foo12'] is "ÿ찡\0hello"
200PASS typeof storage.foo12 is "string"
201PASS storage.foo12 is "ÿ찡\0hello"
202PASS typeof storage.getItem('foo12') is "string"
203PASS storage.getItem('foo12') is "ÿ찡\0hello"
204PASS successfullyParsed is true
205
206TEST COMPLETE
207
208