gecko/browser/components/search/test/webapi.html
Dave Townsend 6e2a38d03c Bug 1068186: Update window.sidebar and window.external APIs to support e10s. r=felipe
Moves nsSidebar.js to toolkit and makes it just pass messages to chrome for each
API call. MainProcessSingleton listens for those messages and passes the call
along to the search service.
Combines the validation code into the same function and takes the opportunity to
support relative URLs too.
Adds a bunch of tests for these web APIs.

Also fixes:
Bug 518929: Implement window.external APIs in core code
Bug 530847: Remove Fennec's nsISidebar implementation once that code is moved into the core
Bug 517720: Adding a search engine using relative URIs is not supported

--HG--
rename : browser/components/sidebar/nsSidebar.js => toolkit/components/search/nsSidebar.js
extra : rebase_source : 3e9caa49383e78e73e5f111ff09fb063f2cfa7c0
2015-02-02 12:15:26 -08:00

21 lines
442 B
HTML

<!DOCTYPE html>
<html>
<head>
<script>
function installEngine() {
var query = window.location.search.substring(1).split(":");
var func = query[0];
var args = JSON.parse(decodeURIComponent(query[1]));
if (func == "AddSearchProvider")
window.external.AddSearchProvider(...args);
else if (func == "addSearchEngine")
window.sidebar.addSearchEngine(...args);
}
</script>
</head>
<body onload="installEngine()">
</body>
</html>