Closed Bug 479920 Opened 16 years ago Closed 11 years ago

Running the CAPS test in mozmill generates an exception

Categories

(Thunderbird :: Message Reader UI, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: Usul, Unassigned)

References

()

Details

Trying to run the liked test case in mozmill generates the following exception. fail :: undefined +exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgFolder.getChildNamed]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///C:/Users/wsm0/AppData/Roaming/Thunderbird/Profiles/4jc4urc0.default/extensions/mozmill@mozilla.com/resource/modules/frame.js -> file:///C:/test-msg-content-policy.js :: test_jsContentPolicy :: line 203" data: no]test: function test_jsContentPolicy() { dump("test_jsContentPolicy() starting\n"); mainWindow.ClearMessagePane(); MC.sleep(10000); var localTestFolder = ensureFreshTestFolder(); var inbox = localRootFolder.getChildNamed("Inbox"); mainWindow.gFolderTreeView.selectFolder(inbox); mainWindow.gFolderTreeView.selectFolder(localTestFolder); MC.sleep(10000); checkJsInMail(localTestFolder); checkJsInNonMessageContent(); checkJsInMail(localTestFolder); checkJsInNonMessageContent(); dump("finished test_jsContentPolicy()\n"); }
Mikeal has a response to this at the mozmill-dev google groups: " This is an exception in the actual test code and isn't related to the framework at all so I can't really be of much help :( One thing I would say is that it's safer to put the controller creation in a setupModule in case a test that gets run before this one decides to close and then reopen the main window. If it does then MC won't have a valid window anymore. http://code.google.com/p/mozmill/wiki/MozMillTestBasics But this failure isn't related to MC at all. Line 203 in your test is causing: Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgFolder.getChildNamed]" nsresult: "0x80004005 (NS_ERROR_FAILURE) -Mikeal " http://groups.google.com/group/mozmill-dev/browse_thread/thread/45c7f2e4edaaae9f#msg_a299a0056fc00c05 === An example of the setupModule he mentions can be written as: var setupModule = function(module) { module.mainController = mozmill.getMail3PaneController(); } Also, usually for consistency across mozmill tests, if a local folder is required, this chunk of code should be added and uncommented: // Create a local account to work with folders. // (Note this gives you an Outbox and Trash folder by default). //const Ci = Components.interfaces; // let am = Components.classes["@mozilla.org/messenger/account-manager;1"] // .getService(Ci.nsIMsgAccountManager); // am.createLocalMailAccount(); (place it right after resource definitions of mozmill, controller, etc. at the top)
While checking the source I noticed that simply the folder cannot be found: http://mxr.mozilla.org/comm-central/source/mailnews/base/util/nsMsgDBFolder.cpp#2912 You should check why your Inbox gets deleted... Henrik
Assignee: dmose → nobody
Usul, do you still see this problem? The test file in the link doesn't seem to exist anymore. It looks like it could have been renamed to https://hg.mozilla.org/comm-central/file/55427f943059/mail/test/mozmill/content-policy/test-js-content-policy.js . But in the full log of mozmill on the tryserver I see no such exception at this test.
Flags: needinfo?(ludovic)
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(ludovic)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.