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

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/infobar/PermissionUpdateInfobarTest.java

Issue 2431753003: Merge EmbeddedTestServer#createAndStartDefaultServer() and createAndStartFileServer() (Closed)
Patch Set: Created 4 years, 2 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 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.chrome.browser.infobar; 5 package org.chromium.chrome.browser.infobar;
6 6
7 import android.Manifest; 7 import android.Manifest;
8 import android.os.Environment;
9 import android.test.suitebuilder.annotation.MediumTest; 8 import android.test.suitebuilder.annotation.MediumTest;
10 9
11 import org.chromium.base.ThreadUtils; 10 import org.chromium.base.ThreadUtils;
12 import org.chromium.chrome.browser.preferences.website.ContentSetting; 11 import org.chromium.chrome.browser.preferences.website.ContentSetting;
13 import org.chromium.chrome.browser.preferences.website.GeolocationInfo; 12 import org.chromium.chrome.browser.preferences.website.GeolocationInfo;
14 import org.chromium.chrome.test.ChromeTabbedActivityTestBase; 13 import org.chromium.chrome.test.ChromeTabbedActivityTestBase;
15 import org.chromium.chrome.test.util.ChromeTabUtils; 14 import org.chromium.chrome.test.util.ChromeTabUtils;
16 import org.chromium.chrome.test.util.InfoBarTestAnimationListener; 15 import org.chromium.chrome.test.util.InfoBarTestAnimationListener;
17 import org.chromium.chrome.test.util.browser.LocationSettingsTestUtil; 16 import org.chromium.chrome.test.util.browser.LocationSettingsTestUtil;
18 import org.chromium.content.browser.test.util.Criteria; 17 import org.chromium.content.browser.test.util.Criteria;
(...skipping 25 matching lines...) Expand all
44 private EmbeddedTestServer mTestServer; 43 private EmbeddedTestServer mTestServer;
45 44
46 @Override 45 @Override
47 public void startMainActivity() throws InterruptedException { 46 public void startMainActivity() throws InterruptedException {
48 startMainActivityOnBlankPage(); 47 startMainActivityOnBlankPage();
49 } 48 }
50 49
51 @Override 50 @Override
52 protected void setUp() throws Exception { 51 protected void setUp() throws Exception {
53 super.setUp(); 52 super.setUp();
54 mTestServer = EmbeddedTestServer.createAndStartFileServer( 53 mTestServer = EmbeddedTestServer.createAndStartServer(getInstrumentation ().getContext());
55 getInstrumentation().getContext(), Environment.getExternalStorag eDirectory());
56 } 54 }
57 55
58 @Override 56 @Override
59 protected void tearDown() throws Exception { 57 protected void tearDown() throws Exception {
60 mTestServer.stopAndDestroyServer(); 58 mTestServer.stopAndDestroyServer();
61 super.tearDown(); 59 super.tearDown();
62 } 60 }
63 61
64 // Ensure destroying the permission update infobar does not crash when handl ing geolocation 62 // Ensure destroying the permission update infobar does not crash when handl ing geolocation
65 // permissions. 63 // permissions.
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 public boolean isPermissionRevokedByPolicy(String permission) { 258 public boolean isPermissionRevokedByPolicy(String permission) {
261 return mPolicyRevokedPermissions.contains(permission); 259 return mPolicyRevokedPermissions.contains(permission);
262 } 260 }
263 261
264 @Override 262 @Override
265 public void requestPermissions(String[] permissions, PermissionCallback callback) { 263 public void requestPermissions(String[] permissions, PermissionCallback callback) {
266 } 264 }
267 } 265 }
268 266
269 } 267 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698