| OLD | NEW |
| 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.support.test.filters.MediumTest; | 8 import android.support.test.filters.MediumTest; |
| 9 | 9 |
| 10 import org.chromium.base.ThreadUtils; | 10 import org.chromium.base.ThreadUtils; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 CriteriaHelper.pollInstrumentationThread(new Criteria() { | 70 CriteriaHelper.pollInstrumentationThread(new Criteria() { |
| 71 @Override | 71 @Override |
| 72 public boolean isSatisfied() { | 72 public boolean isSatisfied() { |
| 73 if (getActivity().getActivityTab() == null) return false; | 73 if (getActivity().getActivityTab() == null) return false; |
| 74 if (getActivity().getActivityTab().getInfoBarContainer() == null
) return false; | 74 if (getActivity().getActivityTab().getInfoBarContainer() == null
) return false; |
| 75 return true; | 75 return true; |
| 76 } | 76 } |
| 77 }); | 77 }); |
| 78 InfoBarContainer container = getActivity().getActivityTab().getInfoBarCo
ntainer(); | 78 InfoBarContainer container = getActivity().getActivityTab().getInfoBarCo
ntainer(); |
| 79 mListener = new InfoBarTestAnimationListener(); | 79 mListener = new InfoBarTestAnimationListener(); |
| 80 container.setAnimationListener(mListener); | 80 container.addAnimationListener(mListener); |
| 81 | 81 |
| 82 final String locationUrl = mTestServer.getURL(GEOLOCATION_PAGE); | 82 final String locationUrl = mTestServer.getURL(GEOLOCATION_PAGE); |
| 83 final GeolocationInfo geolocationSettings = ThreadUtils.runOnUiThreadBlo
ckingNoException( | 83 final GeolocationInfo geolocationSettings = ThreadUtils.runOnUiThreadBlo
ckingNoException( |
| 84 new Callable<GeolocationInfo>() { | 84 new Callable<GeolocationInfo>() { |
| 85 @Override | 85 @Override |
| 86 public GeolocationInfo call() { | 86 public GeolocationInfo call() { |
| 87 return new GeolocationInfo(locationUrl, null, false); | 87 return new GeolocationInfo(locationUrl, null, false); |
| 88 } | 88 } |
| 89 }); | 89 }); |
| 90 | 90 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 CriteriaHelper.pollInstrumentationThread(new Criteria() { | 149 CriteriaHelper.pollInstrumentationThread(new Criteria() { |
| 150 @Override | 150 @Override |
| 151 public boolean isSatisfied() { | 151 public boolean isSatisfied() { |
| 152 if (getActivity().getActivityTab() == null) return false; | 152 if (getActivity().getActivityTab() == null) return false; |
| 153 if (getActivity().getActivityTab().getInfoBarContainer() == null
) return false; | 153 if (getActivity().getActivityTab().getInfoBarContainer() == null
) return false; |
| 154 return true; | 154 return true; |
| 155 } | 155 } |
| 156 }); | 156 }); |
| 157 InfoBarContainer container = getActivity().getActivityTab().getInfoBarCo
ntainer(); | 157 InfoBarContainer container = getActivity().getActivityTab().getInfoBarCo
ntainer(); |
| 158 mListener = new InfoBarTestAnimationListener(); | 158 mListener = new InfoBarTestAnimationListener(); |
| 159 container.setAnimationListener(mListener); | 159 container.addAnimationListener(mListener); |
| 160 | 160 |
| 161 final String locationUrl = mTestServer.getURL(GEOLOCATION_IFRAME_PAGE); | 161 final String locationUrl = mTestServer.getURL(GEOLOCATION_IFRAME_PAGE); |
| 162 final GeolocationInfo geolocationSettings = ThreadUtils.runOnUiThreadBlo
ckingNoException( | 162 final GeolocationInfo geolocationSettings = ThreadUtils.runOnUiThreadBlo
ckingNoException( |
| 163 new Callable<GeolocationInfo>() { | 163 new Callable<GeolocationInfo>() { |
| 164 @Override | 164 @Override |
| 165 public GeolocationInfo call() { | 165 public GeolocationInfo call() { |
| 166 return new GeolocationInfo(locationUrl, null, false); | 166 return new GeolocationInfo(locationUrl, null, false); |
| 167 } | 167 } |
| 168 }); | 168 }); |
| 169 | 169 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 public boolean isPermissionRevokedByPolicy(String permission) { | 258 public boolean isPermissionRevokedByPolicy(String permission) { |
| 259 return mPolicyRevokedPermissions.contains(permission); | 259 return mPolicyRevokedPermissions.contains(permission); |
| 260 } | 260 } |
| 261 | 261 |
| 262 @Override | 262 @Override |
| 263 public void requestPermissions(String[] permissions, PermissionCallback
callback) { | 263 public void requestPermissions(String[] permissions, PermissionCallback
callback) { |
| 264 } | 264 } |
| 265 } | 265 } |
| 266 | 266 |
| 267 } | 267 } |
| OLD | NEW |