summaryrefslogtreecommitdiffstats
path: root/harmony-tests
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2014-06-20 16:56:49 +0100
committerNeil Fuller <nfuller@google.com>2014-06-23 10:32:28 +0100
commit1f3014901704f3ae81538773b8a0b382945adc8d (patch)
treec80912598f2c1d86e21e23f127c5b74b461344ac /harmony-tests
parent2eb56b69de339978a29d94531759b465742f027f (diff)
downloadlibcore-1f3014901704f3ae81538773b8a0b382945adc8d.zip
libcore-1f3014901704f3ae81538773b8a0b382945adc8d.tar.gz
libcore-1f3014901704f3ae81538773b8a0b382945adc8d.tar.bz2
Unimplement Console.readPassword and remove test
ConsoleTest.test_readPassword* fails CTS tests. Context: Under standard Android applications the System.console() method will return null. The Console.readPassword() method must turn off echo. Under automated tests the ConsoleTest is exercising a Console object with fake stdout / stdin streams to get around the absence of a System.console(). setEcho() is hardcoded to use stdin / stdout in the native code. Under the test runners stdin / stdout are not connected to a TTY leading to a ENOTTY. Under Android readPassword is unimportant. Rather than leaving untested security-related code the password methods are being unimplemented. It is unlikely this code has ever been used on Android given the absence of a System Console instance. Bug: 12491103 Change-Id: I755c014e6b53236f5bef0535be137dd721918b44
Diffstat (limited to 'harmony-tests')
-rw-r--r--harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ConsoleTest.java6
1 files changed, 0 insertions, 6 deletions
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ConsoleTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ConsoleTest.java
index ec423e9..99becf9 100644
--- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ConsoleTest.java
+++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ConsoleTest.java
@@ -95,12 +95,6 @@ public class ConsoleTest extends TestCase {
assertEquals("2 Please input a line of string to test:", prompt);
}
- public void test_readPassword_LString_LObject() {
- console.readPassword("%d", 3);
- String prompt = new String(((ByteArrayOutputStream) out).toByteArray());
- assertEquals("3\n", prompt);
- }
-
/**
* {@link java.io.Console#writer()}
*/