+ @Test
+ public void testBookmarkDocomo() {
+ doTest("MEBKM:URL:google.com;;", "http://google.com", null);
+ doTest("MEBKM:URL:http://google.com;;", "http://google.com", null);
+ doTest("MEBKM:URL:google.com;TITLE:Google;", "http://google.com", "Google");
+ }
+
+ @Test
+ public void testURI() {
+ doTest("google.com", "http://google.com", null);
+ doTest("http://google.com", "http://google.com", null);
+ doTest("https://google.com", "https://google.com", null);
+ doTest("google.com:443", "http://google.com:443", null);
+ doTest("https://www.google.com/calendar/hosted/google.com/embed?mode=AGENDA&force_login=true&src=google.com_726f6f6d5f6265707075@resource.calendar.google.com",
+ "https://www.google.com/calendar/hosted/google.com/embed?mode=AGENDA&force_login=true&src=google.com_726f6f6d5f6265707075@resource.calendar.google.com",
+ null);
+ }
+
+ @Test
+ public void testURLTO() {
+ doTest("urlto::bar.com", "http://bar.com", null);
+ doTest("urlto::http://bar.com", "http://bar.com", null);
+ doTest("urlto:foo:bar.com", "http://bar.com", "foo");
+ }
+
+ @Test
+ public void testGarbage() {
+ String text = "Da65cV1g^>%^f0bAbPn1CJB6lV7ZY8hs0Sm:DXU0cd]GyEeWBz8]bUHLB";
+ Result fakeResult = new Result(text, null, null, BarcodeFormat.QR_CODE);
+ ParsedResult result = ResultParser.parseResult(fakeResult);
+ assertSame(ParsedResultType.TEXT, result.getType());
+ assertEquals(text, result.getDisplayResult());
+ }
+
+ @Test