summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-06-28 16:42:48 +0100
committerKristian Monsen <kristianm@google.com>2010-07-02 10:29:56 +0100
commit06ea8e899e48f1f2f396b70e63fae369f2f23232 (patch)
tree20c1428cd05c76f32394ab354ea35ed99acd86d8 /LayoutTests/fast
parent72aad67af14193199e29cdd5c4ddc095a8b9a8a8 (diff)
downloadexternal_webkit-06ea8e899e48f1f2f396b70e63fae369f2f23232.zip
external_webkit-06ea8e899e48f1f2f396b70e63fae369f2f23232.tar.gz
external_webkit-06ea8e899e48f1f2f396b70e63fae369f2f23232.tar.bz2
Merge WebKit at r61871: Initial merge by git.
Change-Id: I6cff43abca9cc4782e088a469ad4f03f166a65d5
Diffstat (limited to 'LayoutTests/fast')
-rw-r--r--LayoutTests/fast/js/resources/bom-in-file-retains-correct-offset.js2
-rw-r--r--LayoutTests/fast/js/resources/script-line-number.js26
2 files changed, 27 insertions, 1 deletions
diff --git a/LayoutTests/fast/js/resources/bom-in-file-retains-correct-offset.js b/LayoutTests/fast/js/resources/bom-in-file-retains-correct-offset.js
index b62a250..c4870d2 100644
--- a/LayoutTests/fast/js/resources/bom-in-file-retains-correct-offset.js
+++ b/LayoutTests/fast/js/resources/bom-in-file-retains-correct-offset.js
@@ -1,2 +1,2 @@
description("This ensures that BOM's scattered through a source file do not break parsing");
-function f(){successfullyReparsed=true;shouldBeTrue('successfullyReparsed');successfullyParsed=true}f();
+function g(){function f(){successfullyReparsed=true;shouldBeTrue('successfullyReparsed');successfullyParsed=true}f();} g()
diff --git a/LayoutTests/fast/js/resources/script-line-number.js b/LayoutTests/fast/js/resources/script-line-number.js
new file mode 100644
index 0000000..09d9b1a
--- /dev/null
+++ b/LayoutTests/fast/js/resources/script-line-number.js
@@ -0,0 +1,26 @@
+description(
+"This test checks that line numbers are correctly reported for both inline scripts and inline event handlers."
+);
+
+function getLineFromError(e)
+{
+ // JSC
+ if (e.line)
+ return e.line;
+
+ // V8
+ if (e.stack) {
+ // ErrorName: ErrorDescription at FileName:LineNumber:ColumnNumber
+ parts = e.stack.split(":");
+ return parts[parts.length - 2];
+ }
+
+ return -1;
+}
+
+function assertErrorOnLine(error, expectedLine)
+{
+ shouldBe(stringify(getLineFromError(error)), stringify(expectedLine));
+}
+
+var successfullyParsed = true;