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.contextmenu; | 5 package org.chromium.chrome.browser.contextmenu; |
6 | 6 |
7 import android.content.ClipData; | 7 import android.content.ClipData; |
8 import android.content.ClipboardManager; | 8 import android.content.ClipboardManager; |
9 import android.content.Context; | 9 import android.content.Context; |
10 import android.test.suitebuilder.annotation.LargeTest; | 10 import android.test.suitebuilder.annotation.LargeTest; |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 } | 246 } |
247 | 247 |
248 @MediumTest | 248 @MediumTest |
249 @Feature({"Browser"}) | 249 @Feature({"Browser"}) |
250 @RetryOnFailure | 250 @RetryOnFailure |
251 public void testCopyEmailAddress() throws InterruptedException, TimeoutExcep
tion { | 251 public void testCopyEmailAddress() throws InterruptedException, TimeoutExcep
tion { |
252 Tab tab = getActivity().getActivityTab(); | 252 Tab tab = getActivity().getActivityTab(); |
253 ContextMenuUtils.selectContextMenuItem(this, tab, "testEmail", | 253 ContextMenuUtils.selectContextMenuItem(this, tab, "testEmail", |
254 R.id.contextmenu_copy_email_address); | 254 R.id.contextmenu_copy_email_address); |
255 | 255 |
256 assertEquals("Copied email address is not correct", "someone@example.com
", | 256 assertEquals("Copied email address is not correct", |
257 getClipboardText()); | 257 "someone1@example.com,someone2@example.com", getClipboardText())
; |
258 } | 258 } |
259 | 259 |
260 @LargeTest | 260 @LargeTest |
261 @Feature({"Browser"}) | 261 @Feature({"Browser"}) |
262 @RetryOnFailure | 262 @RetryOnFailure |
263 public void testSaveDataUrl() | 263 public void testSaveDataUrl() |
264 throws InterruptedException, TimeoutException, SecurityException, IO
Exception { | 264 throws InterruptedException, TimeoutException, SecurityException, IO
Exception { |
265 saveMediaFromContextMenu("dataUrlIcon", R.id.contextmenu_save_image, FIL
ENAME_GIF); | 265 saveMediaFromContextMenu("dataUrlIcon", R.id.contextmenu_save_image, FIL
ENAME_GIF); |
266 } | 266 } |
267 | 267 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 } | 364 } |
365 | 365 |
366 /** | 366 /** |
367 * Makes sure there are no files with names identical to the ones this test
uses in the | 367 * Makes sure there are no files with names identical to the ones this test
uses in the |
368 * downloads directory | 368 * downloads directory |
369 */ | 369 */ |
370 private void deleteTestFiles() { | 370 private void deleteTestFiles() { |
371 deleteFilesInDownloadDirectory(TEST_FILES); | 371 deleteFilesInDownloadDirectory(TEST_FILES); |
372 } | 372 } |
373 } | 373 } |
OLD | NEW |