Diffstat (limited to 'frontend/gamma/tests/tests/Components/SimpleMessagePanel/simpleMessagePanel_test.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/tests/tests/Components/SimpleMessagePanel/simpleMessagePanel_test.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/gamma/tests/tests/Components/SimpleMessagePanel/simpleMessagePanel_test.js b/frontend/gamma/tests/tests/Components/SimpleMessagePanel/simpleMessagePanel_test.js index 85128d6..8513909 100644 --- a/frontend/gamma/tests/tests/Components/SimpleMessagePanel/simpleMessagePanel_test.js +++ b/frontend/gamma/tests/tests/Components/SimpleMessagePanel/simpleMessagePanel_test.js | |||
@@ -1,95 +1,92 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.Tests.SimpleMessagePanel'); | 26 | Clipperz.Base.module('Clipperz.Tests.SimpleMessagePanel'); |
30 | 27 | ||
31 | Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); | 28 | Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); |
32 | Clipperz.PM.Strings.Languages.initSetup(); | 29 | Clipperz.PM.Strings.Languages.initSetup(); |
33 | 30 | ||
34 | Clipperz.Tests.SimpleMessagePanel.Tester = function(args) { | 31 | Clipperz.Tests.SimpleMessagePanel.Tester = function(args) { |
35 | args = args || {}; | 32 | args = args || {}; |
36 | 33 | ||
37 | Clipperz.Tests.SimpleMessagePanel.Tester.superclass.constructor.call(this, args); | 34 | Clipperz.Tests.SimpleMessagePanel.Tester.superclass.constructor.call(this, args); |
38 | //this._user = new Clipperz.PM.DataModel.User({username:'test', getPassphraseFunction:function () { return 'test';}}); | 35 | //this._user = new Clipperz.PM.DataModel.User({username:'test', getPassphraseFunction:function () { return 'test';}}); |
39 | 36 | ||
40 | return this; | 37 | return this; |
41 | }; | 38 | }; |
42 | 39 | ||
43 | Clipperz.Base.extend(Clipperz.Tests.SimpleMessagePanel.Tester, Object, { | 40 | Clipperz.Base.extend(Clipperz.Tests.SimpleMessagePanel.Tester, Object, { |
44 | 41 | ||
45 | 'toString': function() { | 42 | 'toString': function() { |
46 | return "Clipperz.Tests.SimpleMessagePanel.Tester"; | 43 | return "Clipperz.Tests.SimpleMessagePanel.Tester"; |
47 | }, | 44 | }, |
48 | 45 | ||
49 | //------------------------------------------------------------------------- | 46 | //------------------------------------------------------------------------- |
50 | /* | 47 | /* |
51 | 'user': function () { | 48 | 'user': function () { |
52 | return this._user; | 49 | return this._user; |
53 | }, | 50 | }, |
54 | */ | 51 | */ |
55 | //------------------------------------------------------------------------- | 52 | //------------------------------------------------------------------------- |
56 | 53 | ||
57 | 'run': function () { | 54 | 'run': function () { |
58 | var deferredResult; | 55 | var deferredResult; |
59 | var confirmationDialog; | 56 | var confirmationDialog; |
60 | 57 | ||
61 | confirmationDialog = new Clipperz.PM.UI.Common.Components.SimpleMessagePanel({ | 58 | confirmationDialog = new Clipperz.PM.UI.Common.Components.SimpleMessagePanel({ |
62 | title:"Alert", | 59 | title:"Alert", |
63 | text:"Should lost pending changes? But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness", | 60 | text:"Should lost pending changes? But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness", |
64 | type:'ALERT', | 61 | type:'ALERT', |
65 | buttons: [ | 62 | buttons: [ |
66 | {text:"Cancel",result:'CANCEL', isDefault:true}, | 63 | {text:"Cancel",result:'CANCEL', isDefault:true}, |
67 | {text:"Ok", result:'OK'} | 64 | {text:"Ok", result:'OK'} |
68 | ] | 65 | ] |
69 | }); | 66 | }); |
70 | 67 | ||
71 | deferredResult = new Clipperz.Async.Deferred("CardDialogComponent.askConfirmationForLoosingPendingChanges", {trace:false}); | 68 | deferredResult = new Clipperz.Async.Deferred("CardDialogComponent.askConfirmationForLoosingPendingChanges", {trace:false}); |
72 | deferredResult.addMethod(confirmationDialog, 'deferredShow', { | 69 | deferredResult.addMethod(confirmationDialog, 'deferredShow', { |
73 | 'openFromElement': null, | 70 | 'openFromElement': null, |
74 | 'onOkCloseToElement': null, //this.getElement('cancelButton'), | 71 | 'onOkCloseToElement': null, //this.getElement('cancelButton'), |
75 | 'onCancelCloseToElement':null | 72 | 'onCancelCloseToElement':null |
76 | }); | 73 | }); |
77 | deferredResult.callback(); | 74 | deferredResult.callback(); |
78 | 75 | ||
79 | return deferredResult; | 76 | return deferredResult; |
80 | }, | 77 | }, |
81 | 78 | ||
82 | //========================================================================= | 79 | //========================================================================= |
83 | __syntaxFix__: "syntax fix" | 80 | __syntaxFix__: "syntax fix" |
84 | }); | 81 | }); |
85 | 82 | ||
86 | 83 | ||
87 | 84 | ||
88 | init = function () { | 85 | init = function () { |
89 | vartester; | 86 | vartester; |
90 | 87 | ||
91 | tester = new Clipperz.Tests.SimpleMessagePanel.Tester(); | 88 | tester = new Clipperz.Tests.SimpleMessagePanel.Tester(); |
92 | tester.run(); | 89 | tester.run(); |
93 | }; | 90 | }; |
94 | 91 | ||
95 | MochiKit.DOM.addLoadEvent(init); | 92 | MochiKit.DOM.addLoadEvent(init); |