Bug 532677 - browser_preferences_text.js failure [r=mfinkle]
authorVivien Nicolas <21@vingtetun.org>
Tue, 24 Aug 2010 17:56:32 +0200
changeset 66481 94d2203a73c758146875947ef958c170e0db7f41
parent 66480 536eb80129b441c1a3d2503608b0ceff3e7bc5b3
child 66482 e00dc89e95c966d161eeba98fb43997ad04e2e95
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs532677
Bug 532677 - browser_preferences_text.js failure [r=mfinkle]
mobile/chrome/tests/browser_preferences_text.js
--- a/mobile/chrome/tests/browser_preferences_text.js
+++ b/mobile/chrome/tests/browser_preferences_text.js
@@ -1,37 +1,37 @@
 // Bug 571866 - --browser-chrome test for fennec preferences and text values
 
 var gTests = [];
 var gCurrentTest = null;
 var expected = {
   "aboutButton": {"label": "Go to Page", "tagName": "button", "value": "About Fennec", "element_id": "prefs-about-button"},
   "homepage": {"element_id": "prefs-homepage", "value": "Start page", "label": "Fennec Start",
-                    "home_page": "prefs-homepage-default", "home_page_label": "Fennec Start", 
+                    "home_page": "prefs-homepage-default", "home_page_label": "Fennec Start",
                     "blank_page": "prefs-homepage-none", "blank_page_label": "Blank Page",
                     "current_page": "prefs-homepage-currentpage", "current_page_label": "Use Current Page"},
   "doneButton": {"label": "Done", "tagName": "button"},
   "contentRegion": {"element_id": "prefs-content", "label": "Content"},
   "imageRegion": {"pref": "permissions.default.image", "value": "Show images", "anonid": "input", "localName": "checkbox"},
   "jsRegion": {"pref": "javascript.enabled", "value": "Enable JavaScript", "anonid": "input", "localName": "checkbox"},
   "privacyRegion": {"element_id": "prefs-privacy", "label": "Privacy & Security"},
   "cookiesRegion": {"pref": "network.cookie.cookieBehavior",  "value": "Allow cookies", "anonid": "input", "localName": "checkbox"},
   "passwordsRegion": {"pref": "signon.rememberSignons", "value": "Remember passwords", "anonid": "input", "localName": "checkbox"},
   "clearDataButton": {"value": "Clear private data", "element_id": "prefs-clear-data", "label": "Clear", "tagName": "button"}
 };
 
 function getPreferencesElements() {
-   var prefElements = {};
+   let prefElements = {};
    prefElements.panelOpen = document.getElementById("tool-panel-open");
    prefElements.panelClose = document.getElementById("tool-panel-close");
    prefElements.panelContainer = document.getElementById("panel-container");
    prefElements.homeButton = document.getElementById("prefs-homepage-options");
    prefElements.doneButton = document.getElementById("select-buttons-done");
    prefElements.homePageControl = document.getElementById("prefs-homepage");
-   prefElements.selectContainer = document.getElementById("select-container");
+   prefElements.selectContainer = document.getElementById("menulist-container");
    return prefElements;
 }
 
 function getHeight(element){
   let style = window.getComputedStyle(element, null);
   return style.height;
 }
 
@@ -91,17 +91,17 @@ gTests.push({
     let homepage = expected.homepage;
     var homepageRegion = document.getElementById(homepage.element_id);
     var homepageLabel = document.getAnonymousElementByAttribute(homepageRegion, "class", "preftitle");
     is(homepageLabel.value, homepage.value, "Label Text for Start Page");
     is(prefs.homeButton.label, homepage.label, "The text on the homepage label must be Fennec Start");
     prefs.homeButton.click();
 
     is(prefs.selectContainer.hidden, false, "Homepage select dialog must be visible");
-    is(document.getElementById(homepage.home_page).label, 
+    is(document.getElementById(homepage.home_page).label,
        homepage.home_page_label, " First option is Fennec Start");
     is(document.getElementById(homepage.blank_page).label,
       homepage.blank_page_label, " Second option is Blank page");
     is(document.getElementById(homepage.current_page).label,
       homepage.current_page_label, " First option is Custom page");
 
     let doneButton = expected.doneButton;
     is(prefs.doneButton.label, doneButton.label, "The text for the Done button");