Reviewers: Søren Gjesse,
Description:
Fix tests after r3811.
[email protected]
Please review this at http://codereview.chromium.org/574027
Affected files:
M test/mjsunit/tools/logreader.js
M test/mjsunit/tools/tickprocessor.js
M tools/tickprocessor.js
Index: test/mjsunit/tools/logreader.js
diff --git a/test/mjsunit/tools/logreader.js
b/test/mjsunit/tools/logreader.js
index
8b747895172fd398b66175053972062ca71384dd..485990eaa1deefe32a03e9b5d5b7b7e5265e4940
100644
--- a/test/mjsunit/tools/logreader.js
+++ b/test/mjsunit/tools/logreader.js
@@ -80,19 +80,3 @@
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');
- });
-})();
Index: test/mjsunit/tools/tickprocessor.js
diff --git a/test/mjsunit/tools/tickprocessor.js
b/test/mjsunit/tools/tickprocessor.js
index
abcde897eca7ddd34d6990f59693b9517ab7a815..30b0ec23f99ad4b20fd506d6c0c1c4c2b179f87a
100644
--- a/test/mjsunit/tools/tickprocessor.js
+++ b/test/mjsunit/tools/tickprocessor.js
@@ -379,9 +379,7 @@ function driveTickProcessorTest(
var tp = new TickProcessor(
new CppEntriesProviderMock(), separateIc, ignoreUnknown,
stateFilter);
var pm = new PrintMonitor(testsPath + refOutput);
- tp.processLogFile(testsPath + logInput);
- // Hack file name to avoid dealing with platform specifics.
- tp.lastLogFileName_ = 'v8.log';
+ tp.processLogFileInTest(testsPath + logInput);
tp.printStatistics();
pm.finish();
};
Index: tools/tickprocessor.js
diff --git a/tools/tickprocessor.js b/tools/tickprocessor.js
index
a40d95d29f6fababe6727dcf3a651ef3c15fbf2f..a3e14c3ae580aa9ca13d77c283a39b525d7eb35c
100644
--- a/tools/tickprocessor.js
+++ b/tools/tickprocessor.js
@@ -269,6 +269,14 @@ TickProcessor.prototype.processLogFile =
function(fileName) {
};
+TickProcessor.prototype.processLogFileInTest = function(fileName) {
+ // Hack file name to avoid dealing with platform specifics.
+ this.lastLogFileName_ = 'v8.log';
+ var contents = readFile(fileName);
+ this.processLogChunk(contents);
+};
+
+
TickProcessor.prototype.processSharedLibrary = function(
name, startAddr, endAddr) {
var entry = this.profile_.addLibrary(name, startAddr, endAddr);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev