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

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectPopupOtherContentViewTest.java

Issue 14018004: [Android] Refactor NativeView to be able to use it for AutofillDialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
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.chrome.browser.input; 5 package org.chromium.chrome.browser.input;
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.DisabledTest;
10 import org.chromium.base.test.util.Feature; 10 import org.chromium.base.test.util.Feature;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Once clicked, the popup should show up. 70 // Once clicked, the popup should show up.
71 DOMUtils.clickNode(this, view, viewClient, "select"); 71 DOMUtils.clickNode(this, view, viewClient, "select");
72 assertTrue("The select popup did not show up on click.", 72 assertTrue("The select popup did not show up on click.",
73 CriteriaHelper.pollForCriteria(new PopupShowingCriteria())); 73 CriteriaHelper.pollForCriteria(new PopupShowingCriteria()));
74 74
75 // Now create and destroy a different ContentView. 75 // Now create and destroy a different ContentView.
76 UiUtils.runOnUiThread(getActivity(), new Runnable() { 76 UiUtils.runOnUiThread(getActivity(), new Runnable() {
77 @Override 77 @Override
78 public void run() { 78 public void run() {
79 int nativeWebContents = ContentViewUtil.createNativeWebContents( false); 79 int nativeWebContents = ContentViewUtil.createNativeWebContents( false);
80 WindowAndroid nativeWindow = new WindowAndroid(getActivity()); 80 WindowAndroid windowAndroid = new WindowAndroid(getActivity());
81 ContentView contentView = ContentView.newInstance( 81 ContentView contentView = ContentView.newInstance(
82 getActivity(), nativeWebContents, 82 getActivity(), nativeWebContents,
83 nativeWindow, ContentView.PERSONALITY_CHROME); 83 windowAndroid, ContentView.PERSONALITY_CHROME);
84 contentView.destroy(); 84 contentView.destroy();
85 } 85 }
86 }); 86 });
87 87
88 // Process some more events to give a chance to the dialog to hide if it were to. 88 // Process some more events to give a chance to the dialog to hide if it were to.
89 getInstrumentation().waitForIdleSync(); 89 getInstrumentation().waitForIdleSync();
90 90
91 // The popup should still be shown. 91 // The popup should still be shown.
92 assertNotNull("The select popup got hidden by destroying of unrelated Co ntentViewCore.", 92 assertNotNull("The select popup got hidden by destroying of unrelated Co ntentViewCore.",
93 SelectPopupDialog.getCurrent()); 93 SelectPopupDialog.getCurrent());
94 } 94 }
95 } 95 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698