@@ -171,87 +171,25 @@ describe('TraceKit', function () {
171
171
assert . deepEqual ( stackFrames . stack [ 2 ] , { url : 'http://path/to/file.js' , func : 'bar' , args : [ ] , line : 109 , column : 1 } ) ;
172
172
} ) ;
173
173
174
- it ( 'should parse Opera 8.54 error' , function ( ) {
175
- var stackFrames = TraceKit . computeStackTrace ( CapturedExceptions . OPERA_854 ) ;
176
- assert . ok ( stackFrames ) ;
177
- assert . deepEqual ( stackFrames . stack . length , 7 ) ;
178
- assert . deepEqual ( stackFrames . stack [ 0 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 44 , column : null } ) ;
179
- assert . deepEqual ( stackFrames . stack [ 1 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 31 , column : null } ) ;
180
- assert . deepEqual ( stackFrames . stack [ 2 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 18 , column : null } ) ;
181
- assert . deepEqual ( stackFrames . stack [ 3 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 4 , column : null } ) ;
182
- assert . deepEqual ( stackFrames . stack [ 4 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 7 , column : null } ) ;
183
- assert . deepEqual ( stackFrames . stack [ 5 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 11 , column : null } ) ;
184
- assert . deepEqual ( stackFrames . stack [ 6 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 15 , column : null } ) ;
185
- } ) ;
186
-
187
- it ( 'should parse Opera 9.02 error' , function ( ) {
188
- var stackFrames = TraceKit . computeStackTrace ( CapturedExceptions . OPERA_902 ) ;
189
- assert . ok ( stackFrames ) ;
190
- assert . deepEqual ( stackFrames . stack . length , 7 ) ;
191
- assert . deepEqual ( stackFrames . stack [ 0 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 44 , column : null } ) ;
192
- assert . deepEqual ( stackFrames . stack [ 1 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 31 , column : null } ) ;
193
- assert . deepEqual ( stackFrames . stack [ 2 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 18 , column : null } ) ;
194
- assert . deepEqual ( stackFrames . stack [ 3 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 4 , column : null } ) ;
195
- assert . deepEqual ( stackFrames . stack [ 4 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 7 , column : null } ) ;
196
- assert . deepEqual ( stackFrames . stack [ 5 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 11 , column : null } ) ;
197
- assert . deepEqual ( stackFrames . stack [ 6 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 15 , column : null } ) ;
198
- } ) ;
199
-
200
- it ( 'should parse Opera 9.27 error' , function ( ) {
201
- var stackFrames = TraceKit . computeStackTrace ( CapturedExceptions . OPERA_927 ) ;
202
- assert . ok ( stackFrames ) ;
203
- assert . deepEqual ( stackFrames . stack . length , 3 ) ;
204
- assert . deepEqual ( stackFrames . stack [ 0 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 43 , column : null } ) ;
205
- assert . deepEqual ( stackFrames . stack [ 1 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 31 , column : null } ) ;
206
- assert . deepEqual ( stackFrames . stack [ 2 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 18 , column : null } ) ;
207
- } ) ;
208
-
209
- it ( 'should parse Opera 9.64 error' , function ( ) {
210
- var stackFrames = TraceKit . computeStackTrace ( CapturedExceptions . OPERA_964 ) ;
211
- assert . ok ( stackFrames ) ;
212
- assert . deepEqual ( stackFrames . stack . length , 6 ) ;
213
- assert . deepEqual ( stackFrames . stack [ 0 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 27 , column : null } ) ;
214
- assert . deepEqual ( stackFrames . stack [ 1 ] , { url : 'http://path/to/file.js' , func : 'printStackTrace' , args : [ ] , line : 18 , column : null } ) ;
215
- assert . deepEqual ( stackFrames . stack [ 2 ] , { url : 'http://path/to/file.js' , func : 'bar' , args : [ ] , line : 4 , column : null } ) ;
216
- assert . deepEqual ( stackFrames . stack [ 3 ] , { url : 'http://path/to/file.js' , func : 'bar' , args : [ ] , line : 7 , column : null } ) ;
217
- assert . deepEqual ( stackFrames . stack [ 4 ] , { url : 'http://path/to/file.js' , func : 'foo' , args : [ ] , line : 11 , column : null } ) ;
218
- assert . deepEqual ( stackFrames . stack [ 5 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 15 , column : null } ) ;
219
- } ) ;
220
-
221
- it ( 'should parse Opera 10 error' , function ( ) {
222
- var stackFrames = TraceKit . computeStackTrace ( CapturedExceptions . OPERA_10 ) ;
223
- assert . ok ( stackFrames ) ;
224
- assert . deepEqual ( stackFrames . stack . length , 7 ) ;
225
- assert . deepEqual ( stackFrames . stack [ 0 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 42 , column : null } ) ;
226
- assert . deepEqual ( stackFrames . stack [ 1 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 27 , column : null } ) ;
227
- assert . deepEqual ( stackFrames . stack [ 2 ] , { url : 'http://path/to/file.js' , func : 'printStackTrace' , args : [ ] , line : 18 , column : null } ) ;
228
- assert . deepEqual ( stackFrames . stack [ 3 ] , { url : 'http://path/to/file.js' , func : 'bar' , args : [ ] , line : 4 , column : null } ) ;
229
- assert . deepEqual ( stackFrames . stack [ 4 ] , { url : 'http://path/to/file.js' , func : 'bar' , args : [ ] , line : 7 , column : null } ) ;
230
- assert . deepEqual ( stackFrames . stack [ 5 ] , { url : 'http://path/to/file.js' , func : 'foo' , args : [ ] , line : 11 , column : null } ) ;
231
- assert . deepEqual ( stackFrames . stack [ 6 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 15 , column : null } ) ;
232
- } ) ;
233
-
234
174
it ( 'should parse Opera 11 error' , function ( ) {
235
175
var stackFrames = TraceKit . computeStackTrace ( CapturedExceptions . OPERA_11 ) ;
236
176
assert . ok ( stackFrames ) ;
237
- assert . deepEqual ( stackFrames . stack . length , 7 ) ;
238
- assert . deepEqual ( stackFrames . stack [ 0 ] , { url : 'http://path/to/file.js' , func : 'createException' , args : [ ] , line : 42 , column : 12 } ) ;
239
- assert . deepEqual ( stackFrames . stack [ 1 ] , { url : 'http://path/to/file.js' , func : 'run' , args : [ 'ex' ] , line : 27 , column : 8 } ) ;
240
- assert . deepEqual ( stackFrames . stack [ 2 ] , { url : 'http://path/to/file.js' , func : 'printStackTrace' , args : [ 'options' ] , line : 18 , column : 4 } ) ;
241
- assert . deepEqual ( stackFrames . stack [ 3 ] , { url : 'http://path/to/file.js' , func : 'bar' , args : [ 'n' ] , line : 4 , column : 5 } ) ;
242
- assert . deepEqual ( stackFrames . stack [ 4 ] , { url : 'http://path/to/file.js' , func : 'bar' , args : [ 'n' ] , line : 7 , column : 4 } ) ;
243
- assert . deepEqual ( stackFrames . stack [ 5 ] , { url : 'http://path/to/file.js' , func : 'foo' , args : [ ] , line : 11 , column : 4 } ) ;
244
- assert . deepEqual ( stackFrames . stack [ 6 ] , { url : 'http://path/to/file.js' , func : '?' , args : [ ] , line : 15 , column : 3 } ) ;
177
+ assert . deepEqual ( stackFrames . stack . length , 5 ) ;
178
+ assert . deepEqual ( stackFrames . stack [ 0 ] , { url : 'http://path/to/file.js' , func : '<anonymous function: run>' , args : [ '[arguments not available]' ] , line : 27 , column : null } ) ;
179
+ assert . deepEqual ( stackFrames . stack [ 1 ] , { url : 'http://domain.com:1234/path/to/file.js' , func : 'bar' , args : [ '[arguments not available]' ] , line : 18 , column : null } ) ;
180
+ assert . deepEqual ( stackFrames . stack [ 2 ] , { url : 'http://domain.com:1234/path/to/file.js' , func : 'foo' , args : [ '[arguments not available]' ] , line : 11 , column : null } ) ;
181
+ assert . deepEqual ( stackFrames . stack [ 3 ] , { url : 'http://path/to/file.js' , func : '<anonymous function>' , args : [ ] , line : 15 , column : null } ) ;
182
+ assert . deepEqual ( stackFrames . stack [ 4 ] , { url : 'http://path/to/file.js' , func : 'Error created at <anonymous function>' , args : [ ] , line : 15 , column : null } ) ;
245
183
} ) ;
246
184
247
185
it ( 'should parse Opera 12 error' , function ( ) {
248
186
// TODO: Improve anonymous function name.
249
187
var stackFrames = TraceKit . computeStackTrace ( CapturedExceptions . OPERA_12 ) ;
250
188
assert . ok ( stackFrames ) ;
251
189
assert . deepEqual ( stackFrames . stack . length , 3 ) ;
252
- assert . deepEqual ( stackFrames . stack [ 0 ] , { url : 'http://localhost:8000/ExceptionLab.html' , func : '<anonymous function>' , args : [ 'x ' ] , line : 48 , column : 12 } ) ;
253
- assert . deepEqual ( stackFrames . stack [ 1 ] , { url : 'http://localhost:8000/ExceptionLab.html' , func : 'dumpException3' , args : [ ] , line : 46 , column : 8 } ) ;
254
- assert . deepEqual ( stackFrames . stack [ 2 ] , { url : 'http://localhost:8000/ExceptionLab.html' , func : '<anonymous function>' , args : [ 'event ' ] , line : 1 , column : 0 } ) ;
190
+ assert . deepEqual ( stackFrames . stack [ 0 ] , { url : 'http://localhost:8000/ExceptionLab.html' , func : '<anonymous function>' , args : [ '[arguments not available] ' ] , line : 48 , column : null } ) ;
191
+ assert . deepEqual ( stackFrames . stack [ 1 ] , { url : 'http://localhost:8000/ExceptionLab.html' , func : 'dumpException3' , args : [ '[arguments not available]' ] , line : 46 , column : null } ) ;
192
+ assert . deepEqual ( stackFrames . stack [ 2 ] , { url : 'http://localhost:8000/ExceptionLab.html' , func : '<anonymous function>' , args : [ '[arguments not available] ' ] , line : 1 , column : null } ) ;
255
193
} ) ;
256
194
257
195
it ( 'should parse Opera 25 error' , function ( ) {
0 commit comments