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.MediumTest; | 7 import android.support.test.filters.MediumTest; |
8 | 8 |
9 import org.chromium.android_webview.AwContents; | 9 import org.chromium.android_webview.AwContents; |
10 import org.chromium.base.test.util.Feature; | 10 import org.chromium.base.test.util.Feature; |
11 import org.chromium.content.browser.test.util.TestCallbackHelperContainer; | 11 import org.chromium.content.browser.test.util.TestCallbackHelperContainer; |
12 | 12 |
13 /** | 13 /** |
14 * Tests for the ContentViewClient.onPageStarted() method. | 14 * Tests for the ContentViewClient.onPageStarted() method. |
15 */ | 15 */ |
16 public class ClientOnPageStartedTest extends AwTestBase { | 16 public class ClientOnPageStartedTest extends AwTestBase { |
17 | 17 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 assertEquals(invalidUrl, onReceivedErrorHelper.getFailingUrl()); | 98 assertEquals(invalidUrl, onReceivedErrorHelper.getFailingUrl()); |
99 assertEquals(invalidUrl, onPageStartedHelper.getUrl()); | 99 assertEquals(invalidUrl, onPageStartedHelper.getUrl()); |
100 | 100 |
101 // Rather than wait a fixed time to see that another onPageStarted callb
ack isn't issued | 101 // Rather than wait a fixed time to see that another onPageStarted callb
ack isn't issued |
102 // we load a valid page. Since callbacks arrive sequentially, this will
ensure that | 102 // we load a valid page. Since callbacks arrive sequentially, this will
ensure that |
103 // any extra calls of onPageStarted / onReceivedError will arrive to our
client. | 103 // any extra calls of onPageStarted / onReceivedError will arrive to our
client. |
104 testContentsClient.setAllowAboutBlank(); | 104 testContentsClient.setAllowAboutBlank(); |
105 loadUrlSync(mAwContents, onPageFinishedHelper, "about:blank"); | 105 loadUrlSync(mAwContents, onPageFinishedHelper, "about:blank"); |
106 } | 106 } |
107 } | 107 } |
OLD | NEW |