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.content.browser; | 5 package org.chromium.content.browser; |
6 | 6 |
| 7 import android.content.ClipData; |
7 import android.content.ClipboardManager; | 8 import android.content.ClipboardManager; |
8 import android.content.ClipData; | |
9 import android.content.Context; | 9 import android.content.Context; |
10 import android.os.Build; | 10 import android.os.Build; |
11 import android.test.suitebuilder.annotation.LargeTest; | 11 import android.test.suitebuilder.annotation.LargeTest; |
12 import android.text.TextUtils; | 12 import android.text.TextUtils; |
13 import android.view.KeyEvent; | |
14 | 13 |
15 import org.chromium.base.ThreadUtils; | 14 import org.chromium.base.ThreadUtils; |
16 import org.chromium.base.test.util.Feature; | 15 import org.chromium.base.test.util.Feature; |
17 import org.chromium.base.test.util.UrlUtils; | 16 import org.chromium.base.test.util.UrlUtils; |
18 import org.chromium.content.browser.input.ImeAdapter; | 17 import org.chromium.content.browser.input.ImeAdapter; |
19 import org.chromium.content.browser.test.util.Criteria; | 18 import org.chromium.content.browser.test.util.Criteria; |
20 import org.chromium.content.browser.test.util.CriteriaHelper; | 19 import org.chromium.content.browser.test.util.CriteriaHelper; |
21 import org.chromium.content_shell_apk.ContentShellTestBase; | 20 import org.chromium.content_shell_apk.ContentShellTestBase; |
22 | 21 |
23 import java.util.concurrent.Callable; | 22 import java.util.concurrent.Callable; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // Returns whether there is a primary clip with content on the current clipb
oard. | 87 // Returns whether there is a primary clip with content on the current clipb
oard. |
89 private Boolean hasPrimaryClip(ClipboardManager clipboardManager) { | 88 private Boolean hasPrimaryClip(ClipboardManager clipboardManager) { |
90 final ClipData clip = clipboardManager.getPrimaryClip(); | 89 final ClipData clip = clipboardManager.getPrimaryClip(); |
91 if (clip != null && clip.getItemCount() > 0) { | 90 if (clip != null && clip.getItemCount() > 0) { |
92 return !TextUtils.isEmpty(clip.getItemAt(0).getText()); | 91 return !TextUtils.isEmpty(clip.getItemAt(0).getText()); |
93 } | 92 } |
94 | 93 |
95 return false; | 94 return false; |
96 } | 95 } |
97 } | 96 } |
OLD | NEW |