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

Unified Diff: test/cctest/test-profile-generator.cc

Issue 3431016: Merge r5492 into 2.3 branch. Fix for showing regexps in profiler. (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.3/
Patch Set: Created 10 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/version.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-profile-generator.cc
===================================================================
--- test/cctest/test-profile-generator.cc (revision 5492)
+++ test/cctest/test-profile-generator.cc (working copy)
@@ -89,6 +89,24 @@
}
+TEST(ProfileNodeFindOrAddChildForSameFunction) {
+ ProfileNode node(NULL, NULL);
+ CodeEntry entry1(i::Logger::FUNCTION_TAG, "", "aaa", "", 0,
+ TokenEnumerator::kNoSecurityToken);
+ ProfileNode* childNode1 = node.FindOrAddChild(&entry1);
+ CHECK_NE(NULL, childNode1);
+ CHECK_EQ(childNode1, node.FindOrAddChild(&entry1));
+ // The same function again.
+ CodeEntry entry2(i::Logger::FUNCTION_TAG, "", "aaa", "", 0,
+ TokenEnumerator::kNoSecurityToken);
+ CHECK_EQ(childNode1, node.FindOrAddChild(&entry2));
+ // Now with a different security token.
+ CodeEntry entry3(i::Logger::FUNCTION_TAG, "", "aaa", "", 0,
+ TokenEnumerator::kNoSecurityToken + 1);
+ CHECK_EQ(childNode1, node.FindOrAddChild(&entry3));
+}
+
+
namespace {
class ProfileTreeTestHelper {
« no previous file with comments | « src/version.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698