Fix RecordStackTraceAtStartProfiling test.
Review URL: http://codereview.chromium.org/5598008 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
b55add7e20
commit
fa9a0625ea
@ -42,9 +42,6 @@ test-api/ApplyInterruption: PASS || TIMEOUT
|
||||
# when snapshot is on, so I am marking it PASS || FAIL
|
||||
test-heap-profiler/HeapSnapshotsDiff: PASS || FAIL
|
||||
|
||||
# BUG(3260336): Flaky test. May be timing related.
|
||||
test-profile-generator/RecordStackTraceAtStartProfiling: PASS || FAIL
|
||||
|
||||
# These tests always fail. They are here to test test.py. If
|
||||
# they don't fail then test.py has failed.
|
||||
test-serialize/TestThatAlwaysFails: FAIL
|
||||
|
@ -782,12 +782,16 @@ TEST(RecordStackTraceAtStartProfiling) {
|
||||
CpuProfiler::GetProfile(NULL, 0);
|
||||
const ProfileTree* topDown = profile->top_down();
|
||||
const ProfileNode* current = topDown->root();
|
||||
const_cast<ProfileNode*>(current)->Print(0);
|
||||
// The tree should look like this:
|
||||
// (root)
|
||||
// (anonymous function)
|
||||
// a
|
||||
// b
|
||||
// c
|
||||
// There can also be:
|
||||
// startProfiling
|
||||
// if the sampler managed to get a tick.
|
||||
current = PickChild(current, "(anonymous function)");
|
||||
CHECK_NE(NULL, const_cast<ProfileNode*>(current));
|
||||
current = PickChild(current, "a");
|
||||
@ -796,7 +800,12 @@ TEST(RecordStackTraceAtStartProfiling) {
|
||||
CHECK_NE(NULL, const_cast<ProfileNode*>(current));
|
||||
current = PickChild(current, "c");
|
||||
CHECK_NE(NULL, const_cast<ProfileNode*>(current));
|
||||
CHECK_EQ(0, current->children()->length());
|
||||
CHECK(current->children()->length() == 0 ||
|
||||
current->children()->length() == 1);
|
||||
if (current->children()->length() == 1) {
|
||||
current = PickChild(current, "startProfiling");
|
||||
CHECK_EQ(0, current->children()->length());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user