Bug 560741 - Add tests for TB2 to TB3 migration. r=asuth, a=blocking-tb3.1
authorBlake Winton <bwinton@latte.ca>
Tue, 11 May 2010 15:39:58 -0400
changeset 5647 3dcef10a2f4d
parent 5646 265623017726
child 5648 ef1c30b97714
push id4379
push userbwinton@latte.ca
push date2010-05-11 19:45 +0000
treeherdercomm-central@3dcef10a2f4d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth, blocking-tb3
bugs560741
Bug 560741 - Add tests for TB2 to TB3 migration. r=asuth, a=blocking-tb3.1
mail/test/mozmill/migration-from-tb2/localstore.rdf
mail/test/mozmill/migration-from-tb2/prefs.js
mail/test/mozmill/migration-from-tb2/test-1-introduction.js
mail/test/mozmill/migration-from-tb2/wrapper.py
mail/test/mozmill/mozmilltests.list
new file mode 100644
--- /dev/null
+++ b/mail/test/mozmill/migration-from-tb2/localstore.rdf
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
+         xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#threadTree"
+                   lastfoldersent="false" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#statusCol"
+                   ordinal="19" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#idCol"
+                   ordinal="33" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#flaggedCol"
+                   ordinal="3" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul">
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#threadCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#attachmentCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#flaggedCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#subjectCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#unreadButtonColHeader"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#senderCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#recipientCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#junkStatusCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#dateCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#statusCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#sizeCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#tagsCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#accountCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#priorityCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#unreadCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#totalCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#idCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#messengerWindow"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#folderUnreadCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#folderTotalCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#folderSizeCol"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#threadTree"/>
+    <NC:persist RDF:resource="chrome://messenger/content/messenger.xul#msgHeaderViewDeck"/>
+  </RDF:Description>
+  <RDF:Description RDF:about="chrome://messenger/content/preferences/preferences.xul#MailPreferences"
+                   screenX="439"
+                   screenY="221"
+                   lastSelected="paneAdvanced" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#tagsCol"
+                   ordinal="23" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#recipientCol"
+                   ordinal="13"
+                   hidden="true"
+                   swappedhidden="false" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#accountCol"
+                   ordinal="25" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#folderTotalCol"
+                   hidden="true" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#junkStatusCol"
+                   ordinal="15" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#senderCol"
+                   ordinal="11"
+                   width="230"
+                   hidden="false"
+                   swappedhidden="true" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#messengerWindow"
+                   width="1112"
+                   height="702"
+                   sizemode="normal"
+                   screenX="267"
+                   screenY="77" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#priorityCol"
+                   ordinal="27" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#dateCol"
+                   ordinal="17"
+                   width="146" />
+  <RDF:Description RDF:about="chrome://messenger/content/AccountManager.xul#accountManager"
+                   screenX="225"
+                   screenY="22" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#folderUnreadCol"
+                   hidden="true" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#msgHeaderViewDeck"
+                   selectedIndex="0" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#unreadCol"
+                   ordinal="29" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#subjectCol"
+                   ordinal="7"
+                   width="371" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#unreadButtonColHeader"
+                   ordinal="9" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#totalCol"
+                   ordinal="31" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#folderSizeCol"
+                   hidden="true" />
+  <RDF:Description RDF:about="chrome://messenger/content/AccountManager.xul">
+    <NC:persist RDF:resource="chrome://messenger/content/AccountManager.xul#accountManager"/>
+  </RDF:Description>
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#sizeCol"
+                   ordinal="21"
+                   hidden="false"
+                   width="53" />
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#attachmentCol"
+                   ordinal="5" />
+  <RDF:Description RDF:about="chrome://messenger/content/preferences/preferences.xul">
+    <NC:persist RDF:resource="chrome://messenger/content/preferences/preferences.xul#MailPreferences"/>
+  </RDF:Description>
+  <RDF:Description RDF:about="chrome://messenger/content/messenger.xul#threadCol"
+                   ordinal="1" />
+</RDF:RDF>
new file mode 100644
--- /dev/null
+++ b/mail/test/mozmill/migration-from-tb2/prefs.js
@@ -0,0 +1,103 @@
+# Mozilla User Preferences
+
+/* Do not edit this file.
+ *
+ * If you make changes to this file while the application is running,
+ * the changes will be overwritten when the application exits.
+ *
+ * To make a manual change to preferences, you can visit the URL about:config
+ * For more information, see http://www.mozilla.org/unix/customizing.html#prefs
+ */
+
+user_pref("app.update.lastUpdateTime.addon-background-update-timer", 1273257684);
+user_pref("app.update.lastUpdateTime.background-update-timer", 1273257684);
+user_pref("app.update.lastUpdateTime.blocklist-background-update-timer", 1273257684);
+user_pref("extensions.lastAppVersion", "2.0.0.24");
+user_pref("intl.charsetmenu.mailview.cache", "windows-1252, ISO-8859-1, UTF-8");
+user_pref("ldap_2.prefs_migrated", true);
+user_pref("ldap_2.servers.default.filename", "default.mab");
+user_pref("ldap_2.servers.default.replication.lastChangeNumber", 0);
+user_pref("ldap_2.servers.default.uri", "moz-abldapdirectory://default.mab");
+user_pref("ldap_2.servers.history.replication.lastChangeNumber", 0);
+user_pref("ldap_2.servers.pab.replication.lastChangeNumber", 0);
+user_pref("mail.account.account1.server", "server1");
+user_pref("mail.account.account2.identities", "id4");
+user_pref("mail.account.account2.server", "server2");
+user_pref("mail.accountmanager.accounts", "account1,account2");
+user_pref("mail.accountmanager.defaultaccount", "account2");
+user_pref("mail.accountmanager.localfoldersserver", "server1");
+user_pref("mail.attachment.store.version", 1);
+user_pref("mail.folder.views.version", 1);
+user_pref("mail.identity.id4.draft_folder", "imap://blaketestwinton@imap.gmail.com/Drafts");
+user_pref("mail.identity.id4.drafts_folder_picker_mode", "0");
+user_pref("mail.identity.id4.escapedVCard", "");
+user_pref("mail.identity.id4.fcc_folder", "imap://blaketestwinton@imap.gmail.com/Sent");
+user_pref("mail.identity.id4.fcc_folder_picker_mode", "0");
+user_pref("mail.identity.id4.fullName", "Blake Winton");
+user_pref("mail.identity.id4.organization", "");
+user_pref("mail.identity.id4.reply_to", "");
+user_pref("mail.identity.id4.smtpServer", "smtp2");
+user_pref("mail.identity.id4.stationery_folder", "imap://blaketestwinton@imap.gmail.com/Templates");
+user_pref("mail.identity.id4.tmpl_folder_picker_mode", "0");
+user_pref("mail.identity.id4.useremail", "blaketestwinton@gmail.com");
+user_pref("mail.identity.id4.valid", true);
+user_pref("mail.preferences.compose.selectedTabIndex", 2);
+user_pref("mail.preferences.display.selectedTabIndex", 1);
+user_pref("mail.preferences.privacy.selectedTabIndex", 3);
+user_pref("mail.root.imap", "AAAAAAHMAAIAAQxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADE+gKpSCsAAAGd9dkISW1hcE1haWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ32EMfg848AAAAAAAAAAP////8AAAkgAAAAAAAAAAAAAAAAAAAAFDFzaGNlbHhoLnRiMi1kZWZhdWx0ABAACAAAxPo66QAAABEACAAAx+ErzwAAAAEAGAGd9dkADiAPAA4gBwAKSrcACkq2AAB72AACAFVNYWNpbnRvc2ggSEQ6VXNlcnM6YndpbnRvbjpMaWJyYXJ5OlRodW5kZXJiaXJkOlByb2ZpbGVzOjFzaGNlbHhoLnRiMi1kZWZhdWx0OkltYXBNYWlsAAAOABIACABJAG0AYQBwAE0AYQBpAGwADwAaAAwATQBhAGMAaQBuAHQAbwBzAGgAIABIAEQAEgBIVXNlcnMvYndpbnRvbi9MaWJyYXJ5L1RodW5kZXJiaXJkL1Byb2ZpbGVzLzFzaGNlbHhoLnRiMi1kZWZhdWx0L0ltYXBNYWlsABMAAS8AABUAAgAO//8AAA==");
+user_pref("mail.root.imap-rel", "[ProfD]ImapMail");
+user_pref("mail.root.none", "AAAAAAG8AAIAAQxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADE+gKpSCsAAAGd9dkETWFpbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ32Ccfg848AAAAAAAAAAP////8AAAkgAAAAAAAAAAAAAAAAAAAAFDFzaGNlbHhoLnRiMi1kZWZhdWx0ABAACAAAxPo66QAAABEACAAAx+ErzwAAAAEAGAGd9dkADiAPAA4gBwAKSrcACkq2AAB72AACAFFNYWNpbnRvc2ggSEQ6VXNlcnM6YndpbnRvbjpMaWJyYXJ5OlRodW5kZXJiaXJkOlByb2ZpbGVzOjFzaGNlbHhoLnRiMi1kZWZhdWx0Ok1haWwAAA4ACgAEAE0AYQBpAGwADwAaAAwATQBhAGMAaQBuAHQAbwBzAGgAIABIAEQAEgBEVXNlcnMvYndpbnRvbi9MaWJyYXJ5L1RodW5kZXJiaXJkL1Byb2ZpbGVzLzFzaGNlbHhoLnRiMi1kZWZhdWx0L01haWwAEwABLwAAFQACAA7//wAA");
+user_pref("mail.root.none-rel", "[ProfD]Mail");
+user_pref("mail.root.pop3", "AAAAAAG8AAIAAQxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADE+gKpSCsAAAG+viQETWFpbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb6+eMgJ1KoAAAAAAAAAAP////8AAAkgAAAAAAAAAAAAAAAAAAAAFDFzaGNlbHhoLnRiMi1kZWZhdWx0ABAACAAAxPo66QAAABEACAAAyAoM6gAAAAEAGAG+viQADiAPAA4gBwAKSrcACkq2AAB72AACAFFNYWNpbnRvc2ggSEQ6VXNlcnM6YndpbnRvbjpMaWJyYXJ5OlRodW5kZXJiaXJkOlByb2ZpbGVzOjFzaGNlbHhoLnRiMi1kZWZhdWx0Ok1haWwAAA4ACgAEAE0AYQBpAGwADwAaAAwATQBhAGMAaQBuAHQAbwBzAGgAIABIAEQAEgBEVXNlcnMvYndpbnRvbi9MaWJyYXJ5L1RodW5kZXJiaXJkL1Byb2ZpbGVzLzFzaGNlbHhoLnRiMi1kZWZhdWx0L01haWwAEwABLwAAFQACAA7//wAA");
+user_pref("mail.root.pop3-rel", "[ProfD]Mail");
+user_pref("mail.server.server1.directory", "AAAAAAHeAAIAAQxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADE+gKpSCsAAAG+vngNTG9jYWwgRm9sZGVycwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb6+ecgJ1KoAAAAAAAAAAP////8AAAkgAAAAAAAAAAAAAAAAAAAABE1haWwAEAAIAADE+jrpAAAAEQAIAADICgzqAAAAAQAcAb6+eAG+viQADiAPAA4gBwAKSrcACkq2AAB72AACAF9NYWNpbnRvc2ggSEQ6VXNlcnM6YndpbnRvbjpMaWJyYXJ5OlRodW5kZXJiaXJkOlByb2ZpbGVzOjFzaGNlbHhoLnRiMi1kZWZhdWx0Ok1haWw6TG9jYWwgRm9sZGVycwAADgAcAA0ATABvAGMAYQBsACAARgBvAGwAZABlAHIAcwAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAFJVc2Vycy9id2ludG9uL0xpYnJhcnkvVGh1bmRlcmJpcmQvUHJvZmlsZXMvMXNoY2VseGgudGIyLWRlZmF1bHQvTWFpbC9Mb2NhbCBGb2xkZXJzABMAAS8AABUAAgAO//8AAA==");
+user_pref("mail.server.server1.directory-rel", "[ProfD]Mail/Local Folders");
+user_pref("mail.server.server1.hostname", "Local Folders");
+user_pref("mail.server.server1.name", "Local Folders");
+user_pref("mail.server.server1.type", "none");
+user_pref("mail.server.server1.userName", "nobody");
+user_pref("mail.server.server2.capability", 811553);
+user_pref("mail.server.server2.directory", "AAAAAAHuAAIAAQxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADE+gKpSCsAAAG+vjEOaW1hcC5nbWFpbC5jb20AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb6/KcgJ1ngAAAAAAAAAAP////8AAAkgAAAAAAAAAAAAAAAAAAAACEltYXBNYWlsABAACAAAxPo66QAAABEACAAAyAoOuAAAAAEAHAG+vjEBvr4kAA4gDwAOIAcACkq3AApKtgAAe9gAAgBkTWFjaW50b3NoIEhEOlVzZXJzOmJ3aW50b246TGlicmFyeTpUaHVuZGVyYmlyZDpQcm9maWxlczoxc2hjZWx4aC50YjItZGVmYXVsdDpJbWFwTWFpbDppbWFwLmdtYWlsLmNvbQAOAB4ADgBpAG0AYQBwAC4AZwBtAGEAaQBsAC4AYwBvAG0ADwAaAAwATQBhAGMAaQBuAHQAbwBzAGgAIABIAEQAEgBXVXNlcnMvYndpbnRvbi9MaWJyYXJ5L1RodW5kZXJiaXJkL1Byb2ZpbGVzLzFzaGNlbHhoLnRiMi1kZWZhdWx0L0ltYXBNYWlsL2ltYXAuZ21haWwuY29tAAATAAEvAAAVAAIADv//AAA=");
+user_pref("mail.server.server2.directory-rel", "[ProfD]ImapMail/imap.gmail.com");
+user_pref("mail.server.server2.download_on_biff", true);
+user_pref("mail.server.server2.hostname", "imap.gmail.com");
+user_pref("mail.server.server2.login_at_startup", true);
+user_pref("mail.server.server2.max_cached_connections", 5);
+user_pref("mail.server.server2.name", "blaketestwinton@gmail.com");
+user_pref("mail.server.server2.namespace.personal", "\"\"");
+user_pref("mail.server.server2.port", 993);
+user_pref("mail.server.server2.realhostname", "imap.googlemail.com");
+user_pref("mail.server.server2.socketType", 3);
+user_pref("mail.server.server2.type", "imap");
+user_pref("mail.server.server2.userName", "blaketestwinton");
+user_pref("mail.showFolderPaneColumns", true);
+user_pref("mail.smtp.defaultserver", "smtp2");
+user_pref("mail.smtpserver.smtp1.description", "Gmail");
+user_pref("mail.smtpserver.smtp1.hostname", "smtp.gmail.com");
+user_pref("mail.smtpserver.smtp1.port", 587);
+user_pref("mail.smtpserver.smtp1.try_ssl", 2);
+user_pref("mail.smtpserver.smtp1.username", "blaketestwinton");
+user_pref("mail.smtpserver.smtp2.description", "Gmail");
+user_pref("mail.smtpserver.smtp2.hostname", "smtp.gmail.com");
+user_pref("mail.smtpserver.smtp2.port", 587);
+user_pref("mail.smtpserver.smtp2.try_ssl", 2);
+user_pref("mail.smtpserver.smtp2.username", "mozillatest");
+user_pref("mail.smtpservers", "smtp2,smtp1");
+user_pref("mail.spam.version", 1);
+user_pref("mail.startup.enabledMailCheckOnce", true);
+user_pref("mailnews.quotingPrefs.version", 1);
+user_pref("mailnews.start_page_override.mstone", "1.8.1.24");
+user_pref("mailnews.tags.$label1.color", "#FF0000");
+user_pref("mailnews.tags.$label1.tag", "Important");
+user_pref("mailnews.tags.$label2.color", "#FF9900");
+user_pref("mailnews.tags.$label2.tag", "Work");
+user_pref("mailnews.tags.$label3.color", "#009900");
+user_pref("mailnews.tags.$label3.tag", "Personal");
+user_pref("mailnews.tags.$label4.color", "#3333FF");
+user_pref("mailnews.tags.$label4.tag", "To Do");
+user_pref("mailnews.tags.$label5.color", "#993399");
+user_pref("mailnews.tags.$label5.tag", "Later");
+user_pref("mailnews.tags.version", 2);
+user_pref("mailnews.ui.threadpane.version", 5);
+user_pref("pref.downloads.disable_button.edit_actions", false);
+user_pref("wallet.caveat", true);
new file mode 100644
--- /dev/null
+++ b/mail/test/mozmill/migration-from-tb2/test-1-introduction.js
@@ -0,0 +1,201 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ *   Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Thunderbird Mail Client.
+ *
+ * The Initial Developer of the Original Code is
+ * The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Blake Winton <bwinton@latte.ca>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ * Test that the migration assistant's introduction page works properly.
+ */
+
+var MODULE_NAME = "test-introduction";
+
+var RELATIVE_ROOT = "../shared-modules";
+var MODULE_REQUIRES = ["folder-display-helpers", "migration-helpers",
+                       "window-helpers"];
+
+function setupModule(module) {
+  let fdh = collector.getModule("folder-display-helpers");
+  fdh.installInto(module);
+  let mh = collector.getModule("migration-helpers");
+  mh.installInto(module);
+  let wh = collector.getModule("window-helpers");
+  wh.installInto(module);
+}
+
+/**
+ * Make sure the migration assistant, has opened automatically when we upgrade.
+ */
+function test_open_and_close_migration_assistant() {
+  // Ensure that the migration assistant is opened on upgrade.
+  let fc = wait_for_existing_window("mailnews:featureconfigurator");
+
+  // The first page should be the introduction page.
+  let content = fc.e("contentFrame");
+  url = content.getAttribute("src");
+  assert_true(url.indexOf("introduction") != -1,
+              "The first page (" + url + ") isn't the introduction page!");
+  check_introduction_page(fc);
+
+  // Move to the next page, which should be the autosync page.
+  fc.click(fc.eid("nextButton"));
+  url = content.getAttribute("src");
+  assert_true(url.indexOf("autosync") != -1,
+              "The second page (" + url + ") isn't the autosync page!");
+  check_autosync_page(fc);
+
+  // Move to the next page, which should be the toolbar page.
+  fc.click(fc.eid("nextButton"));
+  url = content.getAttribute("src");
+  assert_true(url.indexOf("toolbar") != -1,
+              "The third page (" + url + ") isn't the toolbar page!");
+  check_toolbar_page(fc);
+
+  // Move to the next page, which should be the compactheader page.
+  fc.click(fc.eid("nextButton"));
+  url = content.getAttribute("src");
+  assert_true(url.indexOf("compactheader") != -1,
+              "The fourth page (" + url + ") isn't the compactheader page!");
+  check_compactheader_page(fc);
+
+  // Move to the next page, which should be the folderpanecolumns page.
+  fc.click(fc.eid("nextButton"));
+  url = content.getAttribute("src");
+  assert_true(url.indexOf("folderpanecolumns") != -1,
+              "The fifth page (" + url + ") isn't the folderpanecolumns page!");
+  check_folderpanecolumns_page(fc);
+
+  // And finally, close the migration assistant.
+  close_migration_assistant(fc);
+}
+
+/**
+ * Make sure that the introductory page works correctly.
+ */
+function check_introduction_page(fc) {
+  // This should be the first page.
+  let prevButton = fc.e("prevButton");
+  assert_true(prevButton.disabled, "We can go back from the first page!");
+
+  // And there's not much more else on this page, so let's continue.
+}
+
+/**
+ * Make sure that the autosync page works correctly.
+ */
+function check_autosync_page(fc) {
+  // There should only be one account, for "blaketestwinton@gmail.com".
+  let as = get_subpage(fc);
+  let accountList = as.e("account_list");
+  assert_equals(accountList.childNodes.length, 1, "More than one account!");
+
+  // Single account should be set to synchronize.
+  let account = accountList.childNodes.item(0);
+  assert_equals(account.textContent, "blaketestwinton@gmail.com");
+  assert_equals(account.className, "button syncing");
+
+  // And because it's the only account, the all-sync radio button should be
+  // checked.
+  as.assertChecked(as.eid("all-sync"));
+  as.assertNotChecked(as.eid("none-sync"));
+  as.assertNotChecked(as.eid("some-sync"));
+}
+
+/**
+ * Make sure that the toolbar page works correctly.
+ */
+function check_toolbar_page(fc) {
+  // Toolbar radio buttons should be set to "Message Buttons Toolbar".
+  let tb = get_subpage(fc);
+  tb.assertChecked(tb.eid("toolbar-new"));
+  tb.assertNotChecked(tb.eid("toolbar-original"));
+}
+
+/**
+ * Make sure that the compactheader page works correctly.
+ */
+function check_compactheader_page(fc) {
+  // Compact header strong text should be shown.
+  let ch = get_subpage(fc);
+  assert_equals(get_display(ch, "weak"), "none",
+              "The weak message should not be displayed.");
+  assert_equals(get_display(ch, "strong"), "block",
+              "The strong message should be displayed.");
+
+  // Button to install should be shown.
+  assert_equals(get_display(ch, "addon-install-button"), "inline",
+              "The install button should be displayed.");
+  assert_equals(get_display(ch, "installing"), "none",
+              "The installing message should not be displayed.");
+  assert_equals(get_display(ch, "installed"), "none",
+              "The installed message should be displayed.");
+  assert_equals(get_display(ch, "alreadyInstalled"), "none",
+              "The already installed message should not be displayed.");
+}
+
+/**
+ * Make sure that the folderpanecolumns page works correctly.
+ */
+function check_folderpanecolumns_page(fc) {
+  // This should be the last page.
+  let nextButton = fc.e("nextButton");
+  assert_true(nextButton.disabled, "We can go forward from the last page!");
+
+  // Folder Pane strong text should be shown.
+  let fp = get_subpage(fc);
+  assert_equals(get_display(fp, "weak"), "none",
+              "The weak message should not be displayed.");
+  assert_equals(get_display(fp, "strong"), "block",
+              "The strong message should be displayed.");
+
+  // Button to install should be shown.
+  assert_equals(get_display(fp, "addon-install-button"), "inline",
+              "The install button should be displayed.");
+  assert_equals(get_display(fp, "installing"), "none",
+              "The installing message should not be displayed.");
+  assert_equals(get_display(fp, "installed"), "none",
+              "The installed message should be displayed.");
+  assert_equals(get_display(fp, "alreadyInstalled"), "none",
+              "The already installed message should not be displayed.");
+}
+
+
+// Utility functions.
+
+/**
+ * Get the value of the display property for the passed in element.
+ */
+function get_display(c, id) {
+  return c.window.getComputedStyle(c.e(id), null).getPropertyValue("display");
+}
new file mode 100644
--- /dev/null
+++ b/mail/test/mozmill/migration-from-tb2/wrapper.py
@@ -0,0 +1,55 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Thunderbird Mail Client.
+#
+# The Initial Developer of the Original Code is
+# the Mozilla Foundation.
+# Portions created by the Initial Developer are Copyright (C) 2010
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#   Blake Winton <bwinton@latte.ca>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+# For the test files in this directory, we need a TB2 profile --
+#   this module does that.
+
+import os
+import shutil
+import sys
+
+def on_before_start(profile):
+    # The pref file is in the same directory this script is in
+    preffile = os.path.join(os.path.dirname(__file__), "prefs.js")
+    print "Copying "+preffile+" to "+profile.profile
+    shutil.copy(preffile, profile.profile)
+
+    localstore = os.path.join(os.path.dirname(__file__), "localstore.rdf")
+    print "Copying "+localstore+" to "+profile.profile
+    shutil.copy(localstore, profile.profile)
+
+    os.unlink(os.path.join(profile.profile, "user.js"))
--- a/mail/test/mozmill/mozmilltests.list
+++ b/mail/test/mozmill/mozmilltests.list
@@ -6,9 +6,10 @@ content-policy
 content-tabs
 message-header
 folder-pane
 session-store
 pref-window
 folder-tree-modes
 quick-filter-bar
 migration
+migration-from-tb2
 account