blob: fd6ceb1031d76ea8c51f8d4c80d1c86c6e761e7a [file] [log] [blame]
// Passing bad query properties to Debugger.prototype.findScripts throws.
load(libdir + 'asserts.js');
var dbg = new Debugger();
var g = newGlobal();
assertThrowsInstanceOf(() => dbg.findObjects({ class: null }), TypeError);
assertThrowsInstanceOf(() => dbg.findObjects({ class: true }), TypeError);
assertThrowsInstanceOf(() => dbg.findObjects({ class: 1337 }), TypeError);
assertThrowsInstanceOf(() => dbg.findObjects({ class: /re/ }), TypeError);
assertThrowsInstanceOf(() => dbg.findObjects({ class: {} }), TypeError);