diff options
Diffstat (limited to 'deps/v8/test/debugger/debug/debug-liveedit-inline.js')
-rw-r--r-- | deps/v8/test/debugger/debug/debug-liveedit-inline.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/deps/v8/test/debugger/debug/debug-liveedit-inline.js b/deps/v8/test/debugger/debug/debug-liveedit-inline.js index 4d20991fbc..fd9f28eb23 100644 --- a/deps/v8/test/debugger/debug/debug-liveedit-inline.js +++ b/deps/v8/test/debugger/debug/debug-liveedit-inline.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file -// Flags: --allow-natives-syntax --enable-inspector +// Flags: --allow-natives-syntax Debug = debug.Debug @@ -17,14 +17,10 @@ assertEquals("Cat", foo()); foo(); -var script = Debug.findScript(ChooseAnimal); +var new_source = + Debug.scriptSource(ChooseAnimal).replace('Cat', "Cap' + 'y' + 'bara"); +print('new source: ' + new_source); -var orig_animal = "Cat"; -var patch_pos = script.source.indexOf(orig_animal); -var new_animal_patch = "Cap' + 'y' + 'bara"; - -var change_log = new Array(); - -Debug.LiveEdit.TestApi.ApplySingleChunkPatch(script, patch_pos, orig_animal.length, new_animal_patch, change_log); +%LiveEditPatchScript(ChooseAnimal, new_source); assertEquals("Capybara", foo()); |