| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- Submitted from TestTWF Paris --> | 2 <!-- Submitted from TestTWF Paris --> |
| 3 <meta charset=utf-8"> | 3 <meta charset=utf-8"> |
| 4 <title>Invalid key</title> | 4 <title>Invalid key</title> |
| 5 <link rel=help href="http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#
key-construct"> | 5 <link rel=help href="http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#
key-construct"> |
| 6 <link rel=assert title="A value is said to be a valid key if it is one of the fo
llowing types: Array JavaScript objects [ECMA-262], DOMString [WEBIDL], Date [EC
MA-262] or float [WEBIDL]. However Arrays are only valid keys if every item in t
he array is defined and is a valid key (i.e. sparse arrays can not be valid keys
) and if the Array doesn't directly or indirectly contain itself. Any non-numeri
c properties are ignored, and thus does not affect whether the Array is a valid
key. Additionally, if the value is of type float, it is only a valid key if it i
s not NaN, and if the value is of type Date it is only a valid key if its [[Prim
itiveValue]] internal property, as defined by [ECMA-262], is not NaN. Conforming
user agents must support all valid keys as keys."> | 6 <link rel=assert title="A value is said to be a valid key if it is one of the fo
llowing types: Array JavaScript objects [ECMA-262], DOMString [WEBIDL], Date [EC
MA-262] or float [WEBIDL]. However Arrays are only valid keys if every item in t
he array is defined and is a valid key (i.e. sparse arrays can not be valid keys
) and if the Array doesn't directly or indirectly contain itself. Any non-numeri
c properties are ignored, and thus does not affect whether the Array is a valid
key. Additionally, if the value is of type float, it is only a valid key if it i
s not NaN, and if the value is of type Date it is only a valid key if its [[Prim
itiveValue]] internal property, as defined by [ECMA-262], is not NaN. Conforming
user agents must support all valid keys as keys."> |
| 7 <!-- original author --> | 7 <!-- original author --> |
| 8 <link rel=author href="mailto:odinho@opera.com" title="Odin Hørthe Omdal"> | 8 <link rel=author href="mailto:odinho@opera.com" title="Odin Hørthe Omdal"> |
| 9 <!-- some additions by Baptiste Fontaine (batifon@yahoo.fr) --> | 9 <!-- some additions by Baptiste Fontaine (batifon@yahoo.fr) --> |
| 10 <script src=../../../resources/testharness.js></script> | 10 <script src=/resources/testharness.js></script> |
| 11 <script src=../../../resources/testharnessreport.js></script> | 11 <script src=/resources/testharnessreport.js></script> |
| 12 <script src=support.js></script> | 12 <script src=support.js></script> |
| 13 | 13 |
| 14 <script> | 14 <script> |
| 15 var db = createdb_for_multiple_tests(), | 15 var db = createdb_for_multiple_tests(), |
| 16 // cache for ObjectStores | 16 // cache for ObjectStores |
| 17 objStore = null, | 17 objStore = null, |
| 18 objStore2 = null; | 18 objStore2 = null; |
| 19 | 19 |
| 20 function is_cloneable(o) { | 20 function is_cloneable(o) { |
| 21 try { | 21 try { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 var recursive2 = []; | 120 var recursive2 = []; |
| 121 recursive2.push([recursive2]); | 121 recursive2.push([recursive2]); |
| 122 invalid_key('array indirectly contains self', recursive2); | 122 invalid_key('array indirectly contains self', recursive2); |
| 123 | 123 |
| 124 var recursive3 = [recursive]; | 124 var recursive3 = [recursive]; |
| 125 invalid_key('array member contains self', recursive3); | 125 invalid_key('array member contains self', recursive3); |
| 126 | 126 |
| 127 </script> | 127 </script> |
| 128 | 128 |
| 129 <div id=log></div> | 129 <div id=log></div> |
| OLD | NEW |