author | Mark Capella <markcapella@twcny.rr.com> |
Thu, 25 Jul 2013 18:10:45 -0400 | |
changeset 143445 | aab022ea5da6a4e399ea3cb57848544b613239e1 |
parent 143444 | 022ec255724712582eaa302a2b7d0843d5b5942e |
child 143446 | 0bbf04dba6c5a958771fd5f2dbe36827f37d7bb5 |
push id | 25130 |
push user | lrocha@mozilla.com |
push date | Wed, 21 Aug 2013 09:41:27 +0000 |
treeherder | mozilla-central@b2486721572e [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | margaret |
bugs | 896576 |
milestone | 25.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
|
--- a/mobile/android/base/tests/BaseTest.java.in +++ b/mobile/android/base/tests/BaseTest.java.in @@ -531,22 +531,16 @@ abstract class BaseTest extends Activity return true; } return false; } /** * FIXME: Write new versions of these methods and update their consumers to use the new about:home pages. */ - protected ListView getAllPagesList(String waitText, int expectedChildCount) { - return null; - } - protected ListView getAllPagesList(String waitText) { - return null; - } protected ListView getBookmarksList(String waitText, int expectedChildCount) { return null; } protected ListView getBookmarksList(String waitText) { return null; } protected ListView getHistoryList(String waitText, int expectedChildCount) { return null;
--- a/mobile/android/base/tests/robocop.ini +++ b/mobile/android/base/tests/robocop.ini @@ -1,9 +1,8 @@ -# [testAllPagesTab] # disabled on fig - bug 880060 # [testHistoryTab] # disabled on fig - bug 880060 # [testBookmarksTab] # disabled on fig - bug 880060 [testAwesomebar] # [testAwesomebarSwipes] # disabled on fig - bug 880060 # [testBookmark] # disabled on fig - bug 880060 # [testBookmarklets] # disabled on fig - bug 880060 [testJNI] [testMigration]
--- a/mobile/android/base/tests/robocop_autophone.ini +++ b/mobile/android/base/tests/robocop_autophone.ini @@ -1,16 +1,13 @@ [testAboutPage] #[testAddonManager] # fails on gs2, nexus one, lg revolution, droid pro, nexus s -#[testAllPagesTab] -# fails on gs2, nexus one, lg revolution, droid pro, nexus s - [testAwesomebarSwipes] [testAwesomebar] #[testAxisLocking] # fails on gs2, nexus one, lg revolution, droid pro, nexus s [testBookmark]
deleted file mode 100644 --- a/mobile/android/base/tests/testAllPagesTab.java.in +++ /dev/null @@ -1,160 +0,0 @@ -#filter substitution -package @ANDROID_PACKAGE_NAME@.tests; - -import android.view.View; -import android.widget.ListView; -import android.widget.TabHost; -import android.widget.TextView; -import android.widget.ImageView; -import android.widget.TabWidget; -import android.text.TextUtils; - -import android.content.ContentResolver; -import android.net.Uri; - -import java.util.Arrays; -import java.util.ArrayList; -import @ANDROID_PACKAGE_NAME@.*; - -/* Tests opening the all pages tab, that items look correct, clicking on an item - and long tapping on an item -*/ - -public class testAllPagesTab extends BaseTest { - private static ListView listview = null; - - private static int topSitesCount = DEFAULT_BOOKMARKS_COUNT; - - @Override - protected int getTestType() { - return TEST_MOCHITEST; - } - - public void testAllPagesTab() { - blockForGeckoReady(); - - // load one page so there is something in our history - String url = getAbsoluteUrl("/robocop/robocop_big_link.html"); - loadUrl(url); - topSitesCount += 1; // Increment for "Big Link" Top Site since the URL was loaded above. - - testList(url); - testClick(DEFAULT_BOOKMARKS_URLS[0]); - testContextMenu(url); - } - - private void testList(String url) { - final ListView list = getAllPagesList(DEFAULT_BOOKMARKS_TITLES[0], topSitesCount); - - // some basic checks for the tab strip - TabWidget tabwidget = (TabWidget)mSolo.getView(TabWidget.class, 0); - mAsserter.is(tabwidget.getTabCount(), 3, "Three tabs shown"); - mAsserter.is(tabwidget.isStripEnabled(), false, "Strip is hidden"); - - // check that the right tab is selected - TabHost host = (TabHost)mSolo.getView(TabHost.class, 0); - // This test fails, only when we're running tests - // mAsserter.is(host.getCurrentTab(), 0, "All pages tab is selected in tab strip"); - - mAsserter.isnot(list, null, "checking that all pages list exists and has " + - topSitesCount + " children (the default bookmarks)"); - final int count = list.getAdapter().getCount(); - - String loadUrl = ""; - for (int i = count - 1; i >= 0; i--) { - View child = list.getChildAt(i); - if (child == null) { - // this may simply indicate that the item is not visible - Object item = list.getAdapter().getItem(i); - mAsserter.ok(item != null, "adapter item is set", item != null ? item.toString() : "null!"); - continue; - } - ArrayList<View> views = mSolo.getViews(child); - ArrayList<ImageView> imageViews = new ArrayList<ImageView>(); - - int expectedImages = 1; - for (int j = 0; j < views.size(); j++) { - View v = views.get(j); - if (v instanceof TextView) { - TextView t = (TextView)v; - String string = t.getText().toString(); - mAsserter.ok(!TextUtils.isEmpty(string), "TextView is filled in", string); - if (i == 1 || string.startsWith("http")) { - loadUrl = string; - } - - if (isBookmark(DEFAULT_BOOKMARKS_TITLES, string)) { - expectedImages = 2; - } - } else if (v instanceof ImageView) { - imageViews.add((ImageView)v); - } - } - - int visible = 0; - for (int j = 0; j < imageViews.size(); j++) { - ImageView img = imageViews.get(j); - visible += (img.getVisibility() == View.VISIBLE) ? 1 : 0; - } - - mAsserter.is(visible, expectedImages, "Correct number of ImageViews visible"); - } - - mActions.sendSpecialKey(Actions.SpecialKey.BACK); - } - - private void testContextMenu(String url) { - ListView list = getAllPagesList(DEFAULT_BOOKMARKS_TITLES[0], topSitesCount); - - View child = list.getChildAt(0); - mAsserter.ok(child != null, "first list item can be retrieved", child != null ? child.toString() : "null!"); - mSolo.clickLongOnView(child); - - // TODO: Test clicking these does the right thing - mAsserter.ok(mSolo.waitForText("Open in New Tab"), "Context menu has Open in New Tab option", "Open in New Tab"); - mAsserter.ok(mSolo.waitForText("Share"), "Context menu has Share option", "Share"); - mAsserter.ok(mSolo.searchText("Remove", true), "Context menu has Remove option", "Remove"); - mAsserter.ok(mSolo.searchText("Add to Home Screen", true), "Context menu has Add to Home Screen option", "Add to Home Screen"); - - mActions.sendSpecialKey(Actions.SpecialKey.BACK); - mActions.sendSpecialKey(Actions.SpecialKey.BACK); - } - - private void testClick(String url) { - ListView list = getAllPagesList(DEFAULT_BOOKMARKS_TITLES[0], topSitesCount); - - Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("DOMContentLoaded"); - - // Avoid clicking the first item. Its the first item because its in an open tab, and will just switch to it - View child = list.getChildAt(1); - mAsserter.ok(child != null, "first list item can be retrieved", child != null ? child.toString() : "null!"); - // dump text for this child, to be sure of which list item is clicked - ArrayList<View> views = mSolo.getViews(child); - for (int j = 0; j < views.size(); j++) { - View v = views.get(j); - if (v instanceof TextView) { - TextView t = (TextView)v; - String string = t.getText().toString(); - mAsserter.dumpLog("first list item has text: " + string); - } - } - mSolo.clickOnView(child); - contentEventExpecter.blockForEvent(); - contentEventExpecter.unregisterListener(); - mSolo.sleep(500); - verifyUrl(url); - } - - @Override - public void tearDown() throws Exception { - ContentResolver resolver = getActivity().getContentResolver(); - Uri uri = Uri.parse("content://@ANDROID_PACKAGE_NAME@.db.browser/history"); - uri = uri.buildUpon().appendQueryParameter("profile", "default") - .appendQueryParameter("sync", "true").build(); - resolver.delete(uri, "url = ?", new String[] { - "http://mochi.test:8888/tests/robocop/robocop_big_link.html" - }); - - super.tearDown(); - } -}
--- a/mobile/android/base/tests/testAwesomebarSwipes.java.in +++ b/mobile/android/base/tests/testAwesomebarSwipes.java.in @@ -17,17 +17,18 @@ public class testAwesomebarSwipes extend @Override protected int getTestType() { return TEST_MOCHITEST; } public void testAwesomebarSwipes() { blockForGeckoReady(); - ListView list = getAllPagesList("about:firefox"); + // Removed by Bug 896576 - [fig] Remove [getAllPagesList] from BaseTest + // ListView list = getAllPagesList("about:firefox"); // Test normal sliding of the list left and right ViewPager pager = (ViewPager)mSolo.getView(ViewPager.class, 0); mAsserter.is(pager.getCurrentItem(), 0, "All pages is selected"); int width = mDriver.getGeckoWidth() / 2; int y = mDriver.getGeckoHeight() / 2; mActions.drag(width, 0, y, y);
--- a/mobile/android/base/tests/testShareLink.java.in +++ b/mobile/android/base/tests/testShareLink.java.in @@ -62,16 +62,17 @@ public class testShareLink extends BaseT // The link has a 60px height, so let's try to hit the middle float top = mDriver.getGeckoTop() + 30 * dm.density; float left = mDriver.getGeckoLeft() + mDriver.getGeckoWidth() / 2; mSolo.clickLongOnScreen(left, top); verifySharePopup(shareOptions,"Link"); /* FIXME: disabled on fig - bug 880060 + // Removed by Bug 896576 - [fig] Remove [getAllPagesList] from BaseTest // Test share popup in Top Sites ListView tslist = getAllPagesList(url); // Make sure the keyboard is closed since a back here would just close the Awesomebar mSolo.clickOnText("Bookmarks"); mSolo.clickOnText("Sites"); waitForText("Big Link");