Home | History | Annotate | Download | only in resources
      1 description(
      2 "This test checks that line numbers are correctly reported for both inline scripts and inline event handlers."
      3 );
      4 
      5 function getLineFromError(e)
      6 {
      7     // JSC
      8     if (e.line)
      9         return e.line;
     10 
     11     // V8
     12     if (e.stack) {
     13         // ErrorName: ErrorDescription at FileName:LineNumber:ColumnNumber
     14         parts = e.stack.split(":");
     15         return parts[parts.length - 2];
     16     }
     17 
     18     return -1;
     19 }
     20 
     21 function assertErrorOnLine(error, expectedLine)
     22 {
     23     shouldBe(stringify(getLineFromError(error)), stringify(expectedLine));
     24 }
     25 
     26 var successfullyParsed = true;
     27