Backout 262b6ad34702 (bug 1070778) due to bc1 failures. r=backout

This commit is contained in:
Blair McBride 2014-09-30 02:38:29 +13:00
parent 550cbe5a37
commit fb77cb6167
4 changed files with 20 additions and 72 deletions

View File

@ -295,8 +295,6 @@ skip-if = e10s # Bug ?????? - test directly manipulates content (directly gets e
[browser_bug1015721.js]
skip-if = os == 'win' || e10s # Bug 1056146 - FullZoomHelper uses promiseTabLoadEvent() which isn't e10s friendly
[browser_bug1064280_changeUrlInPinnedTab.js]
[browser_bug1070778.js]
skip-if = os == "linux" # Bug 1073339 - Investigate autocomplete test unreliability on Linux
[browser_canonizeURL.js]
skip-if = e10s # Bug ?????? - [JavaScript Error: "Error in AboutHome.sendAboutHomeData TypeError: target.messageManager is undefined" {file: "resource:///modules/AboutHome.jsm" line: 208}]
[browser_contentAreaClick.js]

View File

@ -1,66 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
function* promiseAutoComplete(inputText) {
gURLBar.focus();
gURLBar.value = inputText.slice(0, -1);
EventUtils.synthesizeKey(inputText.slice(-1) , {});
yield promiseSearchComplete();
}
function is_selected(index) {
is(gURLBar.popup.richlistbox.selectedIndex, index, `Item ${index + 1} should be selected`);
}
add_task(function*() {
// This test is only relevant if UnifiedComplete is enabled.
if (!Services.prefs.getBoolPref("browser.urlbar.unifiedcomplete"))
return;
let itemIds = [];
registerCleanupFunction(() => {
itemIds.forEach(PlacesUtils.bookmarks.removeItem);
});
let itemId =
PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
NetUtil.newURI("http://example.com/?q=%s"),
PlacesUtils.bookmarks.DEFAULT_INDEX,
"test");
PlacesUtils.bookmarks.setKeywordForBookmark(itemId, "keyword");
itemIds.push(itemId);
// This item only needed so we can select the keyword item, select something
// else, then select the keyword item again.
itemId =
PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
NetUtil.newURI("http://example.com/keyword"),
PlacesUtils.bookmarks.DEFAULT_INDEX,
"keyword abc");
itemIds.push(itemId);
yield promiseAutoComplete("keyword a");
// Select keyword item
EventUtils.synthesizeKey("VK_DOWN", {});
is_selected(0);
// Select next one (important!)
EventUtils.synthesizeKey("VK_DOWN", {});
is_selected(1);
// Re-select keyword item
EventUtils.synthesizeKey("VK_UP", {});
is_selected(0);
EventUtils.synthesizeKey("b", {});
yield promiseSearchComplete();
is(gURLBar.value, "keyword ab", "urlbar should have expected input");
let result = gURLBar.popup.richlistbox.firstChild;
isnot(result, null, "Should have first item");
let uri = NetUtil.newURI(result.getAttribute("url"));
is(uri.spec, makeActionURI("keyword", {url: "http://example.com/?q=ab", input: "keyword ab"}).spec, "Expect correct url");
EventUtils.synthesizeKey("VK_ESCAPE", {});
yield promisePopupHidden(gURLBar.popup);
});

View File

@ -125,6 +125,19 @@
<field name="_value">""</field>
<!--
onBeforeValueGet is called by the base-binding's .value getter.
It can return an object with a "value" property, to override the
return value of the getter.
-->
<method name="onBeforeValueGet">
<body><![CDATA[
if (this.hasAttribute("actiontype"))
return {value: this._value};
return null;
]]></body>
</method>
<!--
onBeforeValueSet is called by the base-binding's .value setter.
It should return the value that the setter should use.
@ -715,10 +728,8 @@
]]></body>
</method>
<property name="textValue">
<getter><![CDATA[
return this.inputField.value;
]]></getter>
<property name="textValue"
onget="return this.value;">
<setter>
<![CDATA[
try {

View File

@ -260,6 +260,11 @@
<field name="_disableTrim">false</field>
<property name="value">
<getter><![CDATA[
if (typeof this.onBeforeValueGet == "function") {
var result = this.onBeforeValueGet();
if (result)
return result.value;
}
return this.inputField.value;
]]></getter>
<setter><![CDATA[