Bug 626358: No loading indicator anymore on Get Addons pane. r=dtownsend, a=blocks-final
authorBlair McBride <bmcbride@mozilla.com>
Thu, 20 Jan 2011 13:47:37 -0800
changeset 61082 dbe700a4db442e49e7f79d6fc584f74b36576d04
parent 61081 40b7e12784d5ba27151b6b2f4ca72b79d55b50f2
child 61083 ea3a3ca326ee7b1cf907a87afc98727a3557e592
push idunknown
push userunknown
push dateunknown
reviewersdtownsend, blocks-final
bugs626358
milestone2.0b10pre
Bug 626358: No loading indicator anymore on Get Addons pane. r=dtownsend, a=blocks-final
toolkit/mozapps/extensions/content/extensions.xul
toolkit/mozapps/extensions/test/browser/browser_discovery.js
--- a/toolkit/mozapps/extensions/content/extensions.xul
+++ b/toolkit/mozapps/extensions/content/extensions.xul
@@ -248,20 +248,20 @@
                     class="category"
                     name="&view.recentUpdates.label;"
                     tooltiptext="&view.recentUpdates.label;" disabled="true"/>
     </richlistbox>
 
     <box id="view-port-container" flex="1">
 
       <!-- view port -->
-      <deck id="view-port" flex="1">
+      <deck id="view-port" flex="1" selectedIndex="0">
 
         <!-- discover view -->
-        <deck id="discover-view" flex="1" class="view-pane">
+        <deck id="discover-view" flex="1" class="view-pane" selectedIndex="0">
           <vbox id="discover-loading" align="center" pack="stretch" flex="1" class="alert-container">
             <spacer class="alert-spacer-before"/>
             <hbox class="alert loading" align="center">
               <image/>
               <label value="&loading.label;"/>
             </hbox>
             <spacer class="alert-spacer-after"/>
           </vbox>
--- a/toolkit/mozapps/extensions/test/browser/browser_discovery.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_discovery.js
@@ -136,18 +136,23 @@ function testHash(aBrowser, aCallback) {
       is(addonData.isCompatible, aAddon.isCompatible, "isCompatible should be correct");
     });
 
     aCallback();
   });
 }
 
 function isLoading() {
-  return gManagerWindow.document.getElementById("discover-view").selectedPanel ==
-         gManagerWindow.document.getElementById("discover-loading");
+  var loading = gManagerWindow.document.getElementById("discover-view").selectedPanel ==
+                gManagerWindow.document.getElementById("discover-loading");
+  if (loading) {
+    is_element_visible(gManagerWindow.document.querySelector("#discover-loading .loading"),
+                       "Loading message should be visible when its panel is the selected panel");
+  }
+  return loading;
 }
 
 function isError() {
   return gManagerWindow.document.getElementById("discover-view").selectedPanel ==
          gManagerWindow.document.getElementById("discover-error");
 }
 
 function clickLink(aId, aCallback) {