Backed out changeset f48f05a347fc (bug 1038996)

This commit is contained in:
Wes Kocher 2015-08-06 15:31:55 -07:00
Родитель 8816327fdb
Коммит 0b360fa181
5 изменённых файлов: 4 добавлений и 23 удалений

Просмотреть файл

@ -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);
}

Просмотреть файл

@ -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();

Просмотреть файл

@ -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();

Просмотреть файл

@ -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";

Просмотреть файл

@ -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;