| 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 <meta name="timeout" content="long"> | 4 <meta name="timeout" content="long"> |
| 5 <title>Valid key</title> | 5 <title>Valid key</title> |
| 6 <link rel=help href="http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#
key-construct"> | 6 <link rel=help href="http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#
key-construct"> |
| 7 <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 <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."> |
| 8 <link rel=author href="mailto:batifon@yahoo.fr" title="Baptiste Fontaine"> | 8 <link rel=author href="mailto:batifon@yahoo.fr" title="Baptiste Fontaine"> |
| 9 <script src=../../../resources/testharness.js></script> | 9 <script src=/resources/testharness.js></script> |
| 10 <script src=../../../resources/testharnessreport.js></script> | 10 <script src=/resources/testharnessreport.js></script> |
| 11 <script src=support.js></script> | 11 <script src=support.js></script> |
| 12 | 12 |
| 13 <script> | 13 <script> |
| 14 function valid_key(desc, key) { | 14 function valid_key(desc, key) { |
| 15 var db; | 15 var db; |
| 16 var t = async_test(document.title + " - " + desc); | 16 var t = async_test(document.title + " - " + desc); |
| 17 var open_rq = createdb(t); | 17 var open_rq = createdb(t); |
| 18 | 18 |
| 19 open_rq.onupgradeneeded = function(e) { | 19 open_rq.onupgradeneeded = function(e) { |
| 20 db = e.target.result; | 20 db = e.target.result; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 valid_key( '"\\n"' , "\n" ); | 66 valid_key( '"\\n"' , "\n" ); |
| 67 valid_key( '""' , "" ); | 67 valid_key( '""' , "" ); |
| 68 valid_key( '"\\""' , "\"" ); | 68 valid_key( '"\\""' , "\"" ); |
| 69 valid_key( '"\\u1234"' , "\u1234" ); | 69 valid_key( '"\\u1234"' , "\u1234" ); |
| 70 valid_key( '"\\u0000"' , "\u0000" ); | 70 valid_key( '"\\u0000"' , "\u0000" ); |
| 71 valid_key( '"NaN"' , "NaN" ); | 71 valid_key( '"NaN"' , "NaN" ); |
| 72 | 72 |
| 73 </script> | 73 </script> |
| 74 | 74 |
| 75 <div id=log></div> | 75 <div id=log></div> |
| OLD | NEW |