Merge "Add *Test marker to print manager parameter tests. This should help with automation of these tests." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
365de1594f
@@ -37,6 +37,8 @@ import android.print.mockservice.PrintServiceCallbacks;
|
|||||||
import android.print.mockservice.PrinterDiscoverySessionCallbacks;
|
import android.print.mockservice.PrinterDiscoverySessionCallbacks;
|
||||||
import android.print.mockservice.StubbablePrinterDiscoverySession;
|
import android.print.mockservice.StubbablePrinterDiscoverySession;
|
||||||
|
|
||||||
|
import android.test.suitebuilder.annotation.LargeTest;
|
||||||
|
import android.test.suitebuilder.annotation.MediumTest;
|
||||||
import org.mockito.invocation.InvocationOnMock;
|
import org.mockito.invocation.InvocationOnMock;
|
||||||
import org.mockito.stubbing.Answer;
|
import org.mockito.stubbing.Answer;
|
||||||
|
|
||||||
@@ -253,6 +255,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.getPrintJobInfo
|
* test IPrintManager.getPrintJobInfo
|
||||||
*/
|
*/
|
||||||
|
@LargeTest
|
||||||
public void testGetPrintJobInfo() throws Exception {
|
public void testGetPrintJobInfo() throws Exception {
|
||||||
startPrinting();
|
startPrinting();
|
||||||
|
|
||||||
@@ -274,6 +277,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.getPrintJobInfos
|
* test IPrintManager.getPrintJobInfos
|
||||||
*/
|
*/
|
||||||
|
@LargeTest
|
||||||
public void testGetPrintJobInfos() throws Exception {
|
public void testGetPrintJobInfos() throws Exception {
|
||||||
startPrinting();
|
startPrinting();
|
||||||
|
|
||||||
@@ -301,6 +305,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.print
|
* test IPrintManager.print
|
||||||
*/
|
*/
|
||||||
|
@LargeTest
|
||||||
public void testPrint() throws Exception {
|
public void testPrint() throws Exception {
|
||||||
final String name = "dummy print job";
|
final String name = "dummy print job";
|
||||||
|
|
||||||
@@ -354,6 +359,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.cancelPrintJob
|
* test IPrintManager.cancelPrintJob
|
||||||
*/
|
*/
|
||||||
|
@LargeTest
|
||||||
public void testCancelPrintJob() throws Exception {
|
public void testCancelPrintJob() throws Exception {
|
||||||
startPrinting();
|
startPrinting();
|
||||||
|
|
||||||
@@ -377,6 +383,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.restartPrintJob
|
* test IPrintManager.restartPrintJob
|
||||||
*/
|
*/
|
||||||
|
@LargeTest
|
||||||
public void testRestartPrintJob() throws Exception {
|
public void testRestartPrintJob() throws Exception {
|
||||||
startPrinting();
|
startPrinting();
|
||||||
|
|
||||||
@@ -399,6 +406,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.addPrintJobStateChangeListener
|
* test IPrintManager.addPrintJobStateChangeListener
|
||||||
*/
|
*/
|
||||||
|
@MediumTest
|
||||||
public void testAddPrintJobStateChangeListener() throws Exception {
|
public void testAddPrintJobStateChangeListener() throws Exception {
|
||||||
final IPrintJobStateChangeListener listener = createMockIPrintJobStateChangeListener();
|
final IPrintJobStateChangeListener listener = createMockIPrintJobStateChangeListener();
|
||||||
|
|
||||||
@@ -424,6 +432,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.removePrintJobStateChangeListener
|
* test IPrintManager.removePrintJobStateChangeListener
|
||||||
*/
|
*/
|
||||||
|
@MediumTest
|
||||||
public void testRemovePrintJobStateChangeListener() throws Exception {
|
public void testRemovePrintJobStateChangeListener() throws Exception {
|
||||||
final IPrintJobStateChangeListener listener = createMockIPrintJobStateChangeListener();
|
final IPrintJobStateChangeListener listener = createMockIPrintJobStateChangeListener();
|
||||||
|
|
||||||
@@ -447,6 +456,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.addPrintServicesChangeListener
|
* test IPrintManager.addPrintServicesChangeListener
|
||||||
*/
|
*/
|
||||||
|
@MediumTest
|
||||||
public void testAddPrintServicesChangeListener() throws Exception {
|
public void testAddPrintServicesChangeListener() throws Exception {
|
||||||
final IPrintServicesChangeListener listener = createMockIPrintServicesChangeListener();
|
final IPrintServicesChangeListener listener = createMockIPrintServicesChangeListener();
|
||||||
|
|
||||||
@@ -465,6 +475,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.removePrintServicesChangeListener
|
* test IPrintManager.removePrintServicesChangeListener
|
||||||
*/
|
*/
|
||||||
|
@MediumTest
|
||||||
public void testRemovePrintServicesChangeListener() throws Exception {
|
public void testRemovePrintServicesChangeListener() throws Exception {
|
||||||
final IPrintServicesChangeListener listener = createMockIPrintServicesChangeListener();
|
final IPrintServicesChangeListener listener = createMockIPrintServicesChangeListener();
|
||||||
|
|
||||||
@@ -488,6 +499,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.getPrintServices
|
* test IPrintManager.getPrintServices
|
||||||
*/
|
*/
|
||||||
|
@MediumTest
|
||||||
public void testGetPrintServices() throws Exception {
|
public void testGetPrintServices() throws Exception {
|
||||||
List<PrintServiceInfo> printServices = mIPrintManager.getPrintServices(
|
List<PrintServiceInfo> printServices = mIPrintManager.getPrintServices(
|
||||||
PrintManager.ALL_SERVICES, mUserId);
|
PrintManager.ALL_SERVICES, mUserId);
|
||||||
@@ -509,6 +521,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.setPrintServiceEnabled
|
* test IPrintManager.setPrintServiceEnabled
|
||||||
*/
|
*/
|
||||||
|
@MediumTest
|
||||||
public void testSetPrintServiceEnabled() throws Exception {
|
public void testSetPrintServiceEnabled() throws Exception {
|
||||||
final ComponentName printService = mIPrintManager.getPrintServices(
|
final ComponentName printService = mIPrintManager.getPrintServices(
|
||||||
PrintManager.ALL_SERVICES, mUserId).get(0).getComponentName();
|
PrintManager.ALL_SERVICES, mUserId).get(0).getComponentName();
|
||||||
@@ -548,6 +561,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.createPrinterDiscoverySession
|
* test IPrintManager.createPrinterDiscoverySession
|
||||||
*/
|
*/
|
||||||
|
@MediumTest
|
||||||
public void testCreatePrinterDiscoverySession() throws Exception {
|
public void testCreatePrinterDiscoverySession() throws Exception {
|
||||||
final IPrinterDiscoveryObserver listener = createMockIPrinterDiscoveryObserver();
|
final IPrinterDiscoveryObserver listener = createMockIPrinterDiscoveryObserver();
|
||||||
|
|
||||||
@@ -573,6 +587,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.startPrinterDiscovery
|
* test IPrintManager.startPrinterDiscovery
|
||||||
*/
|
*/
|
||||||
|
@LargeTest
|
||||||
public void testStartPrinterDiscovery() throws Exception {
|
public void testStartPrinterDiscovery() throws Exception {
|
||||||
startPrinting();
|
startPrinting();
|
||||||
|
|
||||||
@@ -615,6 +630,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.stopPrinterDiscovery
|
* test IPrintManager.stopPrinterDiscovery
|
||||||
*/
|
*/
|
||||||
|
@MediumTest
|
||||||
public void testStopPrinterDiscovery() throws Exception {
|
public void testStopPrinterDiscovery() throws Exception {
|
||||||
final IPrinterDiscoveryObserver listener = createMockIPrinterDiscoveryObserver();
|
final IPrinterDiscoveryObserver listener = createMockIPrinterDiscoveryObserver();
|
||||||
|
|
||||||
@@ -638,6 +654,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.validatePrinters
|
* test IPrintManager.validatePrinters
|
||||||
*/
|
*/
|
||||||
|
@LargeTest
|
||||||
public void testValidatePrinters() throws Exception {
|
public void testValidatePrinters() throws Exception {
|
||||||
startPrinting();
|
startPrinting();
|
||||||
|
|
||||||
@@ -678,6 +695,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.startPrinterStateTracking
|
* test IPrintManager.startPrinterStateTracking
|
||||||
*/
|
*/
|
||||||
|
@LargeTest
|
||||||
public void testStartPrinterStateTracking() throws Exception {
|
public void testStartPrinterStateTracking() throws Exception {
|
||||||
startPrinting();
|
startPrinting();
|
||||||
|
|
||||||
@@ -699,6 +717,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.getCustomPrinterIcon
|
* test IPrintManager.getCustomPrinterIcon
|
||||||
*/
|
*/
|
||||||
|
@LargeTest
|
||||||
public void testGetCustomPrinterIcon() throws Exception {
|
public void testGetCustomPrinterIcon() throws Exception {
|
||||||
startPrinting();
|
startPrinting();
|
||||||
|
|
||||||
@@ -720,6 +739,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.stopPrinterStateTracking
|
* test IPrintManager.stopPrinterStateTracking
|
||||||
*/
|
*/
|
||||||
|
@LargeTest
|
||||||
public void testStopPrinterStateTracking() throws Exception {
|
public void testStopPrinterStateTracking() throws Exception {
|
||||||
startPrinting();
|
startPrinting();
|
||||||
|
|
||||||
@@ -746,6 +766,7 @@ public class IPrintManagerParametersTest extends BasePrintTest {
|
|||||||
/**
|
/**
|
||||||
* test IPrintManager.destroyPrinterDiscoverySession
|
* test IPrintManager.destroyPrinterDiscoverySession
|
||||||
*/
|
*/
|
||||||
|
@MediumTest
|
||||||
public void testDestroyPrinterDiscoverySession() throws Exception {
|
public void testDestroyPrinterDiscoverySession() throws Exception {
|
||||||
final IPrinterDiscoveryObserver listener = createMockIPrinterDiscoveryObserver();
|
final IPrinterDiscoveryObserver listener = createMockIPrinterDiscoveryObserver();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user