Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / script-tests / eval-contained-syntax-error.js
blobf600fd58b11559f0c8f6e5274bb7f8ebb5f1c13a
1 description(
2 "This file tests whether a syntax error inside an eval() has the correct line number. That line number should not be the offset of an error within an eval, but rather the line of an eval itself. "
3 );
5 try {
6 eval("a[0]]"); //line 6: error should come from here
7 } catch (e) {
8 if (e.line == 6)
9 debug("PASS: e.line should be 6 and is.");
10 else
11 debug("FAIL: e.line should be 6 but instead is " + e.line + ".");