1 const { AppConstants } = ChromeUtils.importESModule(
2 "resource://gre/modules/AppConstants.sys.mjs"
5 const kForceDNSLookup = "browser.fixup.dns_first_for_single_words";
7 // TODO(bug 1522134), this test should also use
8 // combinations of the following flags.
10 Services.uriFixup.FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP,
11 Services.uriFixup.FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP |
12 Services.uriFixup.FIXUP_FLAG_PRIVATE_CONTEXT,
13 Services.uriFixup.FIXUP_FLAGS_MAKE_ALTERNATE_URI,
14 Services.uriFixup.FIXUP_FLAG_FIX_SCHEME_TYPOS,
15 // This should not really generate a search, but it does, see Bug 1588118.
16 Services.uriFixup.FIXUP_FLAG_FIX_SCHEME_TYPOS |
17 Services.uriFixup.FIXUP_FLAG_PRIVATE_CONTEXT,
21 The following properties are supported for these test cases:
23 input: "", // Input string, required
24 fixedURI: "", // Expected fixedURI
25 alternateURI: "", // Expected alternateURI
26 keywordLookup: false, // Whether a keyword lookup is expected
27 protocolChange: false, // Whether a protocol change is expected
28 inWhitelist: false, // Whether the input host is in the whitelist
29 affectedByDNSForSingleWordHosts: false, // Whether the input host could be a host, but is normally assumed to be a keyword query
35 fixedURI: "about:home",
38 input: "http://www.mozilla.org",
39 fixedURI: "http://www.mozilla.org/",
42 input: "http://127.0.0.1/",
43 fixedURI: "http://127.0.0.1/",
46 input: "file:///foo/bar",
47 fixedURI: "file:///foo/bar",
50 input: "://www.mozilla.org",
51 fixedURI: "http://www.mozilla.org/",
55 input: "www.mozilla.org",
56 fixedURI: "http://www.mozilla.org/",
60 input: "http://mozilla/",
61 fixedURI: "http://mozilla/",
62 alternateURI: "https://www.mozilla.com/",
65 input: "http://test./",
66 fixedURI: "http://test./",
67 alternateURI: "https://www.test./",
71 fixedURI: "http://127.0.0.1/",
76 fixedURI: "http://1.2.3.4/",
81 fixedURI: "http://1.2.3.4/foo",
85 input: "1.2.3.4:8000",
86 fixedURI: "http://1.2.3.4:8000/",
90 input: "1.2.3.4:8000/",
91 fixedURI: "http://1.2.3.4:8000/",
95 input: "1.2.3.4:8000/foo",
96 fixedURI: "http://1.2.3.4:8000/foo",
100 input: "192.168.10.110",
101 fixedURI: "http://192.168.10.110/",
102 protocolChange: true,
105 input: "192.168.10.110/123",
106 fixedURI: "http://192.168.10.110/123",
107 protocolChange: true,
110 input: "192.168.10.110/123foo",
111 fixedURI: "http://192.168.10.110/123foo",
112 protocolChange: true,
115 input: "192.168.10.110:1234/123",
116 fixedURI: "http://192.168.10.110:1234/123",
117 protocolChange: true,
120 input: "192.168.10.110:1234/123foo",
121 fixedURI: "http://192.168.10.110:1234/123foo",
122 protocolChange: true,
126 fixedURI: "http://1.2.0.3/",
127 protocolChange: true,
131 fixedURI: "http://1.2.0.3/",
132 protocolChange: true,
136 fixedURI: "http://1.2.0.3/foo",
137 protocolChange: true,
141 fixedURI: "http://1.2.0.3/123",
142 protocolChange: true,
146 fixedURI: "http://1.2.0.3:8000/",
147 protocolChange: true,
150 input: "1.2.3:8000/",
151 fixedURI: "http://1.2.0.3:8000/",
152 protocolChange: true,
155 input: "1.2.3:8000/foo",
156 fixedURI: "http://1.2.0.3:8000/foo",
157 protocolChange: true,
160 input: "1.2.3:8000/123",
161 fixedURI: "http://1.2.0.3:8000/123",
162 protocolChange: true,
165 input: "http://1.2.3",
166 fixedURI: "http://1.2.0.3/",
169 input: "http://1.2.3/",
170 fixedURI: "http://1.2.0.3/",
173 input: "http://1.2.3/foo",
174 fixedURI: "http://1.2.0.3/foo",
178 fixedURI: "http://[::1]/",
179 protocolChange: true,
183 fixedURI: "http://[::1]/",
184 protocolChange: true,
188 fixedURI: "http://[::1]:8000/",
189 protocolChange: true,
192 input: "[::1]:8000/",
193 fixedURI: "http://[::1]:8000/",
194 protocolChange: true,
201 input: "[fe80:cd00:0:cde:1257:0:211e:729c]",
202 fixedURI: "http://[fe80:cd00:0:cde:1257:0:211e:729c]/",
203 protocolChange: true,
206 input: "[64:ff9b::8.8.8.8]",
207 fixedURI: "http://[64:ff9b::808:808]/",
208 protocolChange: true,
211 input: "[64:ff9b::8.8.8.8]/~moz",
212 fixedURI: "http://[64:ff9b::808:808]/~moz",
213 protocolChange: true,
229 fixedURI: "http://0.0.4.210/",
231 protocolChange: true,
232 affectedByDNSForSingleWordHosts: true,
235 input: "whitelisted/foo.txt",
236 fixedURI: "http://whitelisted/foo.txt",
237 alternateURI: "https://www.whitelisted.com/foo.txt",
238 protocolChange: true,
242 fixedURI: "http://mozilla/",
243 alternateURI: "https://www.mozilla.com/",
245 protocolChange: true,
246 affectedByDNSForSingleWordHosts: true,
250 fixedURI: "http://test./",
251 alternateURI: "https://www.test./",
253 protocolChange: true,
254 affectedByDNSForSingleWordHosts: true,
258 fixedURI: "http://.test/",
259 alternateURI: "https://www.test/",
261 protocolChange: true,
262 affectedByDNSForSingleWordHosts: true,
265 input: "mozilla is amazing",
269 input: "search ?mozilla",
273 input: "mozilla .com",
277 input: "what if firefox?",
281 input: "london's map",
286 fixedURI: "http://mozilla/",
287 alternateURI: "https://www.mozilla.com/",
289 protocolChange: true,
290 affectedByDNSForSingleWordHosts: true,
294 fixedURI: "http://mozilla/",
295 alternateURI: "https://www.mozilla.com/",
297 protocolChange: true,
298 affectedByDNSForSingleWordHosts: true,
305 input: "mozilla \\ foo.txt",
309 input: "mozilla \\\r foo.txt",
314 fixedURI: "http://mozilla/",
315 alternateURI: "https://www.mozilla.com/",
317 protocolChange: true,
318 affectedByDNSForSingleWordHosts: true,
321 input: "mozilla \r\n",
322 fixedURI: "http://mozilla/",
323 alternateURI: "https://www.mozilla.com/",
325 protocolChange: true,
326 affectedByDNSForSingleWordHosts: true,
329 input: "moz\r\nfirefox\nos\r",
330 fixedURI: "http://mozfirefoxos/",
331 alternateURI: "https://www.mozfirefoxos.com/",
333 protocolChange: true,
334 affectedByDNSForSingleWordHosts: true,
337 input: "moz\r\n firefox\n",
349 input: "http://whitelisted/",
350 fixedURI: "http://whitelisted/",
351 alternateURI: "https://www.whitelisted.com/",
355 input: "whitelisted",
356 fixedURI: "http://whitelisted/",
357 alternateURI: "https://www.whitelisted.com/",
358 protocolChange: true,
362 input: "whitelisted.",
363 fixedURI: "http://whitelisted./",
364 alternateURI: "https://www.whitelisted./",
365 protocolChange: true,
370 fixedURI: "http://mochi.test/",
371 alternateURI: "https://www.mochi.test/",
372 protocolChange: true,
375 // local.domain is a whitelisted suffix...
377 input: "some.local.domain",
378 fixedURI: "http://some.local.domain/",
379 protocolChange: true,
382 // ...but .domain is not.
384 input: "some.domain",
385 fixedURI: "http://some.domain/",
386 alternateURI: "https://www.some.domain/",
388 protocolChange: true,
389 affectedByDNSForSingleWordHosts: true,
393 fixedURI: "http://xn--caf-dma.com/",
394 alternateURI: "https://www.xn--caf-dma.com/",
395 protocolChange: true,
398 input: "mozilla.nonexistent",
399 fixedURI: "http://mozilla.nonexistent/",
400 alternateURI: "https://www.mozilla.nonexistent/",
402 protocolChange: true,
403 affectedByDNSForSingleWordHosts: true,
407 fixedURI: "http://mochi.com/",
408 alternateURI: "https://www.mochi.com/",
409 protocolChange: true,
412 input: "47.6182,-122.830",
416 input: "-47.6182,-23.51",
420 input: "-22.14,23.51-",
421 fixedURI: "http://-22.14,23.51-/",
423 protocolChange: true,
424 affectedByDNSForSingleWordHosts: true,
428 fixedURI: "http://32.0.0.7/",
430 protocolChange: true,
431 affectedByDNSForSingleWordHosts: true,
435 fixedURI: "http://5+2/",
436 alternateURI: "https://www.5+2.com/",
438 protocolChange: true,
439 affectedByDNSForSingleWordHosts: true,
443 fixedURI: "http://0.0.0.5/2",
445 protocolChange: true,
446 affectedByDNSForSingleWordHosts: true,
449 input: "moz ?.::%27",
453 input: "mozilla.com/?q=search",
454 fixedURI: "http://mozilla.com/?q=search",
455 alternateURI: "https://www.mozilla.com/?q=search",
456 protocolChange: true,
459 input: "mozilla.com?q=search",
460 fixedURI: "http://mozilla.com/?q=search",
461 alternateURI: "https://www.mozilla.com/?q=search",
462 protocolChange: true,
465 input: "mozilla.com ?q=search",
469 input: "mozilla.com.?q=search",
470 fixedURI: "http://mozilla.com./?q=search",
471 protocolChange: true,
474 input: "mozilla.com'?q=search",
475 fixedURI: "http://mozilla.com/?q=search",
476 alternateURI: "https://www.mozilla.com/?q=search",
477 protocolChange: true,
480 input: "mozilla.com':search",
489 fixedURI: "http://'/?",
490 alternateURI: "https://www.'.com/?",
492 protocolChange: true,
493 affectedByDNSForSingleWordHosts: true,
496 input: "whitelisted?.com",
497 fixedURI: "http://whitelisted/?.com",
498 alternateURI: "https://www.whitelisted.com/?.com",
499 protocolChange: true,
508 affectedByDNSForSingleWordHosts: true,
509 fixedURI: "http://.com/",
510 alternateURI: "https://www.com/",
511 protocolChange: true,
527 fixedURI: "http://mozilla/",
528 alternateURI: "https://www.mozilla.com/",
529 protocolChange: true,
533 fixedURI: "http://mozilla/",
534 alternateURI: "https://www.mozilla.com/",
535 protocolChange: true,
537 affectedByDNSForSingleWordHosts: true,
541 fixedURI: "http://mozilla5/2",
542 alternateURI: "https://www.mozilla5.com/2",
543 protocolChange: true,
545 affectedByDNSForSingleWordHosts: true,
548 input: "mozilla/foo",
549 fixedURI: "http://mozilla/foo",
550 alternateURI: "https://www.mozilla.com/foo",
551 protocolChange: true,
553 affectedByDNSForSingleWordHosts: true,
557 fixedURI: "http://mozilla/",
558 alternateURI: "https://www.mozilla.com/",
560 protocolChange: true,
561 affectedByDNSForSingleWordHosts: true,
565 fixedURI: "http://localhost/",
567 protocolChange: true,
568 affectedByDNSForSingleWordHosts: true,
572 fixedURI: "http://http/",
574 protocolChange: true,
575 affectedByDNSForSingleWordHosts: true,
579 fixedURI: "http://https/",
581 protocolChange: true,
582 affectedByDNSForSingleWordHosts: true,
585 input: "localhost:8080",
586 fixedURI: "http://localhost:8080/",
587 protocolChange: true,
591 fixedURI: "http://plonk:8080/",
592 protocolChange: true,
595 input: "plonk:8080?test",
596 fixedURI: "http://plonk:8080/?test",
597 protocolChange: true,
600 input: "plonk:8080#test",
601 fixedURI: "http://plonk:8080/#test",
602 protocolChange: true,
606 fixedURI: "http://plonk/%20#",
607 alternateURI: "https://www.plonk.com/%20#",
608 protocolChange: true,
609 keywordLookup: false,
613 fixedURI: "http://blah.com./",
614 protocolChange: true,
618 "\u10E0\u10D4\u10D2\u10D8\u10E1\u10E2\u10E0\u10D0\u10EA\u10D8\u10D0.\u10D2\u10D4",
619 fixedURI: "http://xn--lodaehvb5cdik4g.xn--node/",
620 alternateURI: "https://www.xn--lodaehvb5cdik4g.xn--node/",
621 protocolChange: true,
624 input: " \t mozilla.org/\t \t ",
625 fixedURI: "http://mozilla.org/",
626 alternateURI: "https://www.mozilla.org/",
627 protocolChange: true,
630 input: " moz\ti\tlla.org ",
635 fixedURI: "http://mozilla/",
636 alternateURI: "https://www.mozilla.com/",
637 protocolChange: true,
640 input: "mozilla/ test /",
641 fixedURI: "http://mozilla/%20test%20/",
642 alternateURI: "https://www.mozilla.com/%20test%20/",
643 protocolChange: true,
646 input: "mozilla /test/",
650 input: "pserver:8080",
651 fixedURI: "http://pserver:8080/",
652 protocolChange: true,
655 input: "http;mozilla",
656 fixedURI: "http://http;mozilla/",
657 alternateURI: "https://www.http;mozilla.com/",
659 protocolChange: true,
660 affectedByDNSForSingleWordHosts: true,
663 input: "http//mozilla.org",
664 fixedURI: "http://mozilla.org/",
665 shouldRunTest: flags =>
666 flags & Services.uriFixup.FIXUP_FLAG_FIX_SCHEME_TYPOS,
669 input: "http//mozilla.org",
670 fixedURI: "http://http//mozilla.org",
672 protocolChange: true,
673 affectedByDNSForSingleWordHosts: true,
674 shouldRunTest: flags =>
675 !(flags & Services.uriFixup.FIXUP_FLAG_FIX_SCHEME_TYPOS),
678 input: "www.mozilla",
679 fixedURI: "http://www.mozilla/",
680 protocolChange: true,
683 input: "https://sub.www..mozilla...org/",
684 fixedURI: "https://sub.www.mozilla.org/",
687 input: "sub.www..mozilla...org/",
688 fixedURI: "http://sub.www.mozilla.org/",
689 protocolChange: true,
692 input: "sub.www..mozilla...org",
693 fixedURI: "http://sub.www.mozilla.org/",
694 protocolChange: true,
697 input: "www...mozilla",
698 fixedURI: "http://www.mozilla/",
700 protocolChange: true,
701 shouldRunTest: flags =>
702 !gSingleWordDNSLookup &&
703 flags & Services.uriFixup.FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP,
706 input: "www...mozilla",
707 fixedURI: "http://www.mozilla/",
708 protocolChange: true,
709 shouldRunTest: flags =>
710 gSingleWordDNSLookup ||
711 !(flags & Services.uriFixup.FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP),
714 input: "mozilla...org",
715 fixedURI: "http://mozilla.org/",
716 protocolChange: true,
719 input: "モジラ...org",
720 fixedURI: "http://xn--yck6dwa.org/",
721 protocolChange: true,
724 input: "user@localhost",
725 fixedURI: "http://user@localhost/",
726 protocolChange: true,
727 shouldRunTest: () => gSingleWordDNSLookup,
730 input: "user@localhost",
731 fixedURI: "http://user@localhost/",
733 protocolChange: true,
734 shouldRunTest: () => !gSingleWordDNSLookup,
737 input: "user@192.168.0.1",
738 fixedURI: "http://user@192.168.0.1/",
739 protocolChange: true,
742 input: "user@dummy-host",
743 fixedURI: "http://user@dummy-host/",
744 protocolChange: true,
745 shouldRunTest: () => gSingleWordDNSLookup,
748 input: "user@dummy-host",
749 fixedURI: "http://user@dummy-host/",
751 protocolChange: true,
752 shouldRunTest: () => !gSingleWordDNSLookup,
755 input: "user:pass@dummy-host",
756 fixedURI: "http://user:pass@dummy-host/",
757 protocolChange: true,
760 input: ":pass@dummy-host",
761 fixedURI: "http://:pass@dummy-host/",
762 protocolChange: true,
765 input: "user@dummy-host/path",
766 fixedURI: "http://user@dummy-host/path",
767 protocolChange: true,
768 shouldRunTest: () => gSingleWordDNSLookup,
771 input: "jar:file:///omni.ja!/",
772 fixedURI: "jar:file:///omni.ja!/",
776 if (AppConstants.platform == "win") {
778 input: "C:\\some\\file.txt",
779 fixedURI: "file:///C:/some/file.txt",
780 protocolChange: true,
784 fixedURI: "http://mozilla/",
785 alternateURI: "https://www.mozilla.com/",
786 protocolChange: true,
790 fixedURI: "http://a/",
791 alternateURI: "https://www.a.com/",
793 protocolChange: true,
794 affectedByDNSForSingleWordHosts: true,
797 const homeDir = Services.dirsvc.get("Home", Ci.nsIFile).path;
798 const homeBase = AppConstants.platform == "macosx" ? "/Users" : "/home";
802 fixedURI: `file://${homeDir}`,
803 protocolChange: true,
807 fixedURI: `file://${homeDir}/foo`,
808 protocolChange: true,
812 fixedURI: `file://${homeBase}/foo`,
813 protocolChange: true,
817 fixedURI: `file://${homeBase}/foo/bar`,
818 protocolChange: true,
821 input: "/some/file.txt",
822 fixedURI: "file:///some/file.txt",
823 protocolChange: true,
827 fixedURI: "file:////mozilla",
828 protocolChange: true,
832 fixedURI: "file:///a",
833 protocolChange: true,
837 function sanitize(input) {
838 return input.replace(/\r|\n/g, "").trim();
841 add_task(async function setup() {
843 "browser.fixup.typo.scheme",
845 "browser.fixup.domainwhitelist.whitelisted",
846 "browser.fixup.domainsuffixwhitelist.test",
847 "browser.fixup.domainsuffixwhitelist.local.domain",
848 "browser.search.separatePrivateDefault",
849 "browser.search.separatePrivateDefault.ui.enabled",
851 for (let pref of prefList) {
852 Services.prefs.setBoolPref(pref, true);
855 await setupSearchService();
856 await addTestEngines();
858 await Services.search.setDefault(
859 Services.search.getEngineByName(kSearchEngineID),
860 Ci.nsISearchService.CHANGE_REASON_UNKNOWN
862 await Services.search.setDefaultPrivate(
863 Services.search.getEngineByName(kPrivateSearchEngineID),
864 Ci.nsISearchService.CHANGE_REASON_UNKNOWN
868 var gSingleWordDNSLookup = false;
869 add_task(async function run_test() {
870 // Only keywordlookup things should be affected by requiring a DNS lookup for single-word hosts:
872 "Check only keyword lookup testcases should be affected by requiring DNS for single hosts"
874 let affectedTests = testcases.filter(
875 t => !t.keywordLookup && t.affectedByDNSForSingleWordHosts
877 if (affectedTests.length) {
878 for (let testcase of affectedTests) {
879 info("Affected: " + testcase.input);
882 Assert.equal(affectedTests.length, 0);
883 await do_single_test_run();
884 gSingleWordDNSLookup = true;
885 await do_single_test_run();
886 gSingleWordDNSLookup = false;
887 await Services.search.setDefault(
888 Services.search.getEngineByName(kPostSearchEngineID),
889 Ci.nsISearchService.CHANGE_REASON_UNKNOWN
891 await do_single_test_run();
894 async function do_single_test_run() {
895 Services.prefs.setBoolPref(kForceDNSLookup, gSingleWordDNSLookup);
896 let relevantTests = gSingleWordDNSLookup
897 ? testcases.filter(t => t.keywordLookup)
900 let engine = await Services.search.getDefault();
902 engine.name == kPostSearchEngineID
903 ? kPostSearchEngineURL
905 let privateEngine = await Services.search.getDefaultPrivate();
906 let privateEngineUrl = kPrivateSearchEngineURL;
910 fixedURI: expectedFixedURI,
911 alternateURI: alternativeURI,
912 keywordLookup: expectKeywordLookup,
913 protocolChange: expectProtocolChange,
914 inWhitelist: inWhitelist,
915 affectedByDNSForSingleWordHosts: affectedByDNSForSingleWordHosts,
917 } of relevantTests) {
918 // Explicitly force these into a boolean
919 expectKeywordLookup = !!expectKeywordLookup;
920 expectProtocolChange = !!expectProtocolChange;
921 inWhitelist = !!inWhitelist;
922 affectedByDNSForSingleWordHosts = !!affectedByDNSForSingleWordHosts;
924 expectKeywordLookup =
925 expectKeywordLookup &&
926 (!affectedByDNSForSingleWordHosts || !gSingleWordDNSLookup);
928 for (let flags of flagInputs) {
934 " (DNS lookup for single words: " +
935 (gSingleWordDNSLookup ? "yes" : "no") +
939 if (shouldRunTest && !shouldRunTest(flags)) {
945 URIInfo = Services.uriFixup.getFixupURIInfo(testInput, flags);
947 // Both APIs should return an error in the same cases.
948 info("Caught exception: " + ex);
949 Assert.equal(expectedFixedURI, null);
953 // Check the fixedURI:
954 let makeAlternativeURI =
955 flags & Services.uriFixup.FIXUP_FLAGS_MAKE_ALTERNATE_URI;
957 if (makeAlternativeURI && alternativeURI != null) {
959 URIInfo.fixedURI.spec,
961 "should have gotten alternate URI"
965 URIInfo.fixedURI && URIInfo.fixedURI.spec,
967 "should get correct fixed URI"
971 // Check booleans on input:
972 let couldDoKeywordLookup =
973 flags & Services.uriFixup.FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP;
975 !!URIInfo.keywordProviderName,
976 couldDoKeywordLookup && expectKeywordLookup,
977 "keyword lookup as expected"
980 let expectProtocolChangeAfterAlternate = false;
981 // If alternativeURI was created, the protocol of the URI
982 // might have been changed to browser.fixup.alternate.protocol
983 // If the protocol is not the same as what was in expectedFixedURI,
984 // the protocol must've changed in the fixup process.
986 makeAlternativeURI &&
987 alternativeURI != null &&
988 !expectedFixedURI.startsWith(URIInfo.fixedURI.scheme)
990 expectProtocolChangeAfterAlternate = true;
994 URIInfo.fixupChangedProtocol,
995 expectProtocolChange || expectProtocolChangeAfterAlternate,
996 "protocol change as expected"
999 URIInfo.fixupCreatedAlternateURI,
1000 makeAlternativeURI && alternativeURI != null,
1001 "alternative URI as expected"
1004 // Check the preferred URI
1005 if (couldDoKeywordLookup) {
1006 if (expectKeywordLookup) {
1008 let urlparamInput = encodeURIComponent(sanitize(testInput)).replace(
1012 // If the input starts with `?`, then URIInfo.preferredURI.spec will omit it
1013 // In order to test this behaviour, remove `?` only if it is the first character
1014 if (urlparamInput.startsWith("%3F")) {
1015 urlparamInput = urlparamInput.replace("%3F", "");
1018 flags & Services.uriFixup.FIXUP_FLAG_PRIVATE_CONTEXT;
1019 let searchEngineUrl = isPrivate ? privateEngineUrl : engineUrl;
1020 let searchURL = searchEngineUrl.replace(
1024 let spec = URIInfo.preferredURI.spec.replace(/%27/g, "'");
1025 Assert.equal(spec, searchURL, "should get correct search URI");
1026 let providerName = isPrivate ? privateEngine.name : engine.name;
1028 URIInfo.keywordProviderName,
1030 "should get correct provider name"
1032 // Also check keywordToURI() uses the right engine.
1033 let kwInfo = Services.uriFixup.keywordToURI(
1037 Assert.equal(kwInfo.providerName, URIInfo.providerName);
1038 if (providerName == kPostSearchEngineID) {
1039 Assert.ok(kwInfo.postData);
1040 let submission = engine.getSubmission(urlparamInput);
1041 let enginePostData = NetUtil.readInputStreamToString(
1042 submission.postData,
1043 submission.postData.available()
1045 let postData = NetUtil.readInputStreamToString(
1047 kwInfo.postData.available()
1049 Assert.equal(postData, enginePostData);
1053 URIInfo.preferredURI,
1055 "not expecting a preferred URI"
1060 URIInfo.preferredURI.spec,
1061 URIInfo.fixedURI.spec,
1062 "fixed URI should match"
1066 // In these cases, we should never be doing a keyword lookup and
1067 // the fixed URI should be preferred:
1068 let prefURI = URIInfo.preferredURI && URIInfo.preferredURI.spec;
1069 let fixedURI = URIInfo.fixedURI && URIInfo.fixedURI.spec;
1070 Assert.equal(prefURI, fixedURI, "fixed URI should be same as expected");
1073 sanitize(testInput),
1074 URIInfo.originalInput,
1075 "should mirror original input"