1 // Copyright 2022 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 package org.chromium.base.test.util; 6 7 import java.lang.annotation.ElementType; 8 import java.lang.annotation.Inherited; 9 import java.lang.annotation.Retention; 10 import java.lang.annotation.RetentionPolicy; 11 import java.lang.annotation.Target; 12 13 /** Skips the annotated test when the device's API level is higher than {@code value()}. */ 14 @Inherited 15 @Retention(RetentionPolicy.RUNTIME) 16 @Target({ElementType.METHOD, ElementType.TYPE}) 17 public @interface MaxAndroidSdkLevel { 18 /** Maximum API level in which the test is run. */ value()19 int value(); 20 21 /** Why a test is skipped above this API level. */ reason()22 String reason() default ""; 23 } 24