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

Side by Side Diff: android_webview/javatests/src/org/chromium/android_webview/test/KeySystemTest.java

Issue 2815103004: Android: convert kEnumName to ENUM_NAME in java_cpp_enum.py. (Closed)
Patch Set: Address agrieve@ comments Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.android_webview.test; 5 package org.chromium.android_webview.test;
6 6
7 import android.support.test.filters.SmallTest; 7 import android.support.test.filters.SmallTest;
8 8
9 import org.chromium.android_webview.AwContents; 9 import org.chromium.android_webview.AwContents;
10 import org.chromium.android_webview.permission.AwPermissionRequest; 10 import org.chromium.android_webview.permission.AwPermissionRequest;
(...skipping 12 matching lines...) Expand all
23 */ 23 */
24 public class KeySystemTest extends AwTestBase { 24 public class KeySystemTest extends AwTestBase {
25 /** 25 /**
26 * AwContentsClient subclass that allows permissions requests for the 26 * AwContentsClient subclass that allows permissions requests for the
27 * protected media ID. This is required for all supported key systems other 27 * protected media ID. This is required for all supported key systems other
28 * than Clear Key. 28 * than Clear Key.
29 */ 29 */
30 private static class EmeAllowingAwContentsClient extends TestAwContentsClien t { 30 private static class EmeAllowingAwContentsClient extends TestAwContentsClien t {
31 @Override 31 @Override
32 public void onPermissionRequest(AwPermissionRequest awPermissionRequest) { 32 public void onPermissionRequest(AwPermissionRequest awPermissionRequest) {
33 if (awPermissionRequest.getResources() == Resource.ProtectedMediaId) { 33 if (awPermissionRequest.getResources() == Resource.PROTECTED_MEDIA_I D) {
34 awPermissionRequest.grant(); 34 awPermissionRequest.grant();
35 } else { 35 } else {
36 awPermissionRequest.deny(); 36 awPermissionRequest.deny();
37 } 37 }
38 } 38 }
39 }; 39 };
40 40
41 private TestAwContentsClient mContentsClient = new EmeAllowingAwContentsClie nt(); 41 private TestAwContentsClient mContentsClient = new EmeAllowingAwContentsClie nt();
42 private AwContents mAwContents; 42 private AwContents mAwContents;
43 43
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 assertEquals(getPlatformKeySystemExpectations(), 126 assertEquals(getPlatformKeySystemExpectations(),
127 isKeySystemSupported("x-com.oem.test-keysystem")); 127 isKeySystemSupported("x-com.oem.test-keysystem"));
128 } 128 }
129 129
130 @Feature({"AndroidWebView"}) 130 @Feature({"AndroidWebView"})
131 @SmallTest 131 @SmallTest
132 public void testSupportPlatformKeySystemNoPrefix() throws Throwable { 132 public void testSupportPlatformKeySystemNoPrefix() throws Throwable {
133 assertEquals("\"NotSupportedError\"", isKeySystemSupported("com.oem.test -keysystem")); 133 assertEquals("\"NotSupportedError\"", isKeySystemSupported("com.oem.test -keysystem"));
134 } 134 }
135 } 135 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698