Bug 1122225 - Update tests for changed flow. r=ally
authorChenxia Liu <liuche@mozilla.com>
Tue, 17 Mar 2015 10:25:36 -0700
changeset 263728 b66daf0d64cfcfc1bbf63949610b534bf1c9e88a
parent 263727 1ce28de7d4e9b364cf89824cf10505cc3a3c1d5f
child 263729 eca6911ffb55f37dc77ef83f27c45130bdca539a
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersally
bugs1122225
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1122225 - Update tests for changed flow. r=ally
mobile/android/base/tests/testAboutPasswords.js
--- a/mobile/android/base/tests/testAboutPasswords.js
+++ b/mobile/android/base/tests/testAboutPasswords.js
@@ -58,44 +58,12 @@ add_test(function test_passwords_list() 
   let logins_list = browser.contentDocument.getElementById("logins-list");
 
   let hostname = logins_list.querySelector(".hostname");
   do_check_eq(hostname.textContent, LOGIN_FIELDS.hostname);
 
   let username = logins_list.querySelector(".username");
   do_check_eq(username.textContent, LOGIN_FIELDS.username);
 
-  let login_item = browser.contentDocument.querySelector("#logins-list > .login-item");
-  browser.addEventListener("PasswordsDetailsLoad", function() {
-    browser.removeEventListener("PasswordsDetailsLoad", this, false);
-    Services.tm.mainThread.dispatch(run_next_test, Ci.nsIThread.DISPATCH_NORMAL);
-  }, false);
-
-  // Expand item details.
-  login_item.click();
-});
-
-add_test(function test_passwords_details() {
-  let login_details = browser.contentDocument.getElementById("login-details");
-
-  let hostname = login_details.querySelector(".hostname");
-  do_check_eq(hostname.textContent, LOGIN_FIELDS.hostname);
-  let username = login_details.querySelector(".username");
-  do_check_eq(username.textContent, LOGIN_FIELDS.username);
-
-  // Check that details page opens link to host.
-  BrowserApp.deck.addEventListener("TabOpen", (tabevent) => {
-    // Wait for tab to finish loading.
-    let browser_target = tabevent.target;
-    browser_target.addEventListener("load", () => {
-      browser_target.removeEventListener("load", this, true);
-
-      do_check_eq(BrowserApp.selectedTab.browser.currentURI.spec, LOGIN_FIELDS.hostname);
-      Services.tm.mainThread.dispatch(run_next_test, Ci.nsIThread.DISPATCH_NORMAL);
-    }, true);
-
-    BrowserApp.deck.removeEventListener("TabOpen", this, false);
-  }, false);
-
-  browser.contentDocument.getElementById("details-header").click();
+  run_next_test();
 });
 
 run_next_test();