| Index: test/mjsunit/tools/logreader.js
|
| diff --git a/test/mjsunit/tools/logreader.js b/test/mjsunit/tools/logreader.js
|
| index dfd7f9f54eb003646ea91c182b6cc73efdb80a69..8ed5ffd2670b68e3ec7e320d3f031c906f7c7edd 100644
|
| --- a/test/mjsunit/tools/logreader.js
|
| +++ b/test/mjsunit/tools/logreader.js
|
| @@ -80,3 +80,19 @@
|
| assertEquals('bbbbaaaa', reader.expandBackRef_('bbbb#2:4'));
|
| assertEquals('"#1:1"', reader.expandBackRef_('"#1:1"'));
|
| })();
|
| +
|
| +
|
| +// See http://code.google.com/p/v8/issues/detail?id=420
|
| +(function testReadingTruncatedLog() {
|
| + // Having an incorrect event in the middle of a log should throw an exception.
|
| + var reader1 = new devtools.profiler.LogReader({});
|
| + assertThrows(function() {
|
| + reader1.processLogChunk('alias,a,b\nxxxx\nalias,c,d\n');
|
| + });
|
| +
|
| + // But having it as the last record should not.
|
| + var reader2 = new devtools.profiler.LogReader({});
|
| + assertDoesNotThrow(function() {
|
| + reader2.processLogChunk('alias,a,b\nalias,c,d\nxxxx');
|
| + });
|
| +})();
|
|
|