quic: fix testConn.uncheckedHandshake

This test helper was sending the connection-under-test
the wrong TLS 1-RTT data: It was resending the handshake-level
data rather than the application-level data.

This error was hidden by a crypto/tls bug, fixed in CL 522595.

Change-Id: Ib672b174ddb1dfa5763f1eb3dd830932a0d26cad
Reviewed-on: https://go-review.googlesource.com/c/net/+/522678
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/internal/quic/tls_test.go b/internal/quic/tls_test.go
index 1e3d6b6..35cb8bf 100644
--- a/internal/quic/tls_test.go
+++ b/internal/quic/tls_test.go
@@ -242,6 +242,7 @@
 // Useful for testing scenarios where configuration has
 // changed the handshake responses in some way.
 func (tc *testConn) uncheckedHandshake() {
+	tc.t.Helper()
 	defer func(saved map[byte]bool) {
 		tc.ignoreFrames = saved
 	}(tc.ignoreFrames)
@@ -268,6 +269,7 @@
 				ranges: []i64range[packetNumber]{{0, tc.sentFramePacket.num + 1}},
 			})
 	} else {
+		tc.wantIdle("initial frames are ignored")
 		tc.writeFrames(packetTypeInitial,
 			debugFrameCrypto{
 				data: tc.cryptoDataIn[tls.QUICEncryptionLevelInitial],
@@ -285,7 +287,7 @@
 			debugFrameHandshakeDone{})
 		tc.writeFrames(packetType1RTT,
 			debugFrameCrypto{
-				data: tc.cryptoDataIn[tls.QUICEncryptionLevelHandshake],
+				data: tc.cryptoDataIn[tls.QUICEncryptionLevelApplication],
 			})
 		tc.wantFrame("client ACKs server's first 1-RTT packet",
 			packetType1RTT, debugFrameAck{