From 0b360fa181450953aba97a88028b7624134943ac Mon Sep 17 00:00:00 2001 From: Wes Kocher Date: Thu, 6 Aug 2015 15:31:55 -0700 Subject: [PATCH] Backed out changeset f48f05a347fc (bug 1038996) --- mobile/android/base/AboutPages.java | 7 ------- mobile/android/base/toolbar/ToolbarEditText.java | 13 +------------ mobile/android/tests/browser/robocop/BaseTest.java | 2 +- .../android/tests/browser/robocop/StringHelper.java | 1 - .../tests/browser/robocop/testInputUrlBar.java | 4 ++-- 5 files changed, 4 insertions(+), 23 deletions(-) diff --git a/mobile/android/base/AboutPages.java b/mobile/android/base/AboutPages.java index 7c8fa5cdbc96..ada8e644abea 100644 --- a/mobile/android/base/AboutPages.java +++ b/mobile/android/base/AboutPages.java @@ -46,13 +46,6 @@ public class AboutPages { return HOME.equals(url.split("\\?")[0]); } - public static final boolean isPrivateHome(final String url) { - if (url == null || !url.startsWith(PRIVATEBROWSING)) { - return false; - } - return true; - } - public static final String getPanelIdFromAboutHomeUrl(String aboutHomeUrl) { return StringUtils.getQueryParameter(aboutHomeUrl, PANEL_PARAM); } diff --git a/mobile/android/base/toolbar/ToolbarEditText.java b/mobile/android/base/toolbar/ToolbarEditText.java index 53566577a4e2..ff0d297bb20b 100644 --- a/mobile/android/base/toolbar/ToolbarEditText.java +++ b/mobile/android/base/toolbar/ToolbarEditText.java @@ -5,7 +5,6 @@ package org.mozilla.gecko.toolbar; -import org.mozilla.gecko.AboutPages; import org.mozilla.gecko.AppConstants.Versions; import org.mozilla.gecko.CustomEditText; import org.mozilla.gecko.InputMethods; @@ -123,17 +122,7 @@ public class ToolbarEditText extends CustomEditText @Override public void setText(final CharSequence text, final TextView.BufferType type) { - - // If we're on the home or private browsing page, we don't set the "about" url. - final String textString = text.toString(); - final CharSequence finalText; - if (AboutPages.isAboutHome(textString) || AboutPages.isPrivateHome(textString)) { - finalText = ""; - } else { - finalText = text; - } - - super.setText(finalText, type); + super.setText(text, type); // Any autocomplete text would have been overwritten, so reset our autocomplete states. resetAutocompleteState(); diff --git a/mobile/android/tests/browser/robocop/BaseTest.java b/mobile/android/tests/browser/robocop/BaseTest.java index f52138a12bba..9521694c2288 100644 --- a/mobile/android/tests/browser/robocop/BaseTest.java +++ b/mobile/android/tests/browser/robocop/BaseTest.java @@ -184,7 +184,7 @@ abstract class BaseTest extends BaseRobocopTest { // Send the keys for the URL we want to enter mSolo.clearEditText(urlEditView); - mSolo.typeText(urlEditView, url); + mSolo.enterText(urlEditView, url); // Get the URL text from the URL bar EditText view final String urlBarText = urlEditView.getText().toString(); diff --git a/mobile/android/tests/browser/robocop/StringHelper.java b/mobile/android/tests/browser/robocop/StringHelper.java index 1815946b1ff1..0720fd5584c6 100644 --- a/mobile/android/tests/browser/robocop/StringHelper.java +++ b/mobile/android/tests/browser/robocop/StringHelper.java @@ -31,7 +31,6 @@ public class StringHelper { public final String ABOUT_HEALTHREPORT_URL = "about:healthreport"; public final String ABOUT_DOWNLOADS_URL = "about:downloads"; public final String ABOUT_HOME_URL = "about:home"; - public final String ABOUT_PRIVATE_BROWSING_URL = "about:privatebrowsing"; public final String ABOUT_ADDONS_URL = "about:addons"; public static final String ABOUT_LOGINS_URL = "about:logins"; public final String ABOUT_ABOUT_URL = "about:about"; diff --git a/mobile/android/tests/browser/robocop/testInputUrlBar.java b/mobile/android/tests/browser/robocop/testInputUrlBar.java index c12ccef98276..c4cd8a412e7a 100644 --- a/mobile/android/tests/browser/robocop/testInputUrlBar.java +++ b/mobile/android/tests/browser/robocop/testInputUrlBar.java @@ -23,7 +23,7 @@ public final class testInputUrlBar extends BaseTest { blockForGeckoReady(); startEditingMode(); - assertUrlBarText(""); + assertUrlBarText(mStringHelper.ABOUT_HOME_URL); // Avoid any auto domain completion by using a prefix that matches // nothing, including about: pages @@ -97,7 +97,7 @@ public final class testInputUrlBar extends BaseTest { // URL bar should have forgotten about "uv" text. startEditingMode(); - assertUrlBarText(""); + assertUrlBarText(mStringHelper.ABOUT_HOME_URL); int width = mDriver.getGeckoWidth() / 2; int y = mDriver.getGeckoHeight() / 2;