diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
commit | 940b4d1848e8c70ab7642901a68594e8016caffc (patch) | |
tree | eb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /qadevOOo/tests/java/ifc/presentation | |
parent | Initial commit. (diff) | |
download | libreoffice-upstream.tar.xz libreoffice-upstream.zip |
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
8 files changed, 385 insertions, 0 deletions
diff --git a/qadevOOo/tests/java/ifc/presentation/_OutlineView.java b/qadevOOo/tests/java/ifc/presentation/_OutlineView.java new file mode 100644 index 000000000..f702a7b4c --- /dev/null +++ b/qadevOOo/tests/java/ifc/presentation/_OutlineView.java @@ -0,0 +1,27 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . + */ + +package ifc.presentation; + +import lib.MultiPropertyTest; + +public class _OutlineView extends MultiPropertyTest { + +} // finish class _PresentationView + + diff --git a/qadevOOo/tests/java/ifc/presentation/_Presentation.java b/qadevOOo/tests/java/ifc/presentation/_Presentation.java new file mode 100644 index 000000000..28f8a5aab --- /dev/null +++ b/qadevOOo/tests/java/ifc/presentation/_Presentation.java @@ -0,0 +1,83 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . + */ + +package ifc.presentation; + +import lib.MultiPropertyTest; +import lib.Status; +import lib.StatusException; + +import com.sun.star.presentation.XPresentation; + +/** +* Testing <code>com.sun.star.presentation.Presentation</code> +* service properties : +* <ul> +* <li><code> AllowAnimations</code></li> +* <li><code> CustomShow</code></li> +* <li><code> FirstPage</code></li> +* <li><code> IsAlwaysOnTop</code></li> +* <li><code> IsAutomatic</code></li> +* <li><code> IsEndless</code></li> +* <li><code> IsFullScreen</code></li> +* <li><code> IsLivePresentation</code></li> +* <li><code> IsMouseVisible</code></li> +* <li><code> Pause</code></li> +* <li><code> StartWithNavigator</code></li> +* <li><code> UsePen</code></li> +* </ul> <p> +* This test needs the following object relations : +* <ul> +* <li> <code>'Presentation'</code> (of type <code>XPresentation</code>): +* for test of property <code>IsLivePresentation</code> +* presentation start needed </li> +* <ul> <p> +* Properties testing is automated by <code>lib.MultiPropertyTest</code>. +* @see com.sun.star.presentation.Presentation +* @see com.sun.star.presentation.XPresentation +*/ +public class _Presentation extends MultiPropertyTest { + + public void _IsLivePresentation() { + XPresentation aPresentation = (XPresentation) + tEnv.getObjRelation("Presentation"); + if (aPresentation == null) throw new StatusException(Status.failed + ("Relation 'Presentation' not found")); + + aPresentation.start(); + testProperty("IsLivePresentation"); + } + + protected PropertyTester CustomShowTester = new PropertyTester() { + @Override + protected Object getNewValue(String propName, Object oldValue) + throws java.lang.IllegalArgumentException { + if ( ((String)oldValue).equals("SecondPresentation") ) { + return "FirstPresentation"; + } else { + return "SecondPresentation"; + } + } + }; + + public void _CustomShow() { + testProperty("CustomShow", CustomShowTester); + } +} // finish class _Presentation + + diff --git a/qadevOOo/tests/java/ifc/presentation/_PresentationView.java b/qadevOOo/tests/java/ifc/presentation/_PresentationView.java new file mode 100644 index 000000000..0846877b1 --- /dev/null +++ b/qadevOOo/tests/java/ifc/presentation/_PresentationView.java @@ -0,0 +1,48 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . + */ + +package ifc.presentation; + +import lib.MultiPropertyTest; + +public class _PresentationView extends MultiPropertyTest { + + /** + * Property tester which changes DrawPage. + */ + protected PropertyTester PageTester = new PropertyTester() { + @Override + protected Object getNewValue(String propName, Object oldValue) + throws java.lang.IllegalArgumentException { + if (oldValue.equals(tEnv.getObjRelation("FirstPage"))) + return tEnv.getObjRelation("SecondPage"); else + return tEnv.getObjRelation("FirstPage"); + } + } ; + + /** + * This property must be an XDrawPage + */ + public void _CurrentPage() { + log.println("Testing with custom Property tester") ; + testProperty("CurrentPage", PageTester) ; + } + +} // finish class _PresentationView + + diff --git a/qadevOOo/tests/java/ifc/presentation/_PreviewView.java b/qadevOOo/tests/java/ifc/presentation/_PreviewView.java new file mode 100644 index 000000000..a1a7a6ec5 --- /dev/null +++ b/qadevOOo/tests/java/ifc/presentation/_PreviewView.java @@ -0,0 +1,30 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . + */ + +package ifc.presentation; + +import lib.MultiPropertyTest; + +public class _PreviewView extends MultiPropertyTest { + + public void _CurrentPage() { + Object obj1 = tEnv.getObjRelation("FirstPage"); + Object obj2 = tEnv.getObjRelation("SecondPage"); + testProperty("CurrentPage",obj1,obj2); + } +} diff --git a/qadevOOo/tests/java/ifc/presentation/_SlidesView.java b/qadevOOo/tests/java/ifc/presentation/_SlidesView.java new file mode 100644 index 000000000..db688f604 --- /dev/null +++ b/qadevOOo/tests/java/ifc/presentation/_SlidesView.java @@ -0,0 +1,25 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . + */ + +package ifc.presentation; + +import lib.MultiPropertyTest; + +public class _SlidesView extends MultiPropertyTest { + +} diff --git a/qadevOOo/tests/java/ifc/presentation/_XCustomPresentationSupplier.java b/qadevOOo/tests/java/ifc/presentation/_XCustomPresentationSupplier.java new file mode 100644 index 000000000..8ee1d2509 --- /dev/null +++ b/qadevOOo/tests/java/ifc/presentation/_XCustomPresentationSupplier.java @@ -0,0 +1,49 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . + */ + +package ifc.presentation; + +import lib.MultiMethodTest; + +import com.sun.star.container.XNameAccess; +import com.sun.star.presentation.XCustomPresentationSupplier; + +/** +* Testing <code>com.sun.star.presentation.XCustomPresentationSupplier</code> +* interface methods : +* <ul> +* <li><code> getCustomPresentations()</code></li> +* </ul> <p> +* @see com.sun.star.presentation.XCustomPresentationSupplier +*/ +public class _XCustomPresentationSupplier extends MultiMethodTest { + + public XCustomPresentationSupplier oObj = null; + + /** + * Test calls the method and checks returned value. <p> + * Has <b> OK </b> status if returned value isn't null. <p> + */ + public void _getCustomPresentations() { + XNameAccess NA = oObj.getCustomPresentations(); + tRes.tested("getCustomPresentations()", NA != null); + } + +} + + diff --git a/qadevOOo/tests/java/ifc/presentation/_XPresentation.java b/qadevOOo/tests/java/ifc/presentation/_XPresentation.java new file mode 100644 index 000000000..c68af3b77 --- /dev/null +++ b/qadevOOo/tests/java/ifc/presentation/_XPresentation.java @@ -0,0 +1,74 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . + */ + +package ifc.presentation; + +import lib.MultiMethodTest; + +import com.sun.star.presentation.XPresentation; + +/** +* Testing <code>com.sun.star.presentation.XPresentation</code> +* interface methods : +* <ul> +* <li><code> start()</code></li> +* <li><code> end()</code></li> +* <li><code> rehearseTimings()</code></li> +* </ul> <p> +* @see com.sun.star.presentation.XPresentation +*/ +public class _XPresentation extends MultiMethodTest { + + public XPresentation oObj = null; + + /** + * Test calls the method. <p> + * Has <b> OK </b> status if the method successfully returns. <p> + */ + public void _start() { + oObj.start(); + tRes.tested("start()", true); + } + + /** + * Test calls the method. <p> + * Has <b> OK </b> status if the method successfully returns. <p> + * The following method tests are to be completed successfully before : + * <ul> + * <li> <code> start() </code> : presentation must be started before</li> + * </ul> + */ + public void _end() { + requiredMethod("start()"); + + oObj.end(); + tRes.tested("end()", true); + } + + /** + * Test calls the method. <p> + * Has <b> OK </b> status if the method successfully returns. <p> + */ + public void _rehearseTimings() { + oObj.rehearseTimings(); + tRes.tested("rehearseTimings()", true); + } + +} // finish class _XPresentation + + diff --git a/qadevOOo/tests/java/ifc/presentation/_XPresentationSupplier.java b/qadevOOo/tests/java/ifc/presentation/_XPresentationSupplier.java new file mode 100644 index 000000000..6c32e36b4 --- /dev/null +++ b/qadevOOo/tests/java/ifc/presentation/_XPresentationSupplier.java @@ -0,0 +1,49 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . + */ + +package ifc.presentation; + +import lib.MultiMethodTest; + +import com.sun.star.presentation.XPresentation; +import com.sun.star.presentation.XPresentationSupplier; + +/** +* Testing <code>com.sun.star.presentation.XPresentationSupplier</code> +* interface methods : +* <ul> +* <li><code> getPresentation()</code></li> +* </ul> <p> +* @see com.sun.star.presentation.XPresentationSupplier +*/ +public class _XPresentationSupplier extends MultiMethodTest { + + public XPresentationSupplier oObj = null; + + /** + * Test calls the method and checks returned value. <p> + * Has <b> OK </b> status if returned value isn't null. <p> + */ + public void _getPresentation() { + XPresentation NA = oObj.getPresentation(); + tRes.tested("getPresentation()", NA != null); + } + +} + + |