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

Unified Diff: test/mjsunit/debug-sourceinfo.js

Issue 1526583002: Revert of [debugger] correctly find source position of implicit return statement. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/debug-sourceinfo.js
diff --git a/test/mjsunit/debug-sourceinfo.js b/test/mjsunit/debug-sourceinfo.js
index e70dd20187ec7e2868e6d6f85cbf11491793ab78..1dbe1b7a0a47643b19424472535f71dba13d49cb 100644
--- a/test/mjsunit/debug-sourceinfo.js
+++ b/test/mjsunit/debug-sourceinfo.js
@@ -63,9 +63,9 @@
// This is the last position in the entire file (note: this equals
// file size of <debug-sourceinfo.js> - 1, since starting at 0).
-var last_position = 11529;
+var last_position = 11337;
// This is the last line of entire file (note: starting at 0).
-var last_line = 269;
+var last_line = 265;
// This is the last column of last line (note: starting at 0 and +1, due
// to trailing <LF>).
var last_column = 1;
@@ -244,22 +244,18 @@
assertEquals(0 + start_d, Debug.findFunctionSourceLocation(d, 0, 0).position);
assertEquals(6 + start_d, Debug.findFunctionSourceLocation(d, 1, 0).position);
for (i = 1; i <= num_lines_d; i++) {
- assertEquals(6 + (i * line_length_d) + start_d,
- Debug.findFunctionSourceLocation(d, (i + 1), 0).position);
+ assertEquals(6 + (i * line_length_d) + start_d, Debug.findFunctionSourceLocation(d, (i + 1), 0).position);
}
assertEquals(158 + start_d, Debug.findFunctionSourceLocation(d, 17, 0).position);
// Make sure invalid inputs work properly.
assertEquals(0, script.locationFromPosition(-1).line);
-assertEquals(null, script.locationFromPosition(last_position + 2));
+assertEquals(null, script.locationFromPosition(last_position + 1));
// Test last position.
assertEquals(last_position, script.locationFromPosition(last_position).position);
assertEquals(last_line, script.locationFromPosition(last_position).line);
assertEquals(last_column, script.locationFromPosition(last_position).column);
-assertEquals(last_line, script.locationFromPosition(last_position + 1).line);
-assertEquals(last_column + 1,
- script.locationFromPosition(last_position + 1).column);
// Test that script.sourceLine(line) works.
var location;
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698