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

Unified Diff: test/cctest/test-debug.cc

Issue 2733783002: [debug] change coverage API to use offset instead of line/column. (Closed)
Patch Set: rebase Created 3 years, 9 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/inspector/v8-profiler-agent-impl.cc ('k') | test/inspector/cpu-profiler/coverage-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-debug.cc
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
index 8d06b1b66e3fa4f949ed024a7c52a57a678df4b4..d7d59fdc9e2ca52d7794c01ea44be29cebf7879d 100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -6650,16 +6650,22 @@ TEST(DebugCoverage) {
CHECK_EQ(2u, script_data.FunctionCount());
v8::debug::Coverage::FunctionData function_data =
script_data.GetFunctionData(0);
- CHECK_EQ(0, function_data.Start().GetLineNumber());
- CHECK_EQ(0, function_data.Start().GetColumnNumber());
- CHECK_EQ(3, function_data.End().GetLineNumber());
- CHECK_EQ(4, function_data.End().GetColumnNumber());
+ v8::debug::Location start =
+ script->GetSourceLocation(function_data.StartOffset());
+ v8::debug::Location end =
+ script->GetSourceLocation(function_data.EndOffset());
+ CHECK_EQ(0, start.GetLineNumber());
+ CHECK_EQ(0, start.GetColumnNumber());
+ CHECK_EQ(3, end.GetLineNumber());
+ CHECK_EQ(4, end.GetColumnNumber());
CHECK_EQ(1, function_data.Count());
function_data = script_data.GetFunctionData(1);
- CHECK_EQ(0, function_data.Start().GetLineNumber());
- CHECK_EQ(0, function_data.Start().GetColumnNumber());
- CHECK_EQ(1, function_data.End().GetLineNumber());
- CHECK_EQ(1, function_data.End().GetColumnNumber());
+ start = script->GetSourceLocation(function_data.StartOffset());
+ end = script->GetSourceLocation(function_data.EndOffset());
+ CHECK_EQ(0, start.GetLineNumber());
+ CHECK_EQ(0, start.GetColumnNumber());
+ CHECK_EQ(1, end.GetLineNumber());
+ CHECK_EQ(1, end.GetColumnNumber());
CHECK_EQ(2, function_data.Count());
}
« no previous file with comments | « src/inspector/v8-profiler-agent-impl.cc ('k') | test/inspector/cpu-profiler/coverage-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698