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

Side by Side Diff: LayoutTests/fast/storage/resources/serialized-script-value.js

Issue 195543002: [webcrypto] Implement structured clone of keys (blink-side). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update serialized-script-value.html for version bump Created 6 years, 9 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
« no previous file with comments | « LayoutTests/crypto/resources/common.js ('k') | Source/bindings/v8/SerializedScriptValue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « LayoutTests/crypto/resources/common.js ('k') | Source/bindings/v8/SerializedScriptValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698