gecko/mobile/chrome/tests/remote_contentpopup.js
Lucas Rocha e65756d2ac Bug 605365 - Change Content's formAssistant to be a public property (r=mfinkle)
So that we can share the same FormAssistant instance with other components
defined in content.js. Updated chrome tests accordingly.
2011-09-19 09:45:52 -07:00

19 lines
592 B
JavaScript

dump("====================== Content Script Loaded =======================\n");
let assistant = Content.formAssistant;
AsyncTests.add("TestRemoteAutocomplete:Click", function(aMessage, aJson) {
let element = content.document.getElementById(aJson.id);
assistant.open(element);
assistant._executeDelayed(function(assistant) {
sendAsyncMessage("FormAssist:AutoComplete", assistant._getJSON());
});
return true;
});
AsyncTests.add("TestRemoteAutocomplete:Check", function(aMessage, aJson) {
let element = content.document.getElementById(aJson.id);
return element.value;
});