| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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.prerender; | 5 package org.chromium.chrome.browser.prerender; |
| 6 | 6 |
| 7 import static org.chromium.base.test.util.Restriction.RESTRICTION_TYPE_NON_LOW_E
ND_DEVICE; | 7 import static org.chromium.base.test.util.Restriction.RESTRICTION_TYPE_NON_LOW_E
ND_DEVICE; |
| 8 | 8 |
| 9 import android.graphics.Rect; | 9 import android.graphics.Rect; |
| 10 import android.test.suitebuilder.annotation.SmallTest; | 10 import android.support.test.filters.SmallTest; |
| 11 import android.util.Pair; | 11 import android.util.Pair; |
| 12 | 12 |
| 13 import org.chromium.base.ThreadUtils; | 13 import org.chromium.base.ThreadUtils; |
| 14 import org.chromium.base.test.util.Feature; | 14 import org.chromium.base.test.util.Feature; |
| 15 import org.chromium.base.test.util.Restriction; | 15 import org.chromium.base.test.util.Restriction; |
| 16 import org.chromium.chrome.browser.profiles.Profile; | 16 import org.chromium.chrome.browser.profiles.Profile; |
| 17 import org.chromium.content.browser.test.NativeLibraryTestBase; | 17 import org.chromium.content.browser.test.NativeLibraryTestBase; |
| 18 import org.chromium.content.browser.test.util.Criteria; | 18 import org.chromium.content.browser.test.util.Criteria; |
| 19 import org.chromium.content.browser.test.util.CriteriaHelper; | 19 import org.chromium.content.browser.test.util.CriteriaHelper; |
| 20 import org.chromium.content_public.browser.WebContents; | 20 import org.chromium.content_public.browser.WebContents; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 private void ensureCompletedPrerenderForUrl(final WebContents webContents, f
inal String url) { | 130 private void ensureCompletedPrerenderForUrl(final WebContents webContents, f
inal String url) { |
| 131 CriteriaHelper.pollUiThread(new Criteria("No Prerender") { | 131 CriteriaHelper.pollUiThread(new Criteria("No Prerender") { |
| 132 @Override | 132 @Override |
| 133 public boolean isSatisfied() { | 133 public boolean isSatisfied() { |
| 134 return ExternalPrerenderHandler.hasPrerenderedAndFinishedLoading
Url( | 134 return ExternalPrerenderHandler.hasPrerenderedAndFinishedLoading
Url( |
| 135 mProfile, url, webContents); | 135 mProfile, url, webContents); |
| 136 } | 136 } |
| 137 }); | 137 }); |
| 138 } | 138 } |
| 139 } | 139 } |
| OLD | NEW |