Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1389)

Unified Diff: components/devtools_bridge/test/android/javatests/src/org/chromium/components/devtools_bridge/DataChannelObserverMock.java

Issue 1142463003: Remove devtools_bridge component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698