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

Unified Diff: test/debugger/debug/es6/generators-relocation.js

Issue 2480283002: Revert of [debugger] Migrate more debugger tests to inspector (Closed)
Patch Set: 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 | « test/debugger/debug/es6/debug-stepout-tailcalls.js ('k') | test/debugger/debug/for-in-opt.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/debugger/debug/es6/generators-relocation.js
diff --git a/test/debugger/debug/es6/generators-relocation.js b/test/debugger/debug/es6/generators-relocation.js
deleted file mode 100644
index 78413fde6e713c9bacd1fc5adf8b450c31b33e48..0000000000000000000000000000000000000000
--- a/test/debugger/debug/es6/generators-relocation.js
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2014 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.
-
-
-var Debug = debug.Debug;
-
-function assertIteratorResult(value, done, result) {
- assertEquals({value: value, done: done}, result);
-}
-
-function RunTest(formals_and_body, args, value1, value2) {
- // A null listener. It isn't important what the listener does.
- function listener(event, exec_state, event_data, data) {
- }
-
- // Create the generator function outside a debugging context. It will probably
- // be lazily compiled.
- var gen = (function*(){}).constructor.apply(null, formals_and_body);
-
- // Instantiate the generator object.
- var obj = gen.apply(null, args);
-
- // Advance to the first yield.
- assertIteratorResult(value1, false, obj.next());
-
- // Enable the debugger, which should force recompilation of the generator
- // function and relocation of the suspended generator activation.
- Debug.setListener(listener);
-
- // Add a breakpoint on line 3 (the second yield).
- var bp = Debug.setBreakPoint(gen, 3);
-
- // Check that the generator resumes and suspends properly.
- assertIteratorResult(value2, false, obj.next());
-
- // Disable debugger -- should not force recompilation.
- Debug.clearBreakPoint(bp);
- Debug.setListener(null);
-
- // Run to completion.
- assertIteratorResult(undefined, true, obj.next());
-}
-
-function prog(a, b, c) {
- return a + ';\n' + 'yield ' + b + ';\n' + 'yield ' + c;
-}
-
-// Simple empty local scope.
-RunTest([prog('', '1', '2')], [], 1, 2);
-
-RunTest([prog('for (;;) break', '1', '2')], [], 1, 2);
-
-RunTest([prog('while (0) foo()', '1', '2')], [], 1, 2);
-
-RunTest(['a', prog('var x = 3', 'a', 'x')], [1], 1, 3);
-
-RunTest(['a', prog('', '1', '2')], [42], 1, 2);
-
-RunTest(['a', prog('for (;;) break', '1', '2')], [42], 1, 2);
« no previous file with comments | « test/debugger/debug/es6/debug-stepout-tailcalls.js ('k') | test/debugger/debug/for-in-opt.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698