| Index: test/debugger/debug/debug-compile-event.js
|
| diff --git a/test/mjsunit/debug-compile-event.js b/test/debugger/debug/debug-compile-event.js
|
| similarity index 82%
|
| rename from test/mjsunit/debug-compile-event.js
|
| rename to test/debugger/debug/debug-compile-event.js
|
| index 862340602b34c6b145d872bdc64efa643d1592e1..bd18d901abaca76294bc51348f7bc30041c7ccb9 100644
|
| --- a/test/mjsunit/debug-compile-event.js
|
| +++ b/test/debugger/debug/debug-compile-event.js
|
| @@ -30,13 +30,10 @@
|
| Debug = debug.Debug
|
|
|
| var exception = false; // Exception in debug event listener.
|
| -var before_compile_count = 0;
|
| var after_compile_count = 0;
|
| var compile_error_count = 0;
|
| var current_source = ''; // Current source being compiled.
|
| var source_count = 0; // Total number of scources compiled.
|
| -var host_compilations = 0; // Number of scources compiled through the API.
|
| -var eval_compilations = 0; // Number of scources compiled through eval.
|
| var mute_listener = false;
|
|
|
| function compileSource(source) {
|
| @@ -64,19 +61,9 @@ function listener(event, exec_state, event_data, data) {
|
| event == Debug.DebugEvent.AfterCompile ||
|
| event == Debug.DebugEvent.CompileError) {
|
| // Count the events.
|
| - if (event == Debug.DebugEvent.BeforeCompile) {
|
| - before_compile_count++;
|
| - } else if (event == Debug.DebugEvent.AfterCompile) {
|
| + if (event == Debug.DebugEvent.AfterCompile) {
|
| after_compile_count++;
|
| - switch (event_data.script().compilationType()) {
|
| - case Debug.ScriptCompilationType.Host:
|
| - host_compilations++;
|
| - break;
|
| - case Debug.ScriptCompilationType.Eval:
|
| - eval_compilations++;
|
| - break;
|
| - }
|
| - } else {
|
| + } else if (event == Debug.DebugEvent.CompileError) {
|
| compile_error_count++;
|
| }
|
|
|
| @@ -91,10 +78,6 @@ function listener(event, exec_state, event_data, data) {
|
| // exact source.
|
| assertEquals(current_source, event_data.script().source());
|
| }
|
| - // Check that script context is included into the event message.
|
| - var json = event_data.toJSONProtocol();
|
| - var msg = safeEval(json);
|
| - assertTrue('context' in msg.body.script);
|
|
|
| // Check that we pick script name from //# sourceURL, iff present
|
| if (event == Debug.DebugEvent.AfterCompile) {
|
| @@ -132,13 +115,10 @@ try {
|
| assertFalse(exception, "exception in listener")
|
|
|
| // Number of before and after + error events should be the same.
|
| -assertEquals(before_compile_count, after_compile_count + compile_error_count);
|
| assertEquals(compile_error_count, 1);
|
|
|
| // Check the actual number of events (no compilation through the API as all
|
| // source compiled through eval).
|
| assertEquals(source_count, after_compile_count);
|
| -assertEquals(0, host_compilations);
|
| -assertEquals(source_count, eval_compilations);
|
|
|
| Debug.setListener(null);
|
|
|