Bug 614561 - pprint() does not take string arguments any more; r=gavin.sharp approval2.0=gavin.sharp

This commit is contained in:
Rob Campbell 2010-12-02 06:50:28 -04:00
Родитель 36f3192cf5
Коммит 3e20749df4
2 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -707,7 +707,11 @@ function createAndAppendElement(aParent, aTag, aAttributes)
function unwrap(aObject) function unwrap(aObject)
{ {
return XPCNativeWrapper.unwrap(aObject); try {
return XPCNativeWrapper.unwrap(aObject);
} catch(e) {
return aObject;
}
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -137,5 +137,11 @@ function testJSTerm()
let labels = jsterm.outputNode.querySelectorAll(".jsterm-output-line"); let labels = jsterm.outputNode.querySelectorAll(".jsterm-output-line");
ok(labels.length, "more than 0 lines of output for keys(window)"); ok(labels.length, "more than 0 lines of output for keys(window)");
jsterm.clearOutput();
jsterm.execute("pprint('hi')");
// Doesn't conform to checkResult format, bug 614561
let label = jsterm.outputNode.querySelector(".jsterm-output-line");
is(label.textContent.trim(), '0: "h"\n 1: "i"', 'pprint("hi") worked');
finishTest(); finishTest();
} }