Index: components/devtools_bridge/test/android/javatests/src/org/chromium/components/devtools_bridge/DataChannelObserverMock.java |
diff --git a/components/devtools_bridge/test/android/javatests/src/org/chromium/components/devtools_bridge/DataChannelObserverMock.java b/components/devtools_bridge/test/android/javatests/src/org/chromium/components/devtools_bridge/DataChannelObserverMock.java |
deleted file mode 100644 |
index 68972da89fc16945bae9c31543c142320b335784..0000000000000000000000000000000000000000 |
--- a/components/devtools_bridge/test/android/javatests/src/org/chromium/components/devtools_bridge/DataChannelObserverMock.java |
+++ /dev/null |
@@ -1,36 +0,0 @@ |
-// Copyright 2014 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-package org.chromium.components.devtools_bridge; |
- |
-import java.nio.ByteBuffer; |
-import java.util.concurrent.CountDownLatch; |
-import java.util.concurrent.LinkedBlockingDeque; |
- |
-/** |
- * Mock for AbstractDataChannel.Observer. |
- */ |
-public class DataChannelObserverMock implements AbstractDataChannel.Observer { |
- public final CountDownLatch opened = new CountDownLatch(1); |
- public final CountDownLatch closed = new CountDownLatch(1); |
- public final LinkedBlockingDeque<byte[]> received = new LinkedBlockingDeque<byte[]>(); |
- |
- public void onStateChange(AbstractDataChannel.State state) { |
- switch (state) { |
- case OPEN: |
- opened.countDown(); |
- break; |
- |
- case CLOSED: |
- closed.countDown(); |
- break; |
- } |
- } |
- |
- public void onMessage(ByteBuffer message) { |
- byte[] bytes = new byte[message.remaining()]; |
- message.get(bytes); |
- received.add(bytes); |
- } |
-} |