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

Side by Side Diff: chrome/android/testshell/javatests/src/org/chromium/chrome/testshell/ChromiumTestShellTestBase.java

Issue 73173002: Add ContextMenu support upstream for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added tests, addressed comments Created 7 years 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.testshell; 5 package org.chromium.chrome.testshell;
6 6
7 import android.content.ComponentName; 7 import android.content.ComponentName;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.net.Uri; 10 import android.net.Uri;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 */ 119 */
120 public void loadUrlWithSanitization(final String url) throws InterruptedExce ption { 120 public void loadUrlWithSanitization(final String url) throws InterruptedExce ption {
121 getInstrumentation().runOnMainSync(new Runnable() { 121 getInstrumentation().runOnMainSync(new Runnable() {
122 @Override 122 @Override
123 public void run() { 123 public void run() {
124 getActivity().getActiveTab().loadUrlWithSanitization(url); 124 getActivity().getActiveTab().loadUrlWithSanitization(url);
125 } 125 }
126 }); 126 });
127 waitForActiveShellToBeDoneLoading(); 127 waitForActiveShellToBeDoneLoading();
128 } 128 }
129
130 // TODO(aelias): This method needs to be removed once http://crbug.com/17951 1 is fixed.
131 // Meanwhile, we have to wait if the page has the <meta viewport> tag.
132 /**
133 * Waits till the ContentViewCore receives the expected page scale factor
134 * from the compositor and asserts that this happens.
135 */
136 protected void assertWaitForPageScaleFactorMatch(final float expectedScale)
137 throws InterruptedException {
138 assertTrue(CriteriaHelper.pollForCriteria(new Criteria() {
139 @Override
140 public boolean isSatisfied() {
141 return getActivity().getActiveTab().getContentViewCore().getScal e() ==
142 expectedScale;
143 }
144 }));
145 }
129 } 146 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698