OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2014 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2014 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 | 7 |
8 <link rel="import" href="/tracing/base/base64.html"> | 8 <link rel="import" href="/tracing/base/base64.html"> |
9 <link rel="import" href="/tracing/core/test_utils.html"> | 9 <link rel="import" href="/tracing/core/test_utils.html"> |
10 <link rel="import" href="/tracing/extras/importer/etw/etw_importer.html"> | 10 <link rel="import" href="/tracing/extras/importer/etw/etw_importer.html"> |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 decoder.reset('dABlAHMAdAAAAA=='); | 198 decoder.reset('dABlAHMAdAAAAA=='); |
199 assert.strictEqual(decoder.decodeFixedW16String(1), 't'); | 199 assert.strictEqual(decoder.decodeFixedW16String(1), 't'); |
200 assert.equal(decoder.position_, 2); | 200 assert.equal(decoder.position_, 2); |
201 }); | 201 }); |
202 | 202 |
203 test('decodeBytes', function() { | 203 test('decodeBytes', function() { |
204 var importer = new tr.e.importer.etw.EtwImporter('dummy', []); | 204 var importer = new tr.e.importer.etw.EtwImporter('dummy', []); |
205 var decoder = importer.decoder_; | 205 var decoder = importer.decoder_; |
206 decoder.reset('AAECAwQFBgc='); | 206 decoder.reset('AAECAwQFBgc='); |
207 var bytes = decoder.decodeBytes(8); | 207 var bytes = decoder.decodeBytes(8); |
208 for (var i = 0; i < bytes.length; ++i) | 208 for (var i = 0; i < bytes.length; ++i) { |
209 assert.equal(bytes[i], i); | 209 assert.equal(bytes[i], i); |
| 210 } |
210 }); | 211 }); |
211 | 212 |
212 test('decodeSID', function() { | 213 test('decodeSID', function() { |
213 var importer = new tr.e.importer.etw.EtwImporter('dummy', []); | 214 var importer = new tr.e.importer.etw.EtwImporter('dummy', []); |
214 var decoder = importer.decoder_; | 215 var decoder = importer.decoder_; |
215 | 216 |
216 // Decode a SID structure with 64-bit pointer. | 217 // Decode a SID structure with 64-bit pointer. |
217 decoder.reset( | 218 decoder.reset( |
218 'AQIDBAECAwQFBAMCAAAAAAEFAAAAAAAFFQAAAAECAwQFBgcICQoLDA0DAAA='); | 219 'AQIDBAECAwQFBAMCAAAAAAEFAAAAAAAFFQAAAAECAwQFBgcICQoLDA0DAAA='); |
219 var sid = decoder.decodeSID(true); | 220 var sid = decoder.decodeSID(true); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 var pid10 = importer.getPidFromWindowsTid(10); | 282 var pid10 = importer.getPidFromWindowsTid(10); |
282 var pid11 = importer.getPidFromWindowsTid(11); | 283 var pid11 = importer.getPidFromWindowsTid(11); |
283 var pid20 = importer.getPidFromWindowsTid(20); | 284 var pid20 = importer.getPidFromWindowsTid(20); |
284 | 285 |
285 assert.equal(pid10, 1); | 286 assert.equal(pid10, 1); |
286 assert.equal(pid11, 1); | 287 assert.equal(pid11, 1); |
287 assert.equal(pid20, 2); | 288 assert.equal(pid20, 2); |
288 }); | 289 }); |
289 }); | 290 }); |
290 </script> | 291 </script> |
OLD | NEW |