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

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

Issue 3426008: Show RegExp calls in the profile. (Closed)
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/profile-generator-inl.h ('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
diff --git a/test/cctest/test-profile-generator.cc b/test/cctest/test-profile-generator.cc
index b36220284f29279c909c7498b2afa267ca267d30..d8f1c10917fd965bf38fa41734050b20fe6e8cf6 100644
--- a/test/cctest/test-profile-generator.cc
+++ b/test/cctest/test-profile-generator.cc
@@ -89,6 +89,24 @@ TEST(ProfileNodeFindOrAddChild) {
}
+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/profile-generator-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698