First version of the newly restructured repository
201
frontend/gamma/tests/tests/Bookmarklet/Bookmarklet.css
Normal file
@@ -0,0 +1,201 @@
|
||||
/*
|
||||
|
||||
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/>.
|
||||
|
||||
*/
|
||||
|
||||
/* @override
|
||||
http://localhost:8000/tests/js/tests/Bookmarklet/Bookmarklet.css
|
||||
http://www.clipperz.com/files/clipperz.com/bookmarklet/0.3.0/Bookmarklet.css
|
||||
*/
|
||||
|
||||
div#clipperzBookmarklet {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
background: transparent;
|
||||
|
||||
position: absolute;
|
||||
top: 80px;
|
||||
left: 100px;
|
||||
width: 202px;
|
||||
height: 202px;
|
||||
background: url(./background.png) no-repeat;
|
||||
}
|
||||
|
||||
div#clipperzBookmarklet div#clipperzBookmarkletClose {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
background: transparent;
|
||||
|
||||
position: absolute;
|
||||
left: 168px;
|
||||
top: 5px;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
background: url(./close.png) no-repeat;
|
||||
}
|
||||
|
||||
div#clipperzBookmarklet div#clipperzBookmarkletClose:hover {
|
||||
background: url(./close_selected.png) no-repeat;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div#clipperzBookmarklet div#clipperzBookmarkletResult {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
background: transparent;
|
||||
|
||||
position: absolute;
|
||||
width: 145px;
|
||||
top: 61px;
|
||||
left: 27px;
|
||||
height: 63px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div#clipperzBookmarklet div#clipperzBookmarkletResultIcon {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
|
||||
width: 28px;
|
||||
height: 35px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
div#clipperzBookmarklet div#clipperzBookmarkletResultIcon.ok {
|
||||
background: transparent url(./info.png);
|
||||
}
|
||||
|
||||
div#clipperzBookmarklet div#clipperzBookmarkletResultIcon.fail {
|
||||
background: transparent url(./error.png);
|
||||
}
|
||||
|
||||
div#clipperzBookmarklet div#clipperzBookmarkletResult p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
background: transparent;
|
||||
|
||||
font-family: Helvetica, Arial, Geneva, sans-serif;
|
||||
color: #898e7d;
|
||||
font-size: 14px;
|
||||
margin-left: 35px;
|
||||
}
|
||||
|
||||
div#clipperzBookmarklet div#clipperzBookmarletButton {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
background: transparent;
|
||||
|
||||
position: absolute;
|
||||
top: 125px;
|
||||
left: 26px;
|
||||
width: 148px;
|
||||
height: 49px;
|
||||
background: url(./copy.png) no-repeat;
|
||||
}
|
||||
|
||||
div#clipperzBookmarklet div#clipperzBookmarletButton span {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
background: transparent;
|
||||
|
||||
display: block;
|
||||
font-family: Helvetica, Arial, Geneva, sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 14pt;
|
||||
padding-left: 60px;
|
||||
padding-top: 12px;
|
||||
color: #838975;
|
||||
}
|
||||
|
||||
div#clipperzBookmarklet div#clipperzBookmarletButton.hover {
|
||||
background: url(./copy_selected.png) no-repeat;
|
||||
}
|
||||
|
||||
|
||||
div#clipperzBookmarklet div#clipperzBookmarletAfterCopyHint.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
div#clipperzBookmarklet div#clipperzBookmarletAfterCopyHint {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
background: transparent;
|
||||
|
||||
position: absolute;
|
||||
top: 78px;
|
||||
left: 135px;
|
||||
width: 171px;
|
||||
height: 72px;
|
||||
background: url(./hint.png) no-repeat;
|
||||
}
|
||||
|
||||
div#clipperzBookmarklet div#clipperzBookmarletAfterCopyHint p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
background: transparent;
|
||||
|
||||
padding: 10px;
|
||||
font-family: Helvetica, Arial, Geneva, sans-serif;
|
||||
color: white;
|
||||
font-size: 13px;
|
||||
}
|
||||
113
frontend/gamma/tests/tests/Bookmarklet/Fail.html
Normal file
@@ -0,0 +1,113 @@
|
||||
<!--
|
||||
|
||||
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>Bookmarlet TEST - fail</title>
|
||||
<script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script>
|
||||
<script type="text/javascript" src="../../SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../../SimpleTest/test.css">
|
||||
|
||||
<!-- link rel="stylesheet" type="text/css" href="./Bookmarklet.css" -->
|
||||
<script type='text/javascript' src='../../../js/Bookmarklet.js'></script>
|
||||
<script type='text/javascript' src='../../../../_build/_scratch/bookmarklet_test.js'></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- TWITTER Login Form -->
|
||||
<!-- form id="signin" action="https://twitter.com/sessions" method="post">
|
||||
<input id="authenticity_token" type="hidden" value="a3a9abfa089122e4b437736313e54f2a25911101" name="authenticity_token"/>
|
||||
<fieldset class="common-form standard-form">
|
||||
<legend>Please sign in</legend>
|
||||
<p>
|
||||
<label class="inside" for="username" tabindex="1">user name or email address:</label>
|
||||
<input id="username" type="text" title="username" value="" name="session[username_or_email]"/>
|
||||
</p>
|
||||
<p>
|
||||
<label class="inside" for="password" tabindex="2">password:</label>
|
||||
<input id="password" type="password" title="password" value="" name="session[password]"/>
|
||||
</p>
|
||||
<p class="remember"></p>
|
||||
<p class="submit"></p>
|
||||
<p class="forgot"></p>
|
||||
<p class="complete"></p>
|
||||
</fieldset>
|
||||
</form -->
|
||||
|
||||
<!-- ###################################################################### -->
|
||||
<!--
|
||||
<div id="clipperzBookmarklet" style="">
|
||||
<div id="clipperzBookmarkletResult" style=""><p>The direct login configuration has been collected.</p></div>
|
||||
<div id="clipperzBookmarletButton" style=""></div>
|
||||
<div id="clipperzBookmarletAfterCopyHint" style=""><p>Now you can return to the Clipperz main interface and create a new card</p></div>
|
||||
</div>
|
||||
-->
|
||||
<!--
|
||||
<div id="clipperzBookmarklet">
|
||||
<div id="clipperzBookmarkletResult"><div id="clipperzBookmarkletResultIcon"></div><p id="clipperzBookmarkletResultText"></p></div>
|
||||
<div id="clipperzBookmarletButton"></div>
|
||||
<div id="clipperzBookmarletAfterCopyHint"><p id="clipperzBookmarkletHintText"></p></div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
|
||||
<!-- ###################################################################### -->
|
||||
|
||||
<pre id="test">
|
||||
<script type="text/javascript">
|
||||
try {
|
||||
runBookmarklet();
|
||||
// var parameters;
|
||||
// runBookmarklet();
|
||||
|
||||
// parameters = getLoginFormConfiguration();
|
||||
|
||||
// SimpleTest.ok(parameters != null, "The bookmarklet returns something useful");
|
||||
// SimpleTest.ok(bookmarkletClip != null, "The clipboard bridge has been created");
|
||||
// SimpleTest.ok(bookmarkletClip.ready, "The clipboard bridge has been created AND is ready");
|
||||
SimpleTest.ok(true, "no exception raised");
|
||||
|
||||
} catch (err) {
|
||||
|
||||
var s = "test suite failure!\n";
|
||||
var o = {};
|
||||
var k = null;
|
||||
for (k in err) {
|
||||
// ensure unique keys?!
|
||||
if (!o[k]) {
|
||||
s += k + ": " + err[k] + "\n";
|
||||
o[k] = err[k];
|
||||
}
|
||||
}
|
||||
ok ( false, s );
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
113
frontend/gamma/tests/tests/Bookmarklet/Twitter.html
Normal file
@@ -0,0 +1,113 @@
|
||||
<!--
|
||||
|
||||
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>Bookmarlet TEST - ok</title>
|
||||
<script type="text/javascript" src="../../../js/MochiKit/MochiKit.js"></script>
|
||||
<script type="text/javascript" src="../../SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../../SimpleTest/test.css">
|
||||
|
||||
<!-- link rel="stylesheet" type="text/css" href="./Bookmarklet.css" -->
|
||||
<script type='text/javascript' src='../../../js/Bookmarklet.js'></script>
|
||||
<script type='text/javascript' src='../../../../_build/_scratch/bookmarklet_test.js'></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- TWITTER Login Form -->
|
||||
<form id="signin" action="https://twitter.com/sessions" method="post">
|
||||
<input id="authenticity_token" type="hidden" value="a3a9abfa089122e4b437736313e54f2a25911101" name="authenticity_token"/>
|
||||
<fieldset class="common-form standard-form">
|
||||
<legend>Please sign in</legend>
|
||||
<p>
|
||||
<label class="inside" for="username" tabindex="1">user name or email address:</label>
|
||||
<input id="username" type="text" title="username" value="" name="session[username_or_email]"/>
|
||||
</p>
|
||||
<p>
|
||||
<label class="inside" for="password" tabindex="2">password:</label>
|
||||
<input id="password" type="password" title="password" value="" name="session[password]"/>
|
||||
</p>
|
||||
<p class="remember"></p>
|
||||
<p class="submit"></p>
|
||||
<p class="forgot"></p>
|
||||
<p class="complete"></p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- ###################################################################### -->
|
||||
<!--
|
||||
<div id="clipperzBookmarklet" style="">
|
||||
<div id="clipperzBookmarkletResult" style=""><p>The direct login configuration has been collected.</p></div>
|
||||
<div id="clipperzBookmarletButton" style=""></div>
|
||||
<div id="clipperzBookmarletAfterCopyHint" style=""><p>Now you can return to the Clipperz main interface and create a new card</p></div>
|
||||
</div>
|
||||
-->
|
||||
<!--
|
||||
<div id="clipperzBookmarklet">
|
||||
<div id="clipperzBookmarkletResult"><div id="clipperzBookmarkletResultIcon"></div><p id="clipperzBookmarkletResultText"></p></div>
|
||||
<div id="clipperzBookmarletButton"></div>
|
||||
<div id="clipperzBookmarletAfterCopyHint"><p id="clipperzBookmarkletHintText"></p></div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
|
||||
<!-- ###################################################################### -->
|
||||
|
||||
<pre id="test">
|
||||
<script type="text/javascript">
|
||||
try {
|
||||
runBookmarklet();
|
||||
// var parameters;
|
||||
// runBookmarklet();
|
||||
|
||||
// parameters = getLoginFormConfiguration();
|
||||
|
||||
// SimpleTest.ok(parameters != null, "The bookmarklet returns something useful");
|
||||
// SimpleTest.ok(bookmarkletClip != null, "The clipboard bridge has been created");
|
||||
// SimpleTest.ok(bookmarkletClip.ready, "The clipboard bridge has been created AND is ready");
|
||||
SimpleTest.ok(true, "no exception raised");
|
||||
|
||||
} catch (err) {
|
||||
|
||||
var s = "test suite failure!\n";
|
||||
var o = {};
|
||||
var k = null;
|
||||
for (k in err) {
|
||||
// ensure unique keys?!
|
||||
if (!o[k]) {
|
||||
s += k + ": " + err[k] + "\n";
|
||||
o[k] = err[k];
|
||||
}
|
||||
}
|
||||
ok ( false, s );
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
BIN
frontend/gamma/tests/tests/Bookmarklet/ZeroClipboard.swf
Executable file
BIN
frontend/gamma/tests/tests/Bookmarklet/background.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
frontend/gamma/tests/tests/Bookmarklet/close.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
frontend/gamma/tests/tests/Bookmarklet/close_selected.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
frontend/gamma/tests/tests/Bookmarklet/copy.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
frontend/gamma/tests/tests/Bookmarklet/copy_selected.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
frontend/gamma/tests/tests/Bookmarklet/error.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
frontend/gamma/tests/tests/Bookmarklet/hint.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
42
frontend/gamma/tests/tests/Bookmarklet/index.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!--
|
||||
|
||||
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>Complete TEST suite</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(
|
||||
'Twitter.html'
|
||||
);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
BIN
frontend/gamma/tests/tests/Bookmarklet/info.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |