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

Side by Side Diff: android_webview/tools/system_webview_shell/layout_tests/src/org/chromium/webview_shell/test/WebViewLayoutTest.java

Issue 2116763002: Reland: Web MIDI: use mojom::blink::PermissionService directly to ask permission (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for second attempt Created 4 years, 4 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
« no previous file with comments | « no previous file | android_webview/tools/system_webview_shell/test/data/blink-apis/webmidi/requestmidiaccess.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.webview_shell.test; 5 package org.chromium.webview_shell.test;
6 6
7 import android.test.ActivityInstrumentationTestCase2; 7 import android.test.ActivityInstrumentationTestCase2;
8 import android.test.suitebuilder.annotation.MediumTest; 8 import android.test.suitebuilder.annotation.MediumTest;
9 9
10 import junit.framework.ComparisonFailure; 10 import junit.framework.ComparisonFailure;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 if (!subsetWebView.contains(propertyBlink)) { 196 if (!subsetWebView.contains(propertyBlink)) {
197 missing.append(interfaceS + "." + propertyBlink + "\n"); 197 missing.append(interfaceS + "." + propertyBlink + "\n");
198 } 198 }
199 } 199 }
200 } 200 }
201 assertEquals("Missing webview interfaces found", "", missing.toString()) ; 201 assertEquals("Missing webview interfaces found", "", missing.toString()) ;
202 } 202 }
203 203
204 @MediumTest 204 @MediumTest
205 public void testRequestMIDIAccess() throws Exception { 205 public void testRequestMIDIAccess() throws Exception {
206 mTestActivity.setGrantPermission(true);
207 runWebViewLayoutTest("blink-apis/webmidi/requestmidiaccess.html", 206 runWebViewLayoutTest("blink-apis/webmidi/requestmidiaccess.html",
208 "blink-apis/webmidi/requestmidiaccess-expected.txt"); 207 "blink-apis/webmidi/requestmidiaccess-expected.txt");
208 }
209
210 @MediumTest
211 public void testRequestMIDIAccessWithSysex() throws Exception {
212 mTestActivity.setGrantPermission(true);
213 runWebViewLayoutTest("blink-apis/webmidi/requestmidiaccess-with-sysex.ht ml",
214 "blink-apis/webmidi/requestmidiaccess-with-sysex-expected.txt");
209 mTestActivity.setGrantPermission(false); 215 mTestActivity.setGrantPermission(false);
210 } 216 }
211 217
212 @MediumTest 218 @MediumTest
213 public void testRequestMIDIAccessDenyPermission() throws Exception { 219 public void testRequestMIDIAccessDenyPermission() throws Exception {
214 runWebViewLayoutTest("blink-apis/webmidi/requestmidiaccess-permission-de nied.html", 220 runWebViewLayoutTest("blink-apis/webmidi/requestmidiaccess-permission-de nied.html",
215 "blink-apis/webmidi/requestmidiaccess-permission-denied-expected .html"); 221 "blink-apis/webmidi/requestmidiaccess-permission-denied-expected .txt");
216 } 222 }
217 223
218 // Blink platform API tests 224 // Blink platform API tests
219 225
220 @MediumTest 226 @MediumTest
221 public void testGeolocationCallbacks() throws Exception { 227 public void testGeolocationCallbacks() throws Exception {
222 runWebViewLayoutTest("blink-apis/geolocation/geolocation-permission-call backs.html", 228 runWebViewLayoutTest("blink-apis/geolocation/geolocation-permission-call backs.html",
223 "blink-apis/geolocation/geolocation-permission-callbacks-expecte d.txt"); 229 "blink-apis/geolocation/geolocation-permission-callbacks-expecte d.txt");
224 } 230 }
225 231
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 private boolean isInterfaceOrGlobalObject(String s) { 396 private boolean isInterfaceOrGlobalObject(String s) {
391 return s.startsWith("interface") || s.startsWith("[GLOBAL OBJECT]"); 397 return s.startsWith("interface") || s.startsWith("[GLOBAL OBJECT]");
392 } 398 }
393 399
394 private boolean isInterfaceProperty(String s) { 400 private boolean isInterfaceProperty(String s) {
395 return s.startsWith("getter") || s.startsWith("setter") 401 return s.startsWith("getter") || s.startsWith("setter")
396 || s.startsWith("method") || s.startsWith("attribute"); 402 || s.startsWith("method") || s.startsWith("attribute");
397 } 403 }
398 404
399 } 405 }
OLDNEW
« no previous file with comments | « no previous file | android_webview/tools/system_webview_shell/test/data/blink-apis/webmidi/requestmidiaccess.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698