Backed out changeset f48f05a347fc (bug 1038996)
authorWes Kocher <wkocher@mozilla.com>
Thu, 06 Aug 2015 15:31:55 -0700
changeset 288311 97aba112e4a27661d7387f5e8a39f43476a83e0b
parent 288310 05f8adacf21fd51a1acf567fd88baea725755ea4
child 288312 729b6b663f49b605ad15a2f017947213387f1924
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1038996
milestone42.0a1
backs outf48f05a347fcfe62d28917896c905eb98c2112a9
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
Backed out changeset f48f05a347fc (bug 1038996)
mobile/android/base/AboutPages.java
mobile/android/base/toolbar/ToolbarEditText.java
mobile/android/tests/browser/robocop/BaseTest.java
mobile/android/tests/browser/robocop/StringHelper.java
mobile/android/tests/browser/robocop/testInputUrlBar.java
--- a/mobile/android/base/AboutPages.java
+++ b/mobile/android/base/AboutPages.java
@@ -41,23 +41,16 @@ public class AboutPages {
             return false;
         }
         // We sometimes append a parameter to "about:home" to specify which page to
         // show when we open the home pager. Discard this parameter when checking
         // whether or not this URL is "about:home".
         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);
     }
 
     public static boolean isAboutReader(final String url) {
         return isAboutPage(READER, url);
     }
 
--- a/mobile/android/base/toolbar/ToolbarEditText.java
+++ b/mobile/android/base/toolbar/ToolbarEditText.java
@@ -1,16 +1,15 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 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;
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.toolbar.BrowserToolbar.OnCommitListener;
 import org.mozilla.gecko.toolbar.BrowserToolbar.OnDismissListener;
 import org.mozilla.gecko.toolbar.BrowserToolbar.OnFilterListener;
 import org.mozilla.gecko.util.GamepadUtils;
@@ -118,27 +117,17 @@ public class ToolbarEditText extends Cus
         } catch (NullPointerException e) {
             Log.e(LOGTAG, "InputMethodManagerService, why are you throwing"
                           + " a NullPointerException? See bug 782096", e);
         }
     }
 
     @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();
     }
 
     @Override
     public void sendAccessibilityEventUnchecked(AccessibilityEvent event) {
         // We need to bypass the isShown() check in the default implementation
--- a/mobile/android/tests/browser/robocop/BaseTest.java
+++ b/mobile/android/tests/browser/robocop/BaseTest.java
@@ -179,17 +179,17 @@ abstract class BaseTest extends BaseRobo
 
     protected final void enterUrl(String url) {
         focusUrlBar();
 
         final EditText urlEditView = (EditText) mSolo.getView(R.id.url_edit_text);
 
         // 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();
         mAsserter.is(url, urlBarText, "URL typed properly");
     }
 
     protected final Fragment getBrowserSearch() {
         final FragmentManager fm = ((FragmentActivity) getActivity()).getSupportFragmentManager();
--- a/mobile/android/tests/browser/robocop/StringHelper.java
+++ b/mobile/android/tests/browser/robocop/StringHelper.java
@@ -26,17 +26,16 @@ public class StringHelper {
     public final String ABOUT_BLANK_URL = "about:blank";
     public final String ABOUT_FIREFOX_URL;
     public final String ABOUT_RIGHTS_URL = "about:rights";
     public final String ABOUT_BUILDCONFIG_URL = "about:buildconfig";
     public final String ABOUT_FEEDBACK_URL = "about:feedback";
     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";
     public final String ABOUT_SCHEME = "about:";
 
     // About pages' titles
     public final String ABOUT_HOME_TITLE = "";
 
--- a/mobile/android/tests/browser/robocop/testInputUrlBar.java
+++ b/mobile/android/tests/browser/robocop/testInputUrlBar.java
@@ -18,17 +18,17 @@ import android.widget.EditText;
 public final class testInputUrlBar extends BaseTest {
     private Element mUrlBarEditElement;
     private EditText mUrlBarEditView;
 
     public void testInputUrlBar() {
         blockForGeckoReady();
 
         startEditingMode();
-        assertUrlBarText("");
+        assertUrlBarText(mStringHelper.ABOUT_HOME_URL);
 
         // Avoid any auto domain completion by using a prefix that matches
         //  nothing, including about: pages
         mActions.sendKeys("zy");
         assertUrlBarText("zy");
 
         mActions.sendKeys("cd");
         assertUrlBarText("zycd");
@@ -92,17 +92,17 @@ public final class testInputUrlBar exten
 
         // Dismiss editing mode
         mSolo.goBack();
 
         waitForText(mStringHelper.TITLE_PLACE_HOLDER);
 
         // 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;
 
         // Slide to the right, force URL bar entry to lose input focus
         mActions.drag(width, 0, y, y);
 
         // Select text and replace the content