| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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; | 5 package org.chromium.content.browser; |
| 6 | 6 |
| 7 import android.test.suitebuilder.annotation.LargeTest; | 7 import android.test.suitebuilder.annotation.LargeTest; |
| 8 | 8 |
| 9 import org.chromium.base.test.util.DisabledTest; |
| 9 import org.chromium.base.test.util.Feature; | 10 import org.chromium.base.test.util.Feature; |
| 10 import org.chromium.content.browser.ContentView; | 11 import org.chromium.content.browser.ContentView; |
| 11 import org.chromium.content.browser.SelectPopupDialog; | 12 import org.chromium.content.browser.SelectPopupDialog; |
| 12 import org.chromium.content.browser.test.util.Criteria; | 13 import org.chromium.content.browser.test.util.Criteria; |
| 13 import org.chromium.content.browser.test.util.CriteriaHelper; | 14 import org.chromium.content.browser.test.util.CriteriaHelper; |
| 14 import org.chromium.content.browser.test.util.DOMUtils; | 15 import org.chromium.content.browser.test.util.DOMUtils; |
| 15 import org.chromium.content.browser.test.util.TestCallbackHelperContainer; | 16 import org.chromium.content.browser.test.util.TestCallbackHelperContainer; |
| 16 import org.chromium.content.browser.test.util.UiUtils; | 17 import org.chromium.content.browser.test.util.UiUtils; |
| 17 import org.chromium.chrome.browser.ContentViewUtil; | 18 import org.chromium.chrome.browser.ContentViewUtil; |
| 18 import org.chromium.chrome.testshell.ChromiumTestShellTestBase; | 19 import org.chromium.chrome.testshell.ChromiumTestShellTestBase; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 42 return SelectPopupDialog.getCurrent() != null; | 43 return SelectPopupDialog.getCurrent() != null; |
| 43 } | 44 } |
| 44 } | 45 } |
| 45 | 46 |
| 46 public SelectPopupOtherContentViewTest() { | 47 public SelectPopupOtherContentViewTest() { |
| 47 } | 48 } |
| 48 | 49 |
| 49 /** | 50 /** |
| 50 * Tests that the showing select popup does not get closed because an unrela
ted ContentView | 51 * Tests that the showing select popup does not get closed because an unrela
ted ContentView |
| 51 * gets destroyed. | 52 * gets destroyed. |
| 53 * |
| 54 * @LargeTest |
| 55 * @Feature({"Browser"}) |
| 56 * BUG 172967 |
| 52 */ | 57 */ |
| 53 @LargeTest | 58 @DisabledTest |
| 54 @Feature({"Browser"}) | |
| 55 public void testPopupNotClosedByOtherContentView() | 59 public void testPopupNotClosedByOtherContentView() |
| 56 throws InterruptedException, Exception, Throwable { | 60 throws InterruptedException, Exception, Throwable { |
| 57 // Load the test page. | 61 // Load the test page. |
| 58 launchChromiumTestShellWithUrl(SELECT_URL); | 62 launchChromiumTestShellWithUrl(SELECT_URL); |
| 59 assertTrue("Page failed to load", waitForActiveShellToBeDoneLoading()); | 63 assertTrue("Page failed to load", waitForActiveShellToBeDoneLoading()); |
| 60 | 64 |
| 61 final ContentView view = getActivity().getActiveContentView(); | 65 final ContentView view = getActivity().getActiveContentView(); |
| 62 final TestCallbackHelperContainer viewClient = | 66 final TestCallbackHelperContainer viewClient = |
| 63 new TestCallbackHelperContainer(view); | 67 new TestCallbackHelperContainer(view); |
| 64 | 68 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 81 }); | 85 }); |
| 82 | 86 |
| 83 // Process some more events to give a chance to the dialog to hide if it
were to. | 87 // Process some more events to give a chance to the dialog to hide if it
were to. |
| 84 getInstrumentation().waitForIdleSync(); | 88 getInstrumentation().waitForIdleSync(); |
| 85 | 89 |
| 86 // The popup should still be shown. | 90 // The popup should still be shown. |
| 87 assertNotNull("The select popup got hidden by destroying of unrelated Co
ntentViewCore.", | 91 assertNotNull("The select popup got hidden by destroying of unrelated Co
ntentViewCore.", |
| 88 SelectPopupDialog.getCurrent()); | 92 SelectPopupDialog.getCurrent()); |
| 89 } | 93 } |
| 90 } | 94 } |
| OLD | NEW |