Index: components/devtools_bridge/android/javatests/src/org/chromium/components/devtools_bridge/tests/DebugActivity.java |
diff --git a/components/devtools_bridge/android/javatests/src/org/chromium/components/devtools_bridge/tests/DebugActivity.java b/components/devtools_bridge/android/javatests/src/org/chromium/components/devtools_bridge/tests/DebugActivity.java |
index 13db1cde39d49a397ff48673fdbc35683de530b1..1cadbf2f2e80bbc103b4322bed9eb77d14dce55f 100644 |
--- a/components/devtools_bridge/android/javatests/src/org/chromium/components/devtools_bridge/tests/DebugActivity.java |
+++ b/components/devtools_bridge/android/javatests/src/org/chromium/components/devtools_bridge/tests/DebugActivity.java |
@@ -6,26 +6,17 @@ |
import android.app.Activity; |
import android.content.Intent; |
-import android.os.Build; |
import android.os.Bundle; |
-import android.view.LayoutInflater; |
import android.view.View; |
-import android.view.ViewGroup; |
import android.widget.Button; |
import android.widget.LinearLayout; |
import android.widget.LinearLayout.LayoutParams; |
import android.widget.TextView; |
-import org.chromium.components.devtools_bridge.apiary.ApiaryClientFactory; |
-import org.chromium.components.devtools_bridge.apiary.TestApiaryClientFactory; |
-import org.chromium.components.devtools_bridge.ui.GCDRegistrationFragment; |
- |
/** |
* Activity for testing devtools bridge. |
*/ |
public class DebugActivity extends Activity { |
- private static final int LAYOUT_ID = 1000; |
- |
private LinearLayout mLayout; |
@Override |
@@ -33,17 +24,15 @@ |
super.onCreate(savedInstanceState); |
mLayout = new LinearLayout(this); |
- mLayout.setId(LAYOUT_ID); |
mLayout.setOrientation(LinearLayout.VERTICAL); |
- String intro = |
- "To test LocalTunnelBridge manually: \n" |
- + "1. Enable USB debugging.\n" |
- + "2. Run ChromeShell along with this app.\n" |
- + "3. Start the LocalTunnelBridge.\n" |
- + "4. Connect the device to a desktop via USB.\n" |
- + "5. Open chrome://inspect#devices on desktop Chrome.\n" |
- + "6. Observe 2 identical Chrome Shells on the device."; |
+ String intro = "To test LocalTunnelBridge manually: \n" + |
+ "1. Enable USB debugging.\n" + |
+ "2. Run ChromeShell along with this app.\n" + |
+ "3. Start the LocalTunnelBridge.\n" + |
+ "4. Connect the device to a desktop via USB.\n" + |
+ "5. Open chrome://inspect#devices on desktop Chrome.\n" + |
+ "6. Observe 2 identical Chrome Shells on the device."; |
TextView textView = new TextView(this); |
textView.setText(intro); |
@@ -56,12 +45,6 @@ |
LayoutParams layoutParam = new LayoutParams(LayoutParams.MATCH_PARENT, |
LayoutParams.MATCH_PARENT); |
- |
- getFragmentManager() |
- .beginTransaction() |
- .add(LAYOUT_ID, new TestGCDRegistrationFragment()) |
- .commit(); |
- |
setContentView(mLayout, layoutParam); |
} |
@@ -86,49 +69,5 @@ |
startService(intent); |
} |
} |
- |
- private static class TestGCDRegistrationFragment |
- extends GCDRegistrationFragment implements View.OnClickListener { |
- private Button mButton; |
- |
- @Override |
- public View onCreateView( |
- LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { |
- mButton = new Button(getActivity()); |
- mButton.setOnClickListener(this); |
- updateText(); |
- return mButton; |
- } |
- |
- public void updateText() { |
- mButton.setText(isRegistered() |
- ? "Unregister (registered for " + getOwner() + ")" |
- : "Register in GCD"); |
- } |
- |
- @Override |
- protected void onRegistrationStatusChange() { |
- updateText(); |
- } |
- |
- @Override |
- protected ApiaryClientFactory newClientFactory() { |
- return new TestApiaryClientFactory(); |
- } |
- |
- @Override |
- protected String generateDisplayName() { |
- return Build.MODEL + " Test app"; |
- } |
- |
- @Override |
- public void onClick(View v) { |
- if (!isRegistered()) { |
- register(); |
- } else { |
- unregister(); |
- } |
- } |
- } |
} |