blob: 889b20b30081dda5685c63002afd3a565123fda3 [file] [log] [blame]
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.appsecurity.cts;
/**
* Set of tests that verify behavior of the Scoped Directory access API.
*/
public class ScopedDirectoryAccessTest extends DocumentsTestCase {
public void testInvalidPath() throws Exception {
runDeviceTests(CLIENT_PKG, ".ScopedDirectoryAccessClientTest", "testInvalidPath");
}
public void testUserRejects() throws Exception {
runDeviceTests(CLIENT_PKG, ".ScopedDirectoryAccessClientTest", "testUserRejects");
}
public void testUserAccepts() throws Exception {
runDeviceTests(CLIENT_PKG, ".ScopedDirectoryAccessClientTest", "testUserAccepts");
}
public void testUserAcceptsNewDirectory() throws Exception {
runDeviceTests(CLIENT_PKG, ".ScopedDirectoryAccessClientTest",
"testUserAcceptsNewDirectory");
}
public void testNotAskedAgain() throws Exception {
runDeviceTests(CLIENT_PKG, ".ScopedDirectoryAccessClientTest", "testNotAskedAgain");
}
public void testDeniesOnceForAllClearedWhenPackageRemoved() throws Exception {
runDeviceTests(CLIENT_PKG, ".ScopedDirectoryAccessClientTest",
"testRemovePackageStep1UserDenies");
reinstallClientPackage();
runDeviceTests(CLIENT_PKG, ".ScopedDirectoryAccessClientTest",
"testRemovePackageStep2UserAcceptsDoNotClear");
}
public void testDeniesOnceButAllowsAskingAgain() throws Exception {
runDeviceTests(CLIENT_PKG, ".ScopedDirectoryAccessClientTest",
"testDeniesOnceButAllowsAskingAgain");
}
public void testDeniesOnceForAll() throws Exception {
runDeviceTests(CLIENT_PKG, ".ScopedDirectoryAccessClientTest", "testDeniesOnceForAll");
}
}