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

Unified Diff: components/devtools_bridge/android/javatests/src/org/chromium/components/devtools_bridge/apiary/OAuthClientTest.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/android/javatests/src/org/chromium/components/devtools_bridge/apiary/OAuthClientTest.java
diff --git a/components/devtools_bridge/android/javatests/src/org/chromium/components/devtools_bridge/apiary/OAuthClientTest.java b/components/devtools_bridge/android/javatests/src/org/chromium/components/devtools_bridge/apiary/OAuthClientTest.java
deleted file mode 100644
index 78c7c540d2b27e63c7d571fcb52abf104b932b62..0000000000000000000000000000000000000000
--- a/components/devtools_bridge/android/javatests/src/org/chromium/components/devtools_bridge/apiary/OAuthClientTest.java
+++ /dev/null
@@ -1,39 +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.apiary;
-
-import android.test.InstrumentationTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-
-import junit.framework.Assert;
-
-import org.chromium.components.devtools_bridge.util.TestSource;
-
-/**
- * Tests for {@link OAuthClient}.
- */
-public class OAuthClientTest extends InstrumentationTestCase {
- private static final String ACCESS_TOKEN =
- "ya29.rgBgy64Y1MACXNmPDUpPGbwFuAec2NCCDJwaEp8DwLnV8RBk45p9RBqBfEQUYxL6OVB-oyktRqZj0w";
- private static final String REFRESH_TOKEN =
- "1/cWihsJmDMujYfhzBVTwgh4ukiFyiiRWLmFwTv4EigzU";
-
- @SmallTest
- public void testResponse() throws Exception {
- TestSource source = new TestSource();
- source.write()
- .beginObject()
- .name("access_token").value(ACCESS_TOKEN)
- .name("token_type").value("Bearer")
- .name("expires_in").value(3600) // seconds
- .name("refresh_token").value(REFRESH_TOKEN)
- .endObject()
- .close();
- OAuthResult result = OAuthClient.readResponse(source.read(), 1111);
- Assert.assertEquals(ACCESS_TOKEN, result.accessToken);
- Assert.assertEquals(REFRESH_TOKEN, result.refreshToken);
- Assert.assertEquals(1111 + 3600000, result.expirationTimeMs);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698