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

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

Issue 7045003: Support extracting source mapping url defined by //@ sourceMappingURL=<url> comment. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 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-debugger.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
diff --git a/test/mjsunit/debug-compile-event.js b/test/mjsunit/debug-compile-event.js
index b00a907a3cf79f4d1316fff559751f479549febc..581ad41b91267071a84ab3fd8adba9d1ab624263 100644
--- a/test/mjsunit/debug-compile-event.js
+++ b/test/mjsunit/debug-compile-event.js
@@ -81,9 +81,15 @@ function listener(event, exec_state, event_data, data) {
assertTrue('context' in msg.body.script);
// Check that we pick script name from //@ sourceURL, iff present
- assertEquals(current_source.indexOf('sourceURL') >= 0 ?
+ assertEquals(current_source.indexOf('sourceURL') >= 0 ?
'myscript.js' : undefined,
event_data.script().name());
+
+ // Check that we pick source mapping url from //@ sourceMappingURL, if
+ // present.
+ assertEquals(current_source.indexOf('sourceMappingURL') >= 0 ?
+ 'http://example.com/sourceMapping.json' : undefined,
+ event_data.script().sourceMappingURL());
}
} catch (e) {
exception = e
@@ -103,7 +109,8 @@ compileSource('eval("eval(\'(function(){return a;})\')")');
source_count += 2; // Using eval causes additional compilation event.
compileSource('JSON.parse(\'{"a":1,"b":2}\')');
// Using JSON.parse does not causes additional compilation events.
-compileSource('x=1; //@ sourceURL=myscript.js');
+compileSource('x=1; //@ sourceURL=myscript.js\n' +
+ '//@ sourceMappingURL=http://example.com/sourceMapping.json');
// Make sure that the debug event listener was invoked.
assertFalse(exception, "exception in listener")
« no previous file with comments | « src/mirror-debugger.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698