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

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerTest.java

Issue 2878543003: Hook up Reader Mode InfoBar (Closed)
Patch Set: fix tests Created 3 years, 6 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.compositor.layouts; 5 package org.chromium.chrome.browser.compositor.layouts;
6 6
7 import static org.chromium.base.test.util.Restriction.RESTRICTION_TYPE_NON_LOW_E ND_DEVICE; 7 import static org.chromium.base.test.util.Restriction.RESTRICTION_TYPE_NON_LOW_E ND_DEVICE;
8 8
9 import android.content.Context; 9 import android.content.Context;
10 import android.graphics.PointF; 10 import android.graphics.PointF;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 mTabModelSelector.selectModel(incognitoSelected); 128 mTabModelSelector.selectModel(incognitoSelected);
129 LayoutManagerHost layoutManagerHost = new MockLayoutHost(context); 129 LayoutManagerHost layoutManagerHost = new MockLayoutHost(context);
130 130
131 // Build a fake content container 131 // Build a fake content container
132 FrameLayout parentContainer = new FrameLayout(context); 132 FrameLayout parentContainer = new FrameLayout(context);
133 FrameLayout container = new FrameLayout(context); 133 FrameLayout container = new FrameLayout(context);
134 parentContainer.addView(container); 134 parentContainer.addView(container);
135 135
136 mManagerPhone = new LayoutManagerChromePhone(layoutManagerHost); 136 mManagerPhone = new LayoutManagerChromePhone(layoutManagerHost);
137 mManager = mManagerPhone; 137 mManager = mManagerPhone;
138 mManager.init(mTabModelSelector, null, null, container, null, null, null ); 138 mManager.init(mTabModelSelector, null, null, container, null, null);
139 initializeMotionEvent(); 139 initializeMotionEvent();
140 } 140 }
141 141
142 private void eventDown(long time, PointF p) { 142 private void eventDown(long time, PointF p) {
143 mLastDownTime = time; 143 mLastDownTime = time;
144 144
145 mPointerCoords[0].x = p.x * mDpToPx; 145 mPointerCoords[0].x = p.x * mDpToPx;
146 mPointerCoords[0].y = p.y * mDpToPx; 146 mPointerCoords[0].y = p.y * mDpToPx;
147 147
148 MotionEvent event = MotionEvent.obtain(mLastDownTime, time, MotionEvent. ACTION_DOWN, 148 MotionEvent event = MotionEvent.obtain(mLastDownTime, time, MotionEvent. ACTION_DOWN,
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 mManager.getActiveLayout() instanceof ToolbarSwipeLayout); 556 mManager.getActiveLayout() instanceof ToolbarSwipeLayout);
557 Assert.assertTrue("LayoutManager took too long to finish the animations" , 557 Assert.assertTrue("LayoutManager took too long to finish the animations" ,
558 simulateTime(mManager, 1000)); 558 simulateTime(mManager, 1000));
559 } 559 }
560 560
561 @Override 561 @Override
562 public Tab createTab(int id, boolean incognito) { 562 public Tab createTab(int id, boolean incognito) {
563 return new Tab(id, incognito, null); 563 return new Tab(id, incognito, null);
564 } 564 }
565 } 565 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698