merge
authorDão Gottwald <dao@mozilla.com>
Thu, 12 Mar 2009 14:45:00 +0100
changeset 26099 6f6d4702729743491ffd34b9906d160dc43ef21e
parent 26097 13826ed071693f31f714d4be07df3be4098fc6b7 (current diff)
parent 26098 87948ecedc84b4315899303392cc10ed435c7eef (diff)
child 26100 27cbf8dd3fbadc214fc2bbac0086f8a07c8acca2
push id5898
push userdgottwald@mozilla.com
push dateThu, 12 Mar 2009 13:45:40 +0000
treeherdermozilla-central@6f6d47027297 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.2a1pre
merge
browser/base/content/test/browser_overflowScroll.js
--- a/browser/base/content/test/Makefile.in
+++ b/browser/base/content/test/Makefile.in
@@ -94,17 +94,16 @@ include $(topsrcdir)/config/rules.mk
                  browser_bug386835.js \
                  dummy_page.html \
                  browser_bug422590.js \
                  browser_sanitize-sitepermissions.js \
                  browser_bug356571.js \
                  browser_sanitize-passwordDisabledHosts.js \
                  browser_bug479408.js \
                  browser_bug479408_sample.html \
-                 browser_overflowScroll.js \
     $(NULL)
 
 ifeq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
 _BROWSER_FILES += browser_bug462289.js
 else
 _BROWSER_FILES += browser_customize.js
 endif
 
deleted file mode 100644
--- a/browser/base/content/test/browser_overflowScroll.js
+++ /dev/null
@@ -1,56 +0,0 @@
-const tabContainer = gBrowser.tabContainer;
-const tabStrip = tabContainer.mTabstrip;
-
-function runOverflowTests(aEvent) {
-
-  if (aEvent.detail != 1)
-    return;
-  tabStrip.removeEventListener("overflow", runOverflowTests, false);
-  var firstTab = tabContainer.firstChild;
-  var lastTab = tabContainer.lastChild;
-  var upButton = tabStrip._scrollButtonUp;
-  var upButtonRect = upButton.getBoundingClientRect();
-  var downButton = tabStrip._scrollButtonDown;
-  var downButtonRect = downButton.getBoundingClientRect();
-
-  tabStrip.ensureElementIsVisible(firstTab);
-  var rect = firstTab.getBoundingClientRect();
-  is(rect.left, upButtonRect.right, "Tab should scroll into view");
-  tabStrip.scrollByIndex(1);
-  rect = lastTab.getBoundingClientRect();
-  is(rect.right, downButtonRect.left, "Tab should scroll into view");
-  var element = tabStrip._elementFromPoint(upButtonRect.right);
-  if (element.getBoundingClientRect().left == upButtonRect.right)
-    element = element.previousSibling;
-  EventUtils.synthesizeMouse(upButton, 0, 0, {clickCount: 1});
-  rect = element.getBoundingClientRect();
-  is(rect.left, upButtonRect.right, "One tab should have been scrolled");
-  EventUtils.synthesizeMouse(upButton, 0, 0, {clickCount: 2});
-  EventUtils.synthesizeMouse(upButton, 0, 0, {clickCount: 3, detail: 3, originalTarget: upButton});
-  rect = firstTab.getBoundingClientRect();
-  is(rect.left, upButtonRect.right, "Tabs should scroll to start");
-  element = tabStrip._elementFromPoint(rect.left);
-  ok(element == firstTab, "_elementFromPoint should recognize the tabs");
-
-  while (tabContainer.childNodes.length > 1)
-    gBrowser.removeTab(tabContainer.lastChild);
-
-  finish();
-}
-
-function test() {
-  waitForExplicitFinish();
-
-  tabStrip.smoothScroll = false;
-  let tabMinWidth = Components.classes['@mozilla.org/preferences-service;1']
-                              .getService(Components.interfaces.nsIPrefBranch2)
-                              .getIntPref("browser.tabs.tabMinWidth");
-  var tabCountForOverflow =
-    Math.floor(tabStrip.getBoundingClientRect().width / tabMinWidth);
-  while (tabContainer.childNodes.length < tabCountForOverflow)
-    gBrowser.addTab();
-  gBrowser.addTab();
-  gBrowser.selectedTab = tabContainer.lastChild.previousSibling;
-
-  tabStrip.addEventListener("overflow", runOverflowTests, false);
-}