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

Unified Diff: test/inspector/debugger/get-possible-breakpoints.js

Issue 2488493003: [inspector] fix positions for single expression arrow function (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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/parsing/preparser.h ('k') | test/inspector/debugger/get-possible-breakpoints-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/inspector/debugger/get-possible-breakpoints.js
diff --git a/test/inspector/debugger/get-possible-breakpoints.js b/test/inspector/debugger/get-possible-breakpoints.js
index 3a2b3f2c416e80f16d2d66a5ae03f26bbd4868be..b09c08de14c1a171ac33c148747ae3b874dd4f6c 100644
--- a/test/inspector/debugger/get-possible-breakpoints.js
+++ b/test/inspector/debugger/get-possible-breakpoints.js
@@ -1,7 +1,6 @@
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --expose-gc
print("Test for Debugger.getPossibleBreakpoints");
@@ -9,6 +8,7 @@ Protocol.Runtime.enable();
Protocol.Debugger.enable();
InspectorTest.runTestSuite([
+
function getPossibleBreakpointsInRange(next) {
var source = "function foo(){ return Promise.resolve(); }\nfunction boo(){ return Promise.resolve().then(() => 42); }\n\n";
var scriptId;
@@ -138,8 +138,26 @@ function foo6() { Promise.resolve().then(() => 42) }`;
.then(setAllBreakpoints)
.then(() => Protocol.Runtime.evaluate({ expression: "foo5(); foo6()"}))
.then(next);
- }
+ },
+ function arrowFunctionReturn(next) {
+ waitForPossibleBreakpoints("() => 239\n", { lineNumber: 0, columnNumber: 0 })
+ .then(InspectorTest.logMessage)
+ .then(() => waitForPossibleBreakpoints("function foo() { function boo() { return 239 } }\n", { lineNumber: 0, columnNumber: 0 }))
+ .then(InspectorTest.logMessage)
+ .then(() => waitForPossibleBreakpoints("() => { 239 }\n", { lineNumber: 0, columnNumber: 0 }))
+ .then(InspectorTest.logMessage)
+ // TODO(kozyatinskiy): lineNumber for return position should be 21 instead of 22.
+ .then(() => waitForPossibleBreakpoints("function foo() { 239 }\n", { lineNumber: 0, columnNumber: 0 }))
+ .then(InspectorTest.logMessage)
+ // TODO(kozyatinskiy): lineNumber for return position should be only 9, not 8.
+ .then(() => waitForPossibleBreakpoints("() => 239", { lineNumber: 0, columnNumber: 0 }))
+ .then(InspectorTest.logMessage)
+ // TODO(kozyatinskiy): lineNumber for return position should be only 19, not 20.
+ .then(() => waitForPossibleBreakpoints("() => { return 239 }", { lineNumber: 0, columnNumber: 0 }))
+ .then(InspectorTest.logMessage)
+ .then(next)
+ }
]);
function compileScript(source, origin) {
« no previous file with comments | « src/parsing/preparser.h ('k') | test/inspector/debugger/get-possible-breakpoints-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698