ditch isLikelyText flag, set mimeType to text/plain in that case

This commit is contained in:
Vincent Breitmoser
2016-02-23 14:55:23 +01:00
parent 8714a5eac4
commit 03e695c650
7 changed files with 33 additions and 26 deletions

View File

@@ -162,7 +162,6 @@ public class InputDataOperationTest {
OpenPgpMetadata metadata = result.mMetadata.get(0);
Assert.assertEquals("text/plain", metadata.getMimeType());
Assert.assertEquals("utf-8", metadata.getCharset());
Assert.assertTrue("data should be looksLikeText", metadata.isLooksLikeText());
metadata = result.mMetadata.get(1);
Assert.assertEquals("text/testvalue", metadata.getMimeType());
@@ -214,7 +213,6 @@ public class InputDataOperationTest {
OpenPgpMetadata metadata = result.mMetadata.get(0);
Assert.assertEquals("text/plain", metadata.getMimeType());
Assert.assertTrue("data should be looksLikeText", metadata.isLooksLikeText());
Assert.assertNull("charset was bad so it should not be set", metadata.getCharset());
Assert.assertTrue("faulty charset should have been detected",
@@ -236,7 +234,6 @@ public class InputDataOperationTest {
OpenPgpMetadata metadata = result.mMetadata.get(0);
Assert.assertEquals("text/plain", metadata.getMimeType());
Assert.assertTrue("data should be looksLikeText", metadata.isLooksLikeText());
Assert.assertEquals("charset should be set since it was guessed and not faulty",
"utf-8", metadata.getCharset());
@@ -258,8 +255,7 @@ public class InputDataOperationTest {
Assert.assertNull(result.mDecryptVerifyResult);
OpenPgpMetadata metadata = result.mMetadata.get(0);
Assert.assertEquals("application/octet-stream", metadata.getMimeType());
Assert.assertTrue("data should be looksLikeText", metadata.isLooksLikeText());
Assert.assertEquals("text/plain", metadata.getMimeType());
Assert.assertEquals("charset should be set since it was guessed and not faulty",
"utf-8", metadata.getCharset());