Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1568)

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectFileDialogTest.java

Issue 460453002: Fixed Compilation issues related to API Level of Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added call to quit() for OS version less than JELLY_BEAN_MR2 Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectFileDialogTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectFileDialogTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectFileDialogTest.java
index 953b066148c4bed500284f89db50bd8195fd1d74..e9a81acd1b76dba565e0dc546ae658dc3ae0b0bb 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectFileDialogTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectFileDialogTest.java
@@ -4,8 +4,10 @@
package org.chromium.chrome.browser.input;
+import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Intent;
+import android.os.Build;
import android.provider.MediaStore;
import android.test.suitebuilder.annotation.MediumTest;
@@ -88,6 +90,7 @@ public class SelectFileDialogTest extends ChromeShellTestBase {
/**
* Tests that clicks on <input type="file" /> trigger intent calls to ActivityWindowAndroid.
*/
+ @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
@MediumTest
@Feature({"TextInput", "Main"})
public void testSelectFileAndCancelRequest() throws Throwable {
@@ -104,7 +107,9 @@ public class SelectFileDialogTest extends ChromeShellTestBase {
Intent contentIntent = (Intent)
mActivityWindowAndroidForTest.lastIntent.getParcelableExtra(Intent.EXTRA_INTENT);
assertNotNull(contentIntent);
- assertTrue(contentIntent.hasExtra(Intent.EXTRA_ALLOW_MULTIPLE));
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
+ assertTrue(contentIntent.hasExtra(Intent.EXTRA_ALLOW_MULTIPLE));
+ }
resetActivityWindowAndroidForTest();
DOMUtils.clickNode(this, mContentViewCore, "input_image");

Powered by Google App Engine
This is Rietveld 408576698