rem: function(err) { /* we added the errback before the setTimeout() in callRemote() fired, so it won't get the error */ 
add: function(widget) { self.assertEqual(Nevow.Athena.Widget.get(widget.node), widget); self.assertEqual(widget.widgetParent, self); self.assertEqual(self.childWidgets[self.childWidgets.length - 1], widget); 
context:             function(err) {                /* we added the errback before the setTimeout()                   in callRemote() fired, so it won't get the error */                self.assertEquals(getDialogs().length, 0);                var D = self.callRemote("raiseValueError");                /* we make another deferred to return from this method                   because the test machinery will add callbacks to D,                   which will get run before athena adds the errback,                   resulting in a test failure */                var waitD = Divmod.Defer.Deferred();                /* setTimeout() the callback-adding, because we want                   the callback to run after athena has added the                   error dialog errback to the callRemote() deferred */                setTimeout(function() {                    D.addCallback(                        function() {                            var dialogs = getDialogs();                            if(dialogs.length == 1) {                                document.body.removeChild(dialogs[0]);                                waitD.callback(null);                            } else {                                waitD.errback(                                    new Error("expected 1 dialog, got " + dialogs.length));                            }                        });                    }, 0);                return waitD;            });
meta: 1565	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1565/a5cbbbdebfecdc9f9474921f401a9a296b9f8353/__init__.js/clean/nevow/js/Nevow/Athena/Tests/__init__.js