Bug 1009318 - Add Google search purpose for about:newtab. r=MattN

This commit is contained in:
Drew Willcoxon 2014-05-13 12:37:19 -07:00
parent d287a6255d
commit 6ce7e114ec
3 changed files with 9 additions and 1 deletions

View File

@ -67,6 +67,8 @@ function test() {
is(url, base + "&channel=sb", "Check search bar search URL for 'foo'");
url = engine.getSubmission("foo", null, "homepage").uri.spec;
is(url, base + "&channel=np&source=hp", "Check homepage search URL for 'foo'");
url = engine.getSubmission("foo", null, "newtab").uri.spec;
is(url, base + "&channel=nts", "Check newtab search URL for 'foo'");
// Check search suggestion URL.
url = engine.getSubmission("foo", "application/x-suggestions+json").uri.spec;
@ -145,6 +147,11 @@ function test() {
"value": "np",
"purpose": "homepage",
},
{
"name": "channel",
"value": "nts",
"purpose": "newtab",
},
{
"name": "source",
"value": "hp",

View File

@ -97,7 +97,7 @@ function test() {
},
{
name: "new tab search",
searchURL: base,
searchURL: base + "&channel=nts",
run: function () {
function doSearch(doc) {
// Re-add the listener, and perform a search

View File

@ -27,6 +27,7 @@
<MozParam name="channel" condition="purpose" purpose="keyword" value="fflb"/>
<MozParam name="channel" condition="purpose" purpose="searchbar" value="sb"/>
<MozParam name="channel" condition="purpose" purpose="homepage" value="np"/>
<MozParam name="channel" condition="purpose" purpose="newtab" value="nts"/>
<MozParam name="source" condition="purpose" purpose="homepage" value="hp"/>
</Url>
<Url type="text/html" method="GET" template="https://www.google.com/" rel="searchform"/>