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

Side by Side Diff: content/public/test/android/javatests/src/org/chromium/content/browser/test/util/DOMUtils.java

Issue 476113004: Replace overdraw_bottom_height with top_controls_layout_height. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ScrollViewportRounding test Created 6 years, 4 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 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.test.util; 5 package org.chromium.content.browser.test.util;
6 6
7 import android.graphics.Rect; 7 import android.graphics.Rect;
8 import android.test.ActivityInstrumentationTestCase2; 8 import android.test.ActivityInstrumentationTestCase2;
9 import android.util.JsonReader; 9 import android.util.JsonReader;
10 10
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 } 244 }
245 245
246 /** 246 /**
247 * Returns click targets for a given DOM node. 247 * Returns click targets for a given DOM node.
248 */ 248 */
249 private static int[] getClickTargetForNode(ContentViewCore viewCore, String nodeName) 249 private static int[] getClickTargetForNode(ContentViewCore viewCore, String nodeName)
250 throws InterruptedException, TimeoutException { 250 throws InterruptedException, TimeoutException {
251 Rect bounds = getNodeBounds(viewCore, nodeName); 251 Rect bounds = getNodeBounds(viewCore, nodeName);
252 Assert.assertNotNull("Failed to get DOM element bounds of '" + nodeName + "'.", bounds); 252 Assert.assertNotNull("Failed to get DOM element bounds of '" + nodeName + "'.", bounds);
253 253
254 int clickX = (int) viewCore.getRenderCoordinates().fromLocalCssToPix(bou nds.exactCenterX()) 254 int clickX = (int) viewCore.getRenderCoordinates().fromLocalCssToPix(bou nds.exactCenterX());
255 + viewCore.getViewportSizeOffsetWidthPix();
256 int clickY = (int) viewCore.getRenderCoordinates().fromLocalCssToPix(bou nds.exactCenterY()) 255 int clickY = (int) viewCore.getRenderCoordinates().fromLocalCssToPix(bou nds.exactCenterY())
257 + viewCore.getViewportSizeOffsetHeightPix(); 256 + viewCore.getTopControlsLayoutHeightPix();
258 return new int[] { clickX, clickY }; 257 return new int[] { clickX, clickY };
259 } 258 }
260 } 259 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698