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

Unified Diff: test/mjsunit/debug-compile-event.js

Issue 596088: Land 598061(Process //@ scriptURL=url comment for scripts that don't have nam... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 months 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/mirror-delay.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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")
« no previous file with comments | « src/mirror-delay.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698