OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.support.test.filters.SmallTest; |
8 | 8 |
9 import org.chromium.android_webview.AwContentsStatics; | 9 import org.chromium.android_webview.AwContentsStatics; |
10 import org.chromium.android_webview.AwWebContentsObserver; | 10 import org.chromium.android_webview.AwWebContentsObserver; |
11 import org.chromium.base.test.util.Feature; | 11 import org.chromium.base.test.util.Feature; |
12 import org.chromium.content.browser.test.util.TestCallbackHelperContainer; | 12 import org.chromium.content.browser.test.util.TestCallbackHelperContainer; |
13 | 13 |
14 /** | 14 /** |
15 * Tests for the AwWebContentsObserver class. | 15 * Tests for the AwWebContentsObserver class. |
16 */ | 16 */ |
17 public class AwWebContentsObserverTest extends AwTestBase { | 17 public class AwWebContentsObserverTest extends AwTestBase { |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 callCount = doUpdateVisitedHistoryHelper.getCallCount(); | 139 callCount = doUpdateVisitedHistoryHelper.getCallCount(); |
140 mWebContentsObserver.didNavigateAnyFrame(EXAMPLE_URL, baseUrl, reload); | 140 mWebContentsObserver.didNavigateAnyFrame(EXAMPLE_URL, baseUrl, reload); |
141 doUpdateVisitedHistoryHelper.waitForCallback(callCount); | 141 doUpdateVisitedHistoryHelper.waitForCallback(callCount); |
142 assertEquals("doUpdateVisitedHistory should be called for reloads.", cal
lCount + 1, | 142 assertEquals("doUpdateVisitedHistory should be called for reloads.", cal
lCount + 1, |
143 doUpdateVisitedHistoryHelper.getCallCount()); | 143 doUpdateVisitedHistoryHelper.getCallCount()); |
144 assertEquals("doUpdateVisitedHistory should be called for reloads.", EXA
MPLE_URL, | 144 assertEquals("doUpdateVisitedHistory should be called for reloads.", EXA
MPLE_URL, |
145 doUpdateVisitedHistoryHelper.getUrl()); | 145 doUpdateVisitedHistoryHelper.getUrl()); |
146 assertEquals(reload, doUpdateVisitedHistoryHelper.getIsReload()); | 146 assertEquals(reload, doUpdateVisitedHistoryHelper.getIsReload()); |
147 } | 147 } |
148 } | 148 } |
OLD | NEW |