| OLD | NEW |
| 1 var kSerializedScriptValueVersion = 4; | 1 var kSerializedScriptValueVersion = 5; |
| 2 | 2 |
| 3 function forVersion(version, values) { | 3 function forVersion(version, values) { |
| 4 var versionTag = 0xff; | 4 var versionTag = 0xff; |
| 5 var versionPrefix = [ (version << 8) | versionTag ]; | 5 var versionPrefix = [ (version << 8) | versionTag ]; |
| 6 | 6 |
| 7 return versionPrefix.concat(values) | 7 return versionPrefix.concat(values) |
| 8 } | 8 } |
| 9 | 9 |
| 10 function expectBufferValue(bytesPerElement, expectedValues, buffer) { | 10 function expectBufferValue(bytesPerElement, expectedValues, buffer) { |
| 11 expectedBufferValues = expectedValues; | 11 expectedBufferValues = expectedValues; |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 self.fileObj1 = new File(['The', ' contents'], 'testfile.txt', {type: 'text/
plain', lastModified: 0}); | 158 self.fileObj1 = new File(['The', ' contents'], 'testfile.txt', {type: 'text/
plain', lastModified: 0}); |
| 159 self.fileObj2 = internals.deserializeBuffer(internals.serializeObject(self.f
ileObj1)); | 159 self.fileObj2 = internals.deserializeBuffer(internals.serializeObject(self.f
ileObj1)); |
| 160 shouldBeTrue("areValuesIdentical(fileObj1, fileObj2)"); | 160 shouldBeTrue("areValuesIdentical(fileObj1, fileObj2)"); |
| 161 self.dictionaryWithFile1 = {file: fileObj1, string: 'stringValue'}; | 161 self.dictionaryWithFile1 = {file: fileObj1, string: 'stringValue'}; |
| 162 self.dictionaryWithFile2 = internals.deserializeBuffer(internals.serializeOb
ject(dictionaryWithFile1)); | 162 self.dictionaryWithFile2 = internals.deserializeBuffer(internals.serializeOb
ject(dictionaryWithFile1)); |
| 163 shouldBeTrue("areValuesIdentical(dictionaryWithFile1, dictionaryWithFile2)")
; | 163 shouldBeTrue("areValuesIdentical(dictionaryWithFile1, dictionaryWithFile2)")
; |
| 164 | 164 |
| 165 // Read and compare actual contents. | 165 // Read and compare actual contents. |
| 166 checkIfSameContent(self.fileObj1, self.fileObj2, finishJSTest); | 166 checkIfSameContent(self.fileObj1, self.fileObj2, finishJSTest); |
| 167 } | 167 } |
| OLD | NEW |