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

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

Issue 2815653003: IPH - connect data saver previews (Closed)
Patch Set: Addressed comments Created 3 years, 7 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.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
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698