Backed out changeset c06d65b1674a (bug 806736) because of test failures, a=me CLOSED TREE
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 17 Jan 2013 15:45:45 -0500
changeset 127161 1292047d5d18b50a60b29cc4038e9dca0753fbef
parent 127160 12f52471747dcff1059b90bd0c0dd5c158a13df7
child 127162 76b9e934a0fcaca4d9164d844a1adfeed51985a5
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs806736
milestone20.0a2
backs outc06d65b1674a2a9b5f7b9dda354e63024e0e6b2c
Backed out changeset c06d65b1674a (bug 806736) because of test failures, a=me CLOSED TREE
testing/mochitest/android.json
toolkit/components/passwordmgr/test/Makefile.in
toolkit/components/passwordmgr/test/privbrowsing_perwindowpb_iframe.html
toolkit/components/passwordmgr/test/test_privbrowsing_perwindowpb.html
--- a/testing/mochitest/android.json
+++ b/testing/mochitest/android.json
@@ -301,17 +301,16 @@
  "toolkit/components/passwordmgr/test/test_master_password.html": "TIMED_OUT",
  "toolkit/components/passwordmgr/test/test_maxforms_1.html": "TIMED_OUT",
  "toolkit/components/passwordmgr/test/test_maxforms_2.html": "TIMED_OUT",
  "toolkit/components/passwordmgr/test/test_maxforms_3.html": "TIMED_OUT",
  "toolkit/components/passwordmgr/test/test_bug_627616.html": "TIMED_OUT",
  "toolkit/components/passwordmgr/test/test_master_password_cleanup.html": "",
  "toolkit/components/passwordmgr/test/test_notifications.html": "",
  "toolkit/components/passwordmgr/test/test_notifications_popup.html": "",
- "toolkit/components/passwordmgr/test/test_privbrowsing_perwindowpb.html": "",
  "toolkit/components/passwordmgr/test/test_prompt.html": "TIMED_OUT",
  "toolkit/components/passwordmgr/test/test_prompt_async.html": "TIMED_OUT",
  "toolkit/components/passwordmgr/test/test_xhr.html": "TIMED_OUT",
  "toolkit/components/passwordmgr/test/test_xml_load.html": "TIMED_OUT",
  "toolkit/components/places/tests/test_bug_411966.html": "RANDOM",
  "toolkit/components/prompts/test/test_bug620145.html": "TIMED_OUT",
  "toolkit/components/prompts/test/test_modal_prompts.html": "TIMED_OUT",
  "toolkit/components/prompts/test/test_modal_select.html": "TIMED_OUT",
--- a/toolkit/components/passwordmgr/test/Makefile.in
+++ b/toolkit/components/passwordmgr/test/Makefile.in
@@ -87,21 +87,15 @@ MOCHITEST_FILES += \
     test_privbrowsing.html \
     $(NULL)
 
 ifneq ($(OS_TARGET),Linux)
 MOCHITEST_FILES += \
     test_prompt.html \
     $(NULL)
 endif
-
-else
-MOCHITEST_FILES += \
-    privbrowsing_perwindowpb_iframe.html \
-    test_privbrowsing_perwindowpb.html \
-    $(NULL)
 endif
 
 # This test doesn't pass because we can't ensure a cross-platform
 # event that occurs between DOMContentLoaded and Pageload
 # test_bug_221634.html
 
 include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/toolkit/components/passwordmgr/test/privbrowsing_perwindowpb_iframe.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-</head>
-<body>
-<iframe id="iframe"></iframe>
-</body>
-</html>
deleted file mode 100644
--- a/toolkit/components/passwordmgr/test/test_privbrowsing_perwindowpb.html
+++ /dev/null
@@ -1,292 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=248970
--->
-<head>
-  <title>Test for Bug 248970</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="text/javascript" src="notification_common.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=248970">Mozilla Bug 248970</a>
-<p id="display"></p>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Bug 248970 **/
-// based on test_notifications.html
-
-netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-const Cr = Components.results;
-
-var testpath = document.location.pathname + "/../";
-var prefix = "http://test2.example.com" + testpath;
-var subtests = [
-                   "subtst_privbrowsing_1.html", // 1
-                   "subtst_privbrowsing_1.html", // 2
-                   "subtst_privbrowsing_1.html", // 3
-                   "subtst_privbrowsing_2.html", // 4
-                   "subtst_privbrowsing_2.html", // 5
-                   "subtst_privbrowsing_2.html", // 6
-                   "subtst_privbrowsing_3.html", // 7
-                   "subtst_privbrowsing_3.html", // 8
-                   "subtst_privbrowsing_4.html", // 9
-                   "subtst_privbrowsing_3.html" // 10
-               ];
-
-var testNum = 0;
-function loadNextTest() {
-  // run the initialization code for each test
-  switch (++ testNum) {
-    case 1:
-      popupNotifications = normalWindowPopupNotifications;
-      iframe = normalWindowIframe;
-      break;
-
-    case 2:
-      popupNotifications = privateWindowPopupNotifications;
-      iframe = privateWindowIframe;
-      break;
-
-    case 3:
-      popupNotifications = normalWindowPopupNotifications;
-      iframe = normalWindowIframe;
-      break;
-
-    case 4:
-      pwmgr.addLogin(login);
-      break;
-
-    case 5:
-      popupNotifications = privateWindowPopupNotifications;
-      iframe = privateWindowIframe;
-      break;
-
-    case 6:
-      popupNotifications = normalWindowPopupNotifications;
-      iframe = normalWindowIframe;
-      break;
-
-    case 7:
-      pwmgr.addLogin(login);
-      break;
-
-    case 8:
-      popupNotifications = privateWindowPopupNotifications;
-      iframe = privateWindowIframe;
-      break;
-
-    case 9:
-      break;
-
-    case 10:
-      popupNotifications = normalWindowPopupNotifications;
-      iframe = normalWindowIframe;
-      break;
-
-    default:
-      ok(false, "Unexpected call to loadNextTest for test #" + testNum);
-  }
-
-  ok(true, "Starting test #" + testNum);
-  iframe.src = prefix + subtests[testNum-1];
-}
-
-
-function checkTest() {
-  var popup;
-
-  switch (testNum) {
-    case 1:
-      // run outside of private mode, popup notification should appear
-      popup = getPopup(popupNotifications, "password-save");
-      ok(popup, "got popup notification");
-      popup.remove();
-      break;
-
-    case 2:
-      // run inside of private mode, popup notification should not appear
-      popup = getPopup(popupNotifications, "password-save");
-      ok(!popup, "checking for no popup notification");
-      break;
-
-    case 3:
-      // run outside of private mode, popup notification should appear
-      popup = getPopup(popupNotifications, "password-save");
-      ok(popup, "got popup notification");
-      popup.remove();
-      break;
-
-    case 4:
-      // run outside of private mode, popup notification should appear
-      popup = getPopup(popupNotifications, "password-change");
-      ok(popup, "got popup notification");
-      popup.remove();
-      break;
-
-    case 5:
-      // run inside of private mode, popup notification should not appear
-      popup = getPopup(popupNotifications, "password-change");
-      ok(!popup, "checking for no popup notification");
-      break;
-
-    case 6:
-      // run outside of private mode, popup notification should appear
-      popup = getPopup(popupNotifications, "password-change");
-      ok(popup, "got popup notification");
-      popup.remove();
-      pwmgr.removeLogin(login);
-      break;
-
-    case 7:
-      // verify that the user/pass pair was autofilled
-      var gotUser = iframe.contentDocument.getElementById("user").textContent;
-      var gotPass = iframe.contentDocument.getElementById("pass").textContent;
-      is(gotUser, "notifyu1", "Checking submitted username");
-      is(gotPass, "notifyp1", "Checking submitted password");
-      break;
-
-    case 8:
-      // verify that the user/pass pair was not autofilled
-      var gotUser = iframe.contentDocument.getElementById("user").textContent;
-      var gotPass = iframe.contentDocument.getElementById("pass").textContent;
-      is(gotUser, "", "Checking submitted username");
-      is(gotPass, "", "Checking submitted password");
-      break;
-
-    case 9:
-      // verify that the user/pass pair was available for autocomplete
-      var gotUser = iframe.contentDocument.getElementById("user").textContent;
-      var gotPass = iframe.contentDocument.getElementById("pass").textContent;
-      is(gotUser, "notifyu1", "Checking submitted username");
-      is(gotPass, "notifyp1", "Checking submitted password");
-      break;
-
-    case 10:
-      // verify that the user/pass pair was autofilled
-      var gotUser = iframe.contentDocument.getElementById("user").textContent;
-      var gotPass = iframe.contentDocument.getElementById("pass").textContent;
-      is(gotUser, "notifyu1", "Checking submitted username");
-      is(gotPass, "notifyp1", "Checking submitted password");
-      pwmgr.removeLogin(login);
-      break;
-
-    default:
-      ok(false, "Unexpected call to checkTest for test #" + testNum);
-
-  }
-}
-
-var mainWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
-                    .getInterface(Ci.nsIWebNavigation)
-                    .QueryInterface(Ci.nsIDocShellTreeItem)
-                    .rootTreeItem
-                    .QueryInterface(Ci.nsIInterfaceRequestor)
-                    .getInterface(Ci.nsIDOMWindow);
-var contentPage = "http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/privbrowsing_perwindowpb_iframe.html";
-var testWindows = [];
-var isAndroid = (navigator.appVersion.indexOf("Android") != -1);
-
-function testOnWindow(aIsPrivate, aCallback) {
-  if (isAndroid) {
-    var tab = mainWindow.BrowserApp.addTab(contentPage, {selected: true, isPrivate: aIsPrivate});
-    var selectedBrowser = tab.browser;
-    selectedBrowser.addEventListener("DOMContentLoaded", function onInnerLoad() {
-      selectedBrowser.removeEventListener("DOMContentLoaded", onInnerLoad, true);
-      SimpleTest.executeSoon(function() { aCallback(selectedBrowser); });
-    }, true);
-  } else {
-    var win = mainWindow.OpenBrowserWindow({private: aIsPrivate});
-    win.addEventListener("load", function onLoad() {
-      win.removeEventListener("load", onLoad, false);
-      win.addEventListener("DOMContentLoaded", function onInnerLoad() {
-        if (win.content.location.href == "about:privatebrowsing") {
-          win.gBrowser.loadURI(contentPage);
-          return;
-        }
-        win.removeEventListener("DOMContentLoaded", onInnerLoad, true);
-        win.gBrowser.selectedBrowser.focus();
-        testWindows.push(win);
-        SimpleTest.executeSoon(function() { aCallback(win.gBrowser.selectedBrowser); });
-      }, true);
-      SimpleTest.executeSoon(function() { win.gBrowser.loadURI(contentPage); });
-    }, true);
-  }
-}
-
-var ignoreLoad = false;
-function handleLoad(aEvent) {
-  // ignore every other load event ... We get one for loading the subtest (which
-  // we want to ignore), and another when the subtest's form submits itself
-  // (which we want to handle, to start the next test).
-  ignoreLoad = !ignoreLoad;
-  if (ignoreLoad) {
-    ok(true, "Ignoring load of subtest #" + testNum);
-    return;
-  }
-  ok(true, "Processing submission of subtest #" + testNum);
-
-  checkTest();
-
-  if (testNum < subtests.length) {
-    loadNextTest();
-  } else {
-    ok(true, "private browsing notification tests finished.");
-
-    testWindows.forEach(function(aWin) {
-      aWin.close();
-    });
-
-    SimpleTest.finish();
-  }
-}
-
-var pwmgr = Cc["@mozilla.org/login-manager;1"].
-            getService(Ci.nsILoginManager);
-ok(pwmgr != null, "Access pwmgr");
-
-// We need to make sure no logins have been stored by previous tests
-// for forms in |url|, otherwise the change password notification
-// would turn into a prompt, and the test will fail.
-var url = "http://test2.example.com";
-is(pwmgr.countLogins(url, "", null), 0, "No logins should be stored for " + url);
-
-var nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
-                                             Ci.nsILoginInfo, "init");
-var login = new nsLoginInfo(url, url, null, "notifyu1", "notifyp1", "user", "pass");
-
-var iframe;
-var normalWindowIframe;
-var privateWindowIframe;
-
-var popupNotifications;
-var normalWindowPopupNotifications;
-var privateWindowPopupNotifications;
-
-testOnWindow(false, function(aSelectedBrowser) {
-  normalWindowIframe = aSelectedBrowser.contentDocument.getElementById("iframe");
-  normalWindowIframe.onload = handleLoad;
-
-  normalWindowPopupNotifications = getPopupNotifications(aSelectedBrowser.contentWindow.top);
-  ok(normalWindowPopupNotifications, "Got popupNotifications in normal window");
-
-  testOnWindow(true, function(aPrivateSelectedBrowser) {
-    privateWindowIframe = aPrivateSelectedBrowser.contentDocument.getElementById("iframe");
-    privateWindowIframe.onload = handleLoad;
-
-    privateWindowPopupNotifications = getPopupNotifications(aPrivateSelectedBrowser.contentWindow.top);
-    ok(privateWindowPopupNotifications, "Got popupNotifications in private window");
-
-    loadNextTest();
-  });
-});
-
-SimpleTest.waitForExplicitFinish();
-</script>
-</pre>
-</body>
-</html>