michael@0: /* vim:set ts=2 sw=2 sts=2 et: */ michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ michael@0: */ michael@0: michael@0: // Tests that console.dir works as intended. michael@0: michael@0: function test() { michael@0: addTab("data:text/html;charset=utf-8,Web Console test for bug 659907: Expand console " + michael@0: "object with a dir method"); michael@0: browser.addEventListener("load", function onLoad(aEvent) { michael@0: browser.removeEventListener(aEvent.type, onLoad, true); michael@0: openConsole(null, consoleOpened); michael@0: }, true); michael@0: } michael@0: michael@0: function consoleOpened(hud) { michael@0: hud.jsterm.execute("console.dir(document)"); michael@0: hud.jsterm.once("variablesview-fetched", testConsoleDir.bind(null, hud)); michael@0: } michael@0: michael@0: function testConsoleDir(hud, ev, view) { michael@0: findVariableViewProperties(view, [ michael@0: { name: "__proto__.__proto__.querySelectorAll", value: "querySelectorAll()" }, michael@0: { name: "location", value: /Location \u2192 data:Web/ }, michael@0: { name: "__proto__.write", value: "write()" }, michael@0: ], { webconsole: hud }).then(finishTest); michael@0: }