| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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.content.browser.input; | 5 package org.chromium.content.browser.input; |
| 6 | 6 |
| 7 import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout; | 7 import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout; |
| 8 | 8 |
| 9 import android.support.test.filters.LargeTest; | 9 import android.support.test.filters.LargeTest; |
| 10 | 10 |
| 11 import org.chromium.base.test.util.Feature; | 11 import org.chromium.base.test.util.Feature; |
| 12 import org.chromium.base.test.util.RetryOnFailure; | 12 import org.chromium.base.test.util.RetryOnFailure; |
| 13 import org.chromium.base.test.util.UrlUtils; | 13 import org.chromium.base.test.util.UrlUtils; |
| 14 import org.chromium.content.browser.ContentViewCore; | 14 import org.chromium.content.browser.ContentViewCore; |
| 15 import org.chromium.content.browser.test.util.Criteria; | 15 import org.chromium.content.browser.test.util.Criteria; |
| 16 import org.chromium.content.browser.test.util.CriteriaHelper; | 16 import org.chromium.content.browser.test.util.CriteriaHelper; |
| 17 import org.chromium.content.browser.test.util.DOMUtils; | 17 import org.chromium.content.browser.test.util.DOMUtils; |
| 18 import org.chromium.content.browser.test.util.TestCallbackHelperContainer; | 18 import org.chromium.content.browser.test.util.TestCallbackHelperContainer; |
| 19 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnPage
FinishedHelper; | 19 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnPage
FinishedHelper; |
| 20 import org.chromium.content_shell_apk.ContentShellActivityTestRule.RerunWithUpda
tedContainerView; |
| 20 import org.chromium.content_shell_apk.ContentShellTestBase; | 21 import org.chromium.content_shell_apk.ContentShellTestBase; |
| 21 | 22 |
| 22 import java.util.concurrent.TimeUnit; | 23 import java.util.concurrent.TimeUnit; |
| 23 | 24 |
| 24 /** | 25 /** |
| 25 * Integration Tests for SelectPopup. | 26 * Integration Tests for SelectPopup. |
| 26 */ | 27 */ |
| 27 public class SelectPopupTest extends ContentShellTestBase { | 28 public class SelectPopupTest extends ContentShellTestBase { |
| 28 private static final long WAIT_TIMEOUT_SECONDS = scaleTimeout(2); | 29 private static final long WAIT_TIMEOUT_SECONDS = scaleTimeout(2); |
| 29 private static final String SELECT_URL = UrlUtils.encodeHtmlDataUri( | 30 private static final String SELECT_URL = UrlUtils.encodeHtmlDataUri( |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 WAIT_TIMEOUT_SECONDS, TimeUnit.SECONDS); | 104 WAIT_TIMEOUT_SECONDS, TimeUnit.SECONDS); |
| 104 | 105 |
| 105 // The popup should be hidden after the page reload. | 106 // The popup should be hidden after the page reload. |
| 106 CriteriaHelper.pollInstrumentationThread(new PopupHiddenCriteria()); | 107 CriteriaHelper.pollInstrumentationThread(new PopupHiddenCriteria()); |
| 107 | 108 |
| 108 // Click the select and wait for the popup to show. | 109 // Click the select and wait for the popup to show. |
| 109 DOMUtils.clickNode(viewCore, "select"); | 110 DOMUtils.clickNode(viewCore, "select"); |
| 110 CriteriaHelper.pollInstrumentationThread(new PopupShowingCriteria()); | 111 CriteriaHelper.pollInstrumentationThread(new PopupShowingCriteria()); |
| 111 } | 112 } |
| 112 } | 113 } |
| OLD | NEW |