Fix OpenSearch XML content-type and add moz:SearchForm (#27364)

Fixes #27210
This commit is contained in:
Shreyas Madake authored and GitHub committed 2026-09-10 04:59:37 -06:00
1 parent b13c52c11a
commit f9242f3adb
2 files changed
+18 -2

No files matched your search

@@ -501,4 +501,19 @@ public class SearchTest {
assertNotNull(jsonArray);
return jsonArray;
}
@Issue("27210")
@Test
void testOpenSearchXml() throws Exception {
WebClient wc = j.createWebClient();
Page page = wc.goTo("opensearch.xml", "application/opensearchdescription+xml");
assertNotNull(page);
j.assertGoodStatus(page);
assertEquals("application/opensearchdescription+xml", page.getWebResponse().getContentType());
String content = page.getWebResponse().getContentAsString();
assertTrue(content.contains("xmlns:moz=\"http://www.mozilla.org/2006/browser/search/\""));
assertTrue(content.contains("<moz:SearchForm>"));
}
}