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

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

Issue 2129913005: Revert of Web MIDI: use mojom::blink::PermissionService directly to ask permission (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | content/content_renderer.gypi » ('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.android_webview.test; 5 package org.chromium.android_webview.test;
6 6
7 import android.os.Handler; 7 import android.os.Handler;
8 import android.os.Looper; 8 import android.os.Looper;
9 import android.test.suitebuilder.annotation.SmallTest; 9 import android.test.suitebuilder.annotation.SmallTest;
10 10
11 import org.chromium.android_webview.AwContents; 11 import org.chromium.android_webview.AwContents;
12 import org.chromium.android_webview.permission.AwPermissionRequest; 12 import org.chromium.android_webview.permission.AwPermissionRequest;
13 import org.chromium.android_webview.test.util.CommonResources; 13 import org.chromium.android_webview.test.util.CommonResources;
14 import org.chromium.base.test.util.Feature; 14 import org.chromium.base.test.util.Feature;
15 import org.chromium.net.test.util.TestWebServer; 15 import org.chromium.net.test.util.TestWebServer;
16 16
17 import java.util.concurrent.Callable; 17 import java.util.concurrent.Callable;
18 18
19 /** 19 /**
20 * Test AwPermissionManager. 20 * Test AwPermissionManager.
21 */ 21 */
22 public class AwPermissionManagerTest extends AwTestBase { 22 public class AwPermissionManagerTest extends AwTestBase {
23 23
24 private static final String REQUEST_DUPLICATE = "<html> <script>" 24 private static final String REQUEST_DUPLICATE = "<html> <script>"
25 + "navigator.requestMIDIAccess().then(function() {" 25 + "navigator.requestMIDIAccess({sysex: true}).then(function() {"
26 + "});" 26 + "});"
27 + "navigator.requestMIDIAccess().then(function() {" 27 + "navigator.requestMIDIAccess({sysex: true}).then(function() {"
28 + " window.document.title = 'second-granted';" 28 + " window.document.title = 'second-granted';"
29 + "});" 29 + "});"
30 + "</script><body>" 30 + "</script><body>"
31 + "</body></html>"; 31 + "</body></html>";
32 32
33 private TestWebServer mTestWebServer; 33 private TestWebServer mTestWebServer;
34 private String mPage; 34 private String mPage;
35 35
36 @Override 36 @Override
37 protected void setUp() throws Exception { 37 protected void setUp() throws Exception {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 throws Exception { 86 throws Exception {
87 pollInstrumentationThread(new Callable<Boolean>() { 87 pollInstrumentationThread(new Callable<Boolean>() {
88 @Override 88 @Override
89 public Boolean call() throws Exception { 89 public Boolean call() throws Exception {
90 return title.equals(getTitleOnUiThread(awContents)); 90 return title.equals(getTitleOnUiThread(awContents));
91 } 91 }
92 }); 92 });
93 } 93 }
94 } 94 }
95 95
OLDNEW
« no previous file with comments | « no previous file | content/content_renderer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698