summaryrefslogtreecommitdiffstats
path: root/devtools/client/debugger/test/mochitest/code_script-eval.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/debugger/test/mochitest/code_script-eval.js')
-rw-r--r--devtools/client/debugger/test/mochitest/code_script-eval.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/devtools/client/debugger/test/mochitest/code_script-eval.js b/devtools/client/debugger/test/mochitest/code_script-eval.js
new file mode 100644
index 000000000..0d7ceba66
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/code_script-eval.js
@@ -0,0 +1,14 @@
+
+var bar;
+
+function evalSource() {
+ eval("bar = function() {\nvar x = 5;\n}");
+}
+
+function evalSourceWithSourceURL() {
+ eval("bar = function() {\nvar x = 6;\n} //# sourceURL=bar.js");
+}
+
+function evalSourceWithDebugger() {
+ eval("bar = function() {\nvar x = 7;\ndebugger; }\n bar();");
+}