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

Side by Side Diff: android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnScaleChangedTest.java

Issue 1414403002: Add CommandLineArgumentParameter and use it for WebView tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-cr-526885-read-nested-annotations
Patch Set: Final version Created 5 years, 1 month 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 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.android_webview.test; 5 package org.chromium.android_webview.test;
6 6
7 import android.test.suitebuilder.annotation.SmallTest; 7 import android.test.suitebuilder.annotation.SmallTest;
8 8
9 import org.chromium.android_webview.AwContents; 9 import org.chromium.android_webview.AwContents;
10 import org.chromium.android_webview.test.util.CommonResources; 10 import org.chromium.android_webview.test.util.CommonResources;
11 import org.chromium.base.test.util.parameter.ParameterizedTest;
11 import org.chromium.content.browser.ContentViewCore; 12 import org.chromium.content.browser.ContentViewCore;
12 13
13 /** 14 /**
14 * Tests for the WebViewClient.onScaleChanged. 15 * Tests for the WebViewClient.onScaleChanged.
15 */ 16 */
17 // Run in single-process mode only. Blocked by rendering support crbug.com/52684 2.
18 @ParameterizedTest.Set
jbudorick 2015/10/27 16:14:36 What exactly are these doing...?
mnaganov (inactive) 2015/10/27 23:53:30 Overriding @ParameterizedTest.Set from AwTestBase.
16 public class AwContentsClientOnScaleChangedTest extends AwTestBase { 19 public class AwContentsClientOnScaleChangedTest extends AwTestBase {
17 private TestAwContentsClient mContentsClient; 20 private TestAwContentsClient mContentsClient;
18 private AwContents mAwContents; 21 private AwContents mAwContents;
19 22
20 @Override 23 @Override
21 protected void setUp() throws Exception { 24 protected void setUp() throws Exception {
22 super.setUp(); 25 super.setUp();
23 mContentsClient = new TestAwContentsClient(); 26 mContentsClient = new TestAwContentsClient();
24 AwTestContainerView testContainerView = 27 AwTestContainerView testContainerView =
25 createAwTestContainerViewOnMainSync(mContentsClient); 28 createAwTestContainerViewOnMainSync(mContentsClient);
(...skipping 14 matching lines...) Expand all
40 int callCount = mContentsClient.getOnScaleChangedHelper().getCallCount() ; 43 int callCount = mContentsClient.getOnScaleChangedHelper().getCallCount() ;
41 core.onSizeChanged( 44 core.onSizeChanged(
42 core.getViewportWidthPix() / 2, core.getViewportHeightPix() / 2, 45 core.getViewportWidthPix() / 2, core.getViewportHeightPix() / 2,
43 core.getViewportWidthPix(), core.getViewportHeightPix()); 46 core.getViewportWidthPix(), core.getViewportHeightPix());
44 // TODO: Investigate on using core.zoomIn(); 47 // TODO: Investigate on using core.zoomIn();
45 mContentsClient.getOnScaleChangedHelper().waitForCallback(callCount); 48 mContentsClient.getOnScaleChangedHelper().waitForCallback(callCount);
46 assertTrue("Scale ratio:" + mContentsClient.getOnScaleChangedHelper().ge tLastScaleRatio(), 49 assertTrue("Scale ratio:" + mContentsClient.getOnScaleChangedHelper().ge tLastScaleRatio(),
47 mContentsClient.getOnScaleChangedHelper().getLastScaleRatio() < 1); 50 mContentsClient.getOnScaleChangedHelper().getLastScaleRatio() < 1);
48 } 51 }
49 } 52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698