Backed out changeset e2aff2cd9a9a (bug 959573) for bc1 test failures on a CLOSED TREE

This commit is contained in:
Carsten "Tomcat" Book 2014-04-14 14:29:08 +02:00
parent 32d5e515ac
commit fe1a5c2dd7
9 changed files with 7 additions and 1275 deletions

View File

@ -457,8 +457,6 @@
@BINPATH@/components/nsPlacesDBFlush.js
@BINPATH@/components/nsPlacesAutoComplete.manifest
@BINPATH@/components/nsPlacesAutoComplete.js
@BINPATH@/components/UnifiedComplete.manifest
@BINPATH@/components/UnifiedComplete.js
@BINPATH@/components/nsPlacesExpiration.js
@BINPATH@/components/PlacesProtocolHandler.js
@BINPATH@/components/PlacesCategoriesStarter.js

View File

@ -81,10 +81,6 @@
Components.classes["@mozilla.org/autocomplete/search;1?name=history"]
.getService(Components.interfaces.mozIPlacesAutoComplete);
</field>
<field name="_unifiedComplete" readonly="true">
Components.classes["@mozilla.org/autocomplete/search;1?name=unifiedcomplete"]
.getService(Components.interfaces.mozIPlacesAutoComplete);
</field>
<field name="mTabBox" readonly="true">
document.getAnonymousElementByAttribute(this, "anonid", "tabbox");
</field>
@ -748,10 +744,8 @@
}
let autocomplete = this.mTabBrowser._placesAutocomplete;
let unifiedComplete = this.mTabBrowser._unifiedComplete;
if (this.mBrowser.registeredOpenURI) {
autocomplete.unregisterOpenPage(this.mBrowser.registeredOpenURI);
unifiedComplete.unregisterOpenPage(this.mBrowser.registeredOpenURI);
delete this.mBrowser.registeredOpenURI;
}
// Tabs in private windows aren't registered as "Open" so
@ -760,7 +754,6 @@
(!PrivateBrowsingUtils.isWindowPrivate(window) ||
PrivateBrowsingUtils.permanentPrivateBrowsing)) {
autocomplete.registerOpenPage(aLocation);
unifiedComplete.registerOpenPage(aLocation);
this.mBrowser.registeredOpenURI = aLocation;
}
}
@ -1976,7 +1969,6 @@
if (browser.registeredOpenURI && !aTabWillBeMoved) {
this._placesAutocomplete.unregisterOpenPage(browser.registeredOpenURI);
this._unifiedComplete.unregisterOpenPage(browser.registeredOpenURI);
delete browser.registeredOpenURI;
}
@ -2303,7 +2295,6 @@
// If the current URI is registered as open remove it from the list.
if (aOurBrowser.registeredOpenURI) {
this._placesAutocomplete.unregisterOpenPage(aOurBrowser.registeredOpenURI);
this._unifiedComplete.unregisterOpenPage(aOurBrowser.registeredOpenURI);
delete aOurBrowser.registeredOpenURI;
}
@ -3113,7 +3104,6 @@
let browser = this.getBrowserAtIndex(i);
if (browser.registeredOpenURI) {
this._placesAutocomplete.unregisterOpenPage(browser.registeredOpenURI);
this._unifiedComplete.unregisterOpenPage(aOurBrowser.registeredOpenURI);
delete browser.registeredOpenURI;
}
browser.webProgress.removeProgressListener(this.mTabFilters[i]);

View File

@ -68,12 +68,6 @@
this.inputField.addEventListener("overflow", this, false);
this.inputField.addEventListener("underflow", this, false);
try {
if (this._prefs.getBoolPref("unifiedcomplete")) {
this.setAttribute("autocompletesearch", "unifiedcomplete");
}
} catch (ex) {}
const kXULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
var textBox = document.getAnonymousElementByAttribute(this,
"anonid", "textbox-input-box");
@ -605,14 +599,6 @@
case "trimURLs":
this._mayTrimURLs = this._prefs.getBoolPref(aData);
break;
case "unifiedcomplete":
let useUnifiedComplete = false;
try {
useUnifiedComplete = this._prefs.getBoolPref(aData);
} catch (ex) {}
this.setAttribute("autocompletesearch",
useUnifiedComplete ? "unifiedcomplete"
: "urlinline history");
}
}
]]></body>

View File

@ -430,8 +430,6 @@
@BINPATH@/components/nsTaggingService.js
@BINPATH@/components/nsPlacesAutoComplete.manifest
@BINPATH@/components/nsPlacesAutoComplete.js
@BINPATH@/components/UnifiedComplete.manifest
@BINPATH@/components/UnifiedComplete.js
@BINPATH@/components/nsPlacesExpiration.js
@BINPATH@/browser/components/PlacesProtocolHandler.js
@BINPATH@/components/PlacesCategoriesStarter.js

View File

@ -126,7 +126,7 @@ this.PriorityUrlProvider = Object.freeze({
matches.delete(token);
},
getMatch: function (searchToken) {
getMatchingSpec: function (searchToken) {
return Task.spawn(function* () {
yield promiseInitialized();
for (let [token, match] of matches.entries()) {

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +0,0 @@
component {f964a319-397a-4d21-8be6-5cdd1ee3e3ae} UnifiedComplete.js
contract @mozilla.org/autocomplete/search;1?name=unifiedcomplete {f964a319-397a-4d21-8be6-5cdd1ee3e3ae}

View File

@ -87,8 +87,6 @@ if CONFIG['MOZ_PLACES']:
EXTRA_COMPONENTS += [
'nsPlacesAutoComplete.js',
'nsPlacesAutoComplete.manifest',
'UnifiedComplete.js',
'UnifiedComplete.manifest',
]
FINAL_LIBRARY = 'xul'

View File

@ -11,7 +11,7 @@ function run_test() {
add_task(function* search_engine_match() {
let engine = yield promiseDefaultSearchEngine();
let token = engine.getResultDomain();
let match = yield PriorityUrlProvider.getMatch(token.substr(0, 1));
let match = yield PriorityUrlProvider.getMatchingSpec(token.substr(0, 1));
do_check_eq(match.url, engine.searchForm);
do_check_eq(match.title, engine.name);
do_check_eq(match.iconUrl, engine.iconURI ? engine.iconURI.spec : null);
@ -19,7 +19,7 @@ add_task(function* search_engine_match() {
});
add_task(function* no_match() {
do_check_eq(null, yield PriorityUrlProvider.getMatch("test"));
do_check_eq(null, yield PriorityUrlProvider.getMatchingSpec("test"));
});
add_task(function* hide_search_engine_nomatch() {
@ -29,16 +29,16 @@ add_task(function* hide_search_engine_nomatch() {
Services.search.removeEngine(engine);
yield promiseTopic;
do_check_true(engine.hidden);
do_check_eq(null, yield PriorityUrlProvider.getMatch(token.substr(0, 1)));
do_check_eq(null, yield PriorityUrlProvider.getMatchingSpec(token.substr(0, 1)));
});
add_task(function* add_search_engine_match() {
let promiseTopic = promiseSearchTopic("engine-added");
do_check_eq(null, yield PriorityUrlProvider.getMatch("bacon"));
do_check_eq(null, yield PriorityUrlProvider.getMatchingSpec("bacon"));
Services.search.addEngineWithDetails("bacon", "", "bacon", "Search Bacon",
"GET", "http://www.bacon.moz/?search={searchTerms}");
yield promiseSearchTopic;
let match = yield PriorityUrlProvider.getMatch("bacon");
let match = yield PriorityUrlProvider.getMatchingSpec("bacon");
do_check_eq(match.url, "http://www.bacon.moz");
do_check_eq(match.title, "bacon");
do_check_eq(match.iconUrl, null);
@ -50,7 +50,7 @@ add_task(function* remove_search_engine_nomatch() {
let promiseTopic = promiseSearchTopic("engine-removed");
Services.search.removeEngine(engine);
yield promiseTopic;
do_check_eq(null, yield PriorityUrlProvider.getMatch("bacon"));
do_check_eq(null, yield PriorityUrlProvider.getMatchingSpec("bacon"));
});
function promiseDefaultSearchEngine() {