| Index: test/mjsunit/debug-compile-event.js
|
| ===================================================================
|
| --- test/mjsunit/debug-compile-event.js (revision 3849)
|
| +++ test/mjsunit/debug-compile-event.js (working copy)
|
| @@ -90,6 +90,11 @@
|
| var json = event_data.toJSONProtocol();
|
| var msg = eval('(' + json + ')');
|
| assertTrue('context' in msg.body.script);
|
| +
|
| + // Check that we pick script name from //@ sourceURL, iff present
|
| + assertEquals(current_source.indexOf('sourceURL') >= 0 ?
|
| + 'myscript.js' : undefined,
|
| + event_data.script().name());
|
| }
|
| } catch (e) {
|
| exception = e
|
| @@ -109,6 +114,7 @@
|
| source_count += 2; // Using eval causes additional compilation event.
|
| compileSource('JSON.parse(\'{"a":1,"b":2}\')');
|
| source_count++; // Using JSON.parse causes additional compilation event.
|
| +compileSource('x=1; //@ sourceURL=myscript.js');
|
|
|
| // Make sure that the debug event listener was invoked.
|
| assertFalse(exception, "exception in listener")
|
|
|