Skip to content

Commit 999e553

Browse files
committed
New captured errors and failing test for Chrome 34
1 parent 195656a commit 999e553

File tree

2 files changed

+42
-3
lines changed

2 files changed

+42
-3
lines changed

spec/captured-errors.js

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,19 @@ CapturedExceptions.OPERA_1151 = {
186186
" foo();"
187187
};
188188

189+
CapturedExceptions.OPERA_1215 = {
190+
message: "Cannot convert 'x' to object",
191+
stack: "<anonymous function>([arguments not available])@http://localhost:8000/ExceptionLab.html:48\n" +
192+
"dumpException3([arguments not available])@http://localhost:8000/ExceptionLab.html:46\n" +
193+
"<anonymous function>([arguments not available])@http://localhost:8000/ExceptionLab.html:1",
194+
stacktrace: "Error thrown at line 48, column 12 in <anonymous function>(x) in http://localhost:8000/ExceptionLab.html:\n" +
195+
" x.undef();\n" +
196+
"called from line 46, column 8 in dumpException3() in http://localhost:8000/ExceptionLab.html:\n" +
197+
" dumpException((function(x) {\n" +
198+
"called from line 1, column 0 in <anonymous function>(event) in http://localhost:8000/ExceptionLab.html:\n" +
199+
" dumpException3();"
200+
};
201+
189202
CapturedExceptions.CHROME_15 = {
190203
'arguments': ["undef"],
191204
message: "Object #<Object> has no method 'undef'",
@@ -196,7 +209,15 @@ CapturedExceptions.CHROME_15 = {
196209
" at scheme://path/to/file.js:24:4"
197210
};
198211

199-
CapturedExceptions.FIREFOX_36 = {
212+
CapturedExceptions.CHROME_34 = {
213+
message: "Cannot read property 'undef' of null",
214+
stack: "TypeError: Cannot read property 'undef' of null\n" +
215+
" at scheme://path/to/file.js:48:14\n" +
216+
" at dumpException3 (scheme://path/to/file.js:52:11)\n" +
217+
" at HTMLButtonElement.onclick (scheme://path/to/file.js:82:126)"
218+
};
219+
220+
CapturedExceptions.FIREFOX_3 = {
200221
fileName: "http://127.0.0.1:8000/js/stacktrace.js",
201222
lineNumber: 44,
202223
message: "this.undef is not a function",
@@ -211,7 +232,7 @@ CapturedExceptions.FIREFOX_36 = {
211232
""
212233
};
213234

214-
CapturedExceptions.FIREFOX_36_FILE = {
235+
CapturedExceptions.FIREFOX_3_FILE = {
215236
fileName: "file:///home/user/js/stacktrace.js",
216237
lineNumber: 44,
217238
message: "this.undef is not a function",
@@ -249,6 +270,14 @@ CapturedExceptions.FIREFOX_14 = {
249270
lineNumber: 48
250271
};
251272

273+
CapturedExceptions.FIREFOX_29 = {
274+
message: "x is null",
275+
stack: "dumpException3/<@scheme://path/to/file.js:48\n" +
276+
"dumpException3@scheme://path/to/file.js:52\n" +
277+
"onclick@scheme://path/to/file.js:1\n" +
278+
""
279+
};
280+
252281
CapturedExceptions.SAFARI_6 = {
253282
message: "'null' is not an object (evaluating 'x.undef')",
254283
stack: "@scheme://path/to/file.js:48\n" +
@@ -259,6 +288,15 @@ CapturedExceptions.SAFARI_6 = {
259288
sourceURL: "scheme://path/to/file.js"
260289
};
261290

291+
CapturedExceptions.SAFARI_7 = {
292+
message: "'null' is not an object (evaluating 'x.undef')",
293+
stack: "scheme://path/to/file.js:48:14\n" +
294+
"dumpException3@scheme://path/to/file.js:52:11\n" +
295+
"onclick@scheme://path/to/file.js:82:57",
296+
line: 48,
297+
sourceURL: "scheme://path/to/file.js"
298+
};
299+
262300
CapturedExceptions.IE_10 = {
263301
message: "Unable to get property 'undef' of undefined or null reference",
264302
stack: "TypeError: Unable to get property 'undef' of undefined or null reference\n" +

spec/stack-parser-spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ describe('error-parser.js', function() {
66
var unit = new ErrorParser();
77
it('should detect V8', function() {
88
expect(unit.chooseParser(CapturedExceptions.CHROME_15)).toBe(unit.parseV8);
9+
expect(unit.chooseParser(CapturedExceptions.CHROME_34)).toBe(unit.parseV8);
910
});
1011
it('should detect Firefox', function() {
11-
expect(unit.chooseParser(CapturedExceptions.FIREFOX_36)).toBe(unit.parseSpiderMonkey);
12+
expect(unit.chooseParser(CapturedExceptions.FIREFOX_3)).toBe(unit.parseSpiderMonkey);
1213
expect(unit.chooseParser(CapturedExceptions.FIREFOX_7)).toBe(unit.parseSpiderMonkey);
1314
expect(unit.chooseParser(CapturedExceptions.FIREFOX_14)).toBe(unit.parseSpiderMonkey);
1415
});

0 commit comments

Comments
 (0)