test/script/basic/NASHORN-296.js

Print this page

        

*** 31,41 **** function test(name) { try { load({ script: 'throw new Error()', name: name }); } catch(e) { // normalize windows path separator to URL style ! var actual = e.stack[0].fileName; if (actual !== name) { fail("expected file name to be " + name + ", actually got file name " + actual); } } --- 31,41 ---- function test(name) { try { load({ script: 'throw new Error()', name: name }); } catch(e) { // normalize windows path separator to URL style ! var actual = e.getStackTrace()[0].fileName; if (actual !== name) { fail("expected file name to be " + name + ", actually got file name " + actual); } }
*** 46,53 **** // test filename without file:/ prefix try { throw new Error(); } catch (e) { ! test(e.stack[0].fileName.substring(6)); } --- 46,53 ---- // test filename without file:/ prefix try { throw new Error(); } catch (e) { ! test(e.getStackTrace()[0].fileName.substring(6)); }