summaryrefslogtreecommitdiff
path: root/frontend/gamma/tests/tests/Clipperz/PM/UI
Side-by-side diff
Diffstat (limited to 'frontend/gamma/tests/tests/Clipperz/PM/UI') (more/less context) (show whitespace changes)
-rw-r--r--frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.html64
-rw-r--r--frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.test.js90
-rw-r--r--frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/index.html46
-rw-r--r--frontend/gamma/tests/tests/Clipperz/PM/UI/Web/index.html45
-rw-r--r--frontend/gamma/tests/tests/Clipperz/PM/UI/index.html45
5 files changed, 290 insertions, 0 deletions
diff --git a/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.html b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.html
new file mode 100644
index 0000000..6fbdcd6
--- a/dev/null
+++ b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.html
@@ -0,0 +1,64 @@
+<!--
+
+Copyright 2008-2011 Clipperz Srl
+
+This file is part of Clipperz's Javascript Crypto Library.
+Javascript Crypto Library provides web developers with an extensive
+and efficient set of cryptographic functions. The library aims to
+obtain maximum execution speed while preserving modularity and
+reusability.
+For further information about its features and functionalities please
+refer to http://www.clipperz.com
+
+* Javascript Crypto Library is free software: you can redistribute
+ it and/or modify it under the terms of the GNU Affero General Public
+ License as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+
+* Javascript Crypto Library is distributed in the hope that it will
+ be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU Affero General Public License for more details.
+
+* You should have received a copy of the GNU Affero General Public
+ License along with Javascript Crypto Library. If not, see
+ <http://www.gnu.org/licenses/>.
+
+-->
+
+<html>
+<head>
+ <title>Clipperz.PM.UI.Web.MainController - test</title>
+
+ <script type="text/javascript" src="../../../../../../../js/MochiKit/MochiKit.js"></script>
+ <script type="text/javascript" src="../../../../../../../js/JSLog/jslog.js"></script>
+ <script type="text/javascript" src="../../../../../../SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="../../../../../../SimpleTest/test.css">
+
+ <script type='text/javascript' src='../../../../../../../js/Clipperz/YUI/Utils.js'></script>
+ <script type='text/javascript' src='../../../../../../../js/Clipperz/Base.js'></script>
+ <script type='text/javascript' src='../../../../../../../js/Clipperz/ByteArray.js'></script>
+ <script type='text/javascript' src='../../../../../../../js/Clipperz/Logging.js'></script>
+ <script type='text/javascript' src='../../../../../../../js/Clipperz/Async.js'></script>
+ <script type='text/javascript' src='../../../../../../../js/Clipperz/KeyValueObjectStore.js'></script>
+
+ <script type='text/javascript' src='../../../../../../../js/Clipperz/Crypto/Base.js'></script>
+ <script type='text/javascript' src='../../../../../../../js/Clipperz/Crypto/BigInt.js'></script>
+ <script type='text/javascript' src='../../../../../../../js/Clipperz/Crypto/AES.js'></script>
+ <script type='text/javascript' src='../../../../../../../js/Clipperz/Crypto/SHA.js'></script>
+ <script type='text/javascript' src='../../../../../../../js/Clipperz/Crypto/PRNG.js'></script>
+ <script type='text/javascript' src='../../../../../../../js/Clipperz/Crypto/SRP.js'></script>
+
+ <script type='text/javascript' src='../../../../../../../js/Clipperz/Signal.js'></script>
+
+ <script type='text/javascript' src='../../../../../../../js/Clipperz/PM/UI/Web/Controllers/MainController.js'></script>
+ <script type="text/javascript" src="../../../../../../SimpleTest/SimpleTest.Async.js"></script>
+
+</head>
+<body>
+<pre id="test">
+ <script type="text/javascript" src="MainController.test.js"></script>
+</pre>
+
+</body>
+</html>
diff --git a/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.test.js b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.test.js
new file mode 100644
index 0000000..3953558
--- a/dev/null
+++ b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/MainController.test.js
@@ -0,0 +1,90 @@
+/*
+
+Copyright 2008-2011 Clipperz Srl
+
+This file is part of Clipperz's Javascript Crypto Library.
+Javascript Crypto Library provides web developers with an extensive
+and efficient set of cryptographic functions. The library aims to
+obtain maximum execution speed while preserving modularity and
+reusability.
+For further information about its features and functionalities please
+refer to http://www.clipperz.com
+
+* Javascript Crypto Library is free software: you can redistribute
+ it and/or modify it under the terms of the GNU Affero General Public
+ License as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+
+* Javascript Crypto Library is distributed in the hope that it will
+ be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU Affero General Public License for more details.
+
+* You should have received a copy of the GNU Affero General Public
+ License along with Javascript Crypto Library. If not, see
+ <http://www.gnu.org/licenses/>.
+
+*/
+
+//Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose();
+
+var tests = {
+
+ 'isPassphraseDelegateLockSetAfterInit': function (someTestArgs) {
+ return Clipperz.Async.callbacks('isPassphraseDelegateLockSetAfterInit', [
+ function () {
+ var mainController;
+
+ mainController = new Clipperz.PM.UI.Web.Controllers.MainController();
+ SimpleTest.is(true, mainController._passphraseDelegateLock.locked, 'passphraseDelegate lock is locked after MainController initialization')
+ }]);
+ },
+
+ //-------------------------------------------------------------------------
+
+ 'getPassphraseWithUnsetDelegate_test': function (someTestArgs) {
+ var deferredResult;
+ var mainController;
+ var delegateFunction;
+
+ mainController = new Clipperz.PM.UI.Web.Controllers.MainController();
+ delegateFunction = function () { return "clipperz";};
+
+ MochiKit.Async.callLater(1, MochiKit.Base.method(mainController, 'setPassphraseDelegate', delegateFunction));
+
+ return Clipperz.Async.callbacks("MainController.getPassphraseWithUnsetDelegate",[
+ MochiKit.Base.method(mainController, 'getPassphrase'),
+ function (aResult) {
+ SimpleTest.is(aResult, 'clipperz', "the password provided by the delegate is correct");
+ }
+ ], {trace:false});
+ },
+
+ //-------------------------------------------------------------------------
+
+ 'getPassphraseWithSetDelegate_test': function (someTestArgs) {
+ var deferredResult;
+ var mainController;
+ var delegateFunction;
+
+ mainController = new Clipperz.PM.UI.Web.Controllers.MainController();
+ delegateFunction = function () {return "clipperz";};
+
+ return Clipperz.Async.callbacks("MainController.getPassphraseWithSetDelegate_test",[
+ MochiKit.Base.method(mainController, 'setPassphraseDelegate', delegateFunction),
+ MochiKit.Base.method(mainController, 'getPassphrase'),
+ function (aResult) {
+ SimpleTest.is(aResult, 'clipperz', "the password provided by the delegate is correct");
+ }
+ ], {trace:false});
+ },
+
+ //-------------------------------------------------------------------------
+ 'syntaxFix': MochiKit.Base.noop
+};
+
+
+
+//#############################################################################
+
+SimpleTest.runDeferredTests("Clipperz.PM.UI.Web.Controllers.MainController", tests, {trace:false});
diff --git a/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/index.html b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/index.html
new file mode 100644
index 0000000..f3283b6
--- a/dev/null
+++ b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/Controllers/index.html
@@ -0,0 +1,46 @@
+<!--
+
+Copyright 2008-2011 Clipperz Srl
+
+This file is part of Clipperz's Javascript Crypto Library.
+Javascript Crypto Library provides web developers with an extensive
+and efficient set of cryptographic functions. The library aims to
+obtain maximum execution speed while preserving modularity and
+reusability.
+For further information about its features and functionalities please
+refer to http://www.clipperz.com
+
+* Javascript Crypto Library is free software: you can redistribute
+ it and/or modify it under the terms of the GNU Affero General Public
+ License as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+
+* Javascript Crypto Library is distributed in the hope that it will
+ be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU Affero General Public License for more details.
+
+* You should have received a copy of the GNU Affero General Public
+ License along with Javascript Crypto Library. If not, see
+ <http://www.gnu.org/licenses/>.
+
+-->
+
+<html>
+<head>
+ <title>Clipperz.PM.UI.Web.Controllers.* - tests</title>
+
+ <script type="text/javascript" src="../../../../../../../js/MochiKit/MochiKit.js"></script>
+ <script type="text/javascript" src="../../../../../../SimpleTest/TestRunner.js"></script>
+</head>
+<body>
+<script>
+TestRunner.runTests(
+//
+// This is still a complete mess.
+//
+ 'MainController.html'
+);
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/index.html b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/index.html
new file mode 100644
index 0000000..9afa73d
--- a/dev/null
+++ b/frontend/gamma/tests/tests/Clipperz/PM/UI/Web/index.html
@@ -0,0 +1,45 @@
+<!--
+
+Copyright 2008-2011 Clipperz Srl
+
+This file is part of Clipperz's Javascript Crypto Library.
+Javascript Crypto Library provides web developers with an extensive
+and efficient set of cryptographic functions. The library aims to
+obtain maximum execution speed while preserving modularity and
+reusability.
+For further information about its features and functionalities please
+refer to http://www.clipperz.com
+
+* Javascript Crypto Library is free software: you can redistribute
+ it and/or modify it under the terms of the GNU Affero General Public
+ License as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+
+* Javascript Crypto Library is distributed in the hope that it will
+ be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU Affero General Public License for more details.
+
+* You should have received a copy of the GNU Affero General Public
+ License along with Javascript Crypto Library. If not, see
+ <http://www.gnu.org/licenses/>.
+
+-->
+
+<html>
+<head>
+ <title>Clipperz.PM.UI.Web* - tests</title>
+
+ <script type="text/javascript" src="../../../../../../js/MochiKit/MochiKit.js"></script>
+ <script type="text/javascript" src="../../../../../SimpleTest/TestRunner.js"></script>
+</head>
+<body>
+<script>
+TestRunner.runTests(
+//
+// This is still a complete mess.
+//
+);
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/frontend/gamma/tests/tests/Clipperz/PM/UI/index.html b/frontend/gamma/tests/tests/Clipperz/PM/UI/index.html
new file mode 100644
index 0000000..867362b
--- a/dev/null
+++ b/frontend/gamma/tests/tests/Clipperz/PM/UI/index.html
@@ -0,0 +1,45 @@
+<!--
+
+Copyright 2008-2011 Clipperz Srl
+
+This file is part of Clipperz's Javascript Crypto Library.
+Javascript Crypto Library provides web developers with an extensive
+and efficient set of cryptographic functions. The library aims to
+obtain maximum execution speed while preserving modularity and
+reusability.
+For further information about its features and functionalities please
+refer to http://www.clipperz.com
+
+* Javascript Crypto Library is free software: you can redistribute
+ it and/or modify it under the terms of the GNU Affero General Public
+ License as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+
+* Javascript Crypto Library is distributed in the hope that it will
+ be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU Affero General Public License for more details.
+
+* You should have received a copy of the GNU Affero General Public
+ License along with Javascript Crypto Library. If not, see
+ <http://www.gnu.org/licenses/>.
+
+-->
+
+<html>
+<head>
+ <title>Clipperz.PM.UI.* - tests</title>
+
+ <script type="text/javascript" src="../../../../../js/MochiKit/MochiKit.js"></script>
+ <script type="text/javascript" src="../../../../SimpleTest/TestRunner.js"></script>
+</head>
+<body>
+<script>
+TestRunner.runTests(
+//
+// This is still a complete mess.
+//
+);
+</script>
+</body>
+</html> \ No newline at end of file