js/src/jit-test/tests/debug/Source-surfaces.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/debug/Source-surfaces.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,33 @@
     1.4 +// Debugger.Source.prototype
     1.5 +
     1.6 +load(libdir + 'asserts.js');
     1.7 +
     1.8 +assertThrowsInstanceOf(function () {
     1.9 +    Debugger.Source.prototype.text.call(42)
    1.10 +}, TypeError);
    1.11 +assertThrowsInstanceOf(function () {
    1.12 +    Debugger.Source.prototype.text.call({})
    1.13 +}, TypeError);
    1.14 +assertThrowsInstanceOf(function () {
    1.15 +    Debugger.Source.prototype.text.call(Debugger.Source.prototype)
    1.16 +}, TypeError);
    1.17 +
    1.18 +assertThrowsInstanceOf(function () {
    1.19 +    Debugger.Source.prototype.element.call(42)
    1.20 +}, TypeError);
    1.21 +assertThrowsInstanceOf(function () {
    1.22 +    Debugger.Source.prototype.element.call({})
    1.23 +}, TypeError);
    1.24 +assertThrowsInstanceOf(function () {
    1.25 +    Debugger.Source.prototype.element.call(Debugger.Source.prototype)
    1.26 +}, TypeError);
    1.27 +
    1.28 +assertThrowsInstanceOf(function () {
    1.29 +    Debugger.Source.prototype.elementAttributeName.call(42)
    1.30 +}, TypeError);
    1.31 +assertThrowsInstanceOf(function () {
    1.32 +    Debugger.Source.prototype.elementAttributeName.call({})
    1.33 +}, TypeError);
    1.34 +assertThrowsInstanceOf(function () {
    1.35 +    Debugger.Source.prototype.elementAttributeName.call(Debugger.Source.prototype)
    1.36 +}, TypeError);

mercurial