| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.test; | 5 package org.chromium.chrome.browser.test; |
| 6 | 6 |
| 7 import android.app.AlertDialog; | 7 import android.app.AlertDialog; |
| 8 import android.content.DialogInterface; | 8 import android.content.DialogInterface; |
| 9 import android.test.suitebuilder.annotation.MediumTest; | 9 import android.test.suitebuilder.annotation.MediumTest; |
| 10 import android.util.Log; | 10 import android.util.Log; |
| 11 import android.view.View; | 11 import android.view.View; |
| 12 import android.widget.Button; | 12 import android.widget.Button; |
| 13 import android.widget.CheckBox; | 13 import android.widget.CheckBox; |
| 14 import android.widget.EditText; | 14 import android.widget.EditText; |
| 15 | 15 |
| 16 import org.chromium.base.ThreadUtils; | 16 import org.chromium.base.ThreadUtils; |
| 17 import org.chromium.base.test.util.DisabledTest; | 17 import org.chromium.base.test.util.DisabledTest; |
| 18 import org.chromium.base.test.util.Feature; | 18 import org.chromium.base.test.util.Feature; |
| 19 import org.chromium.base.test.util.UrlUtils; | 19 import org.chromium.base.test.util.UrlUtils; |
| 20 import org.chromium.chrome.browser.JavascriptAppModalDialog; | 20 import org.chromium.chrome.browser.JavascriptAppModalDialog; |
| 21 import org.chromium.chrome.test.util.TabBaseTabUtils; | 21 import org.chromium.chrome.test.util.TabUtils; |
| 22 import org.chromium.chrome.test.util.TabBaseTabUtils.TestCallbackHelperContainer
ForTab; | 22 import org.chromium.chrome.test.util.TabUtils.TestCallbackHelperContainerForTab; |
| 23 import org.chromium.chrome.testshell.ChromiumTestShellTestBase; | 23 import org.chromium.chrome.testshell.ChromiumTestShellTestBase; |
| 24 import org.chromium.content.browser.test.util.Criteria; | 24 import org.chromium.content.browser.test.util.Criteria; |
| 25 import org.chromium.content.browser.test.util.CriteriaHelper; | 25 import org.chromium.content.browser.test.util.CriteriaHelper; |
| 26 import org.chromium.content.browser.test.util.TestCallbackHelperContainer; | 26 import org.chromium.content.browser.test.util.TestCallbackHelperContainer; |
| 27 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnEval
uateJavaScriptResultHelper; | 27 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnEval
uateJavaScriptResultHelper; |
| 28 | 28 |
| 29 import java.util.concurrent.Callable; | 29 import java.util.concurrent.Callable; |
| 30 import java.util.concurrent.ExecutionException; | 30 import java.util.concurrent.ExecutionException; |
| 31 import java.util.concurrent.TimeoutException; | 31 import java.util.concurrent.TimeoutException; |
| 32 | 32 |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 assertNotNull("No '" + readableName + "' button in confirm dialog.", but
ton); | 412 assertNotNull("No '" + readableName + "' button in confirm dialog.", but
ton); |
| 413 assertEquals("'" + readableName + "' button is not visible.", | 413 assertEquals("'" + readableName + "' button is not visible.", |
| 414 View.VISIBLE, | 414 View.VISIBLE, |
| 415 button.getVisibility()); | 415 button.getVisibility()); |
| 416 assertEquals("'" + readableName + "' button has wrong text", | 416 assertEquals("'" + readableName + "' button has wrong text", |
| 417 getActivity().getResources().getString(expectedTextResourceId), | 417 getActivity().getResources().getString(expectedTextResourceId), |
| 418 button.getText().toString()); | 418 button.getText().toString()); |
| 419 } | 419 } |
| 420 | 420 |
| 421 private TestCallbackHelperContainerForTab getActiveTabTestCallbackHelperCont
ainer() { | 421 private TestCallbackHelperContainerForTab getActiveTabTestCallbackHelperCont
ainer() { |
| 422 return TabBaseTabUtils.getTestCallbackHelperContainer(getActivity().getA
ctiveTab()); | 422 return TabUtils.getTestCallbackHelperContainer(getActivity().getActiveTa
b()); |
| 423 } | 423 } |
| 424 } | 424 } |
| OLD | NEW |