Commit 46ff5934 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Sebastien Robin

update live tests gadger, update jio and remove jio_sha256.amd.js

parent 7b5083e3
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts47152215.08</string> </value> <value> <string>ts49844638.75</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
\n \n
<script src="rsvp.js" type="text/javascript"></script>\n <script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n <script src="renderjs.js" type="text/javascript"></script>\n
<script src="jio_sha256.amd.js" type="text/javascript"></script>\n
<script src="jio.js" type="text/javascript"></script>\n <script src="jio.js" type="text/javascript"></script>\n
<script src="gadget_solve_divergence_dialog.js" type="text/javascript"></script>\n <script src="gadget_solve_divergence_dialog.js" type="text/javascript"></script>\n
\n \n
...@@ -55,7 +54,7 @@ ...@@ -55,7 +54,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>648</int> </value> <value> <int>583</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts47172081.7</string> </value> <value> <string>ts49844688.61</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
// modify an existing dialog, we do not have nice structure of a full\n // modify an existing dialog, we do not have nice structure of a full\n
// renderjs web page\n // renderjs web page\n
\n \n
\n
// horrible copy/paste, this code is now present in latest renderjs,\n // horrible copy/paste, this code is now present in latest renderjs,\n
// until we can use it, just duplicate the code and remove it when\n // until we can use it, just duplicate the code and remove it when\n
// renderjs is up to date\n // renderjs is up to date\n
...@@ -45,7 +44,6 @@ function loopEventListener(target, type, useCapture, callback) {\n ...@@ -45,7 +44,6 @@ function loopEventListener(target, type, useCapture, callback) {\n
//////////////////////////\n //////////////////////////\n
var handle_event_callback,\n var handle_event_callback,\n
callback_promise;\n callback_promise;\n
\n
function cancelResolver() {\n function cancelResolver() {\n
if ((callback_promise !== undefined) &&\n if ((callback_promise !== undefined) &&\n
(typeof callback_promise.cancel === "function")) {\n (typeof callback_promise.cancel === "function")) {\n
...@@ -153,7 +151,7 @@ function loopEventListener(target, type, useCapture, callback) {\n ...@@ -153,7 +151,7 @@ function loopEventListener(target, type, useCapture, callback) {\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>4104</int> </value> <value> <int>4102</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<value> <value>
<list> <list>
<string>your_text_output</string> <string>your_text_output</string>
<string>test_watcher_gadget</string> <string>live_test_gadget</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts16502968.34</string> </value> <value> <string>ts49761304.12</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -96,7 +96,6 @@ ...@@ -96,7 +96,6 @@
\n \n
<script src="rsvp.js" type="text/javascript"></script>\n <script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n <script src="renderjs.js" type="text/javascript"></script>\n
<script src="jio_sha256.amd.js" type="text/javascript"></script>\n
<script src="jio.js" type="text/javascript"></script>\n <script src="jio.js" type="text/javascript"></script>\n
<script src="gadget_activity_watcher.js" type="text/javascript"></script>\n <script src="gadget_activity_watcher.js" type="text/javascript"></script>\n
\n \n
...@@ -115,7 +114,7 @@ ...@@ -115,7 +114,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>2109</int> </value> <value> <int>2044</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts16394919.58</string> </value> <value> <string>ts49077029.26</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
var gk = rJS(window),\n var gk = rJS(window),\n
data_source = gk.__template_element.getElementById(\'getData\').innerHTML,\n data_source = gk.__template_element.getElementById(\'getData\').innerHTML,\n
get_data_template = Handlebars.compile(data_source);\n get_data_template = Handlebars.compile(data_source);\n
\n
function putMessageType(data, messagetype, string) {\n function putMessageType(data, messagetype, string) {\n
var i;\n var i;\n
if (data[string] && data[string].line_list) {\n if (data[string] && data[string].line_list) {\n
...@@ -106,7 +105,7 @@ ...@@ -106,7 +105,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>2318</int> </value> <value> <int>2317</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
<html>\n <html>\n
<head>\n <head>\n
<script src="jio_sha256.amd.js" type="text/javascript"></script>\n
<script src="jio.js" type="text/javascript"></script>\n <script src="jio.js" type="text/javascript"></script>\n
<script src="gadget_live_tests.js" type="text/javascript"></script>\n <script src="gadget_live_tests.js" type="text/javascript"></script>\n
</head>\n </head>\n
......
...@@ -36,12 +36,11 @@ ...@@ -36,12 +36,11 @@
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[ <value> <unicode encoding="cdata"><![CDATA[
/*global window, rJS, jIO, RSVP, location, document , FormData, console */\n /*global window, rJS, jIO, RSVP, location, document, FormData */\n
/*jslint indent: 2, maxlen: 80, nomen: true */\n /*jslint indent: 2, maxlen: 80, nomen: true */\n
(function (rJS, jIO, RSVP, window, document, FormData, console) {\n (function (rJS, jIO, RSVP, window, document, FormData) {\n
"use strict";\n "use strict";\n
var live_test_js_already_loaded = false,\n var my_url_run_test = document.baseURI + \'runLiveTest\',\n
my_url_run_test = document.baseURI + \'runLiveTest\',\n
my_url_read_test = document.baseURI + \'readTestOutput\',\n my_url_read_test = document.baseURI + \'readTestOutput\',\n
paused = false,\n paused = false,\n
data_textarea =\n data_textarea =\n
...@@ -51,12 +50,6 @@ ...@@ -51,12 +50,6 @@
last_call = false,\n last_call = false,\n
data_size = 0,\n data_size = 0,\n
form_data = new FormData();\n form_data = new FormData();\n
\n
if (live_test_js_already_loaded) {\n
console.error("Live test already loaded");\n
return;\n
}\n
live_test_js_already_loaded = true;\n
\n \n
data_textarea.value = "";\n data_textarea.value = "";\n
\n \n
...@@ -88,7 +81,7 @@ ...@@ -88,7 +81,7 @@
rJS(window).declareService(function () {\n rJS(window).declareService(function () {\n
var queue = new RSVP.Queue();\n var queue = new RSVP.Queue();\n
\n \n
function readDataExamine() {\n function launchLiveTest() {\n
queue.push(function () {\n queue.push(function () {\n
return jIO.util.ajax({\n return jIO.util.ajax({\n
type: "POST",\n type: "POST",\n
...@@ -105,12 +98,12 @@ ...@@ -105,12 +98,12 @@
});\n });\n
}\n }\n
return queue.push(function () {\n return queue.push(function () {\n
return readDataExamine();\n return launchLiveTest();\n
});\n });\n
}).declareService(function () {\n }).declareService(function () {\n
var queue = new RSVP.Queue();\n var queue = new RSVP.Queue();\n
\n \n
function getDataExamine() {\n function getLiveTestOutput() {\n
queue.push(function () {\n queue.push(function () {\n
return jIO.util.ajax({\n return jIO.util.ajax({\n
type: "POST",\n type: "POST",\n
...@@ -130,21 +123,23 @@ ...@@ -130,21 +123,23 @@
return RSVP.delay(1000);\n return RSVP.delay(1000);\n
}).push(function () {\n }).push(function () {\n
if (continue_loop) {\n if (continue_loop) {\n
return getDataExamine();\n return getLiveTestOutput();\n
}\n }\n
if (!continue_loop) {\n if (!continue_loop) {\n
if (!last_call) {\n if (!last_call) {\n
last_call = true;\n last_call = true;\n
return getDataExamine();\n return getLiveTestOutput();\n
}\n }\n
}\n }\n
});\n });\n
}\n }\n
return queue.push(function () {\n return queue.push(function () {\n
return getDataExamine();\n // a delay of 2 seconds so the test can be launched\n
});\n // before results are read\n
return RSVP.delay(2000);\n
}).push(getLiveTestOutput());\n
});\n });\n
}(rJS, jIO, RSVP, window, document, FormData, console)); }(rJS, jIO, RSVP, window, document, FormData));
]]></unicode> </value> ]]></unicode> </value>
</item> </item>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts16413671.77</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>jio_sha256.amd.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function (dependencies, module) {\n
if (typeof define === \'function\' && define.amd) {\n
return define(dependencies, module);\n
}\n
if (typeof exports === \'object\') {\n
return module(exports);\n
}\n
module(window);\n
}([\'exports\'], function (window) {\n
/* A JavaScript implementation of the Secure Hash Algorithm, SHA-256\n
* Version 0.3 Copyright Angel Marin 2003-2004 - http://anmar.eu.org/\n
* Distributed under the BSD License\n
* Some bits taken from Paul Johnston\'s SHA-1 implementation\n
*/\n
(function () {\n
var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */\n
function safe_add (x, y) {\n
var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n
return (msw << 16) | (lsw & 0xFFFF);\n
}\n
function S (X, n) {return ( X >>> n ) | (X << (32 - n));}\n
function R (X, n) {return ( X >>> n );}\n
function Ch(x, y, z) {return ((x & y) ^ ((~x) & z));}\n
function Maj(x, y, z) {return ((x & y) ^ (x & z) ^ (y & z));}\n
function Sigma0256(x) {return (S(x, 2) ^ S(x, 13) ^ S(x, 22));}\n
function Sigma1256(x) {return (S(x, 6) ^ S(x, 11) ^ S(x, 25));}\n
function Gamma0256(x) {return (S(x, 7) ^ S(x, 18) ^ R(x, 3));}\n
function Gamma1256(x) {return (S(x, 17) ^ S(x, 19) ^ R(x, 10));}\n
function newArray (n) {\n
var a = [];\n
for (;n>0;n--) {\n
a.push(undefined);\n
}\n
return a;\n
}\n
function core_sha256 (m, l) {\n
var K = [0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2];\n
var HASH = [0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19];\n
var W = newArray(64);\n
var a, b, c, d, e, f, g, h, i, j;\n
var T1, T2;\n
/* append padding */\n
m[l >> 5] |= 0x80 << (24 - l % 32);\n
m[((l + 64 >> 9) << 4) + 15] = l;\n
for ( var i = 0; i<m.length; i+=16 ) {\n
a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3];\n
e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7];\n
for ( var j = 0; j<64; j++) {\n
if (j < 16) {\n
W[j] = m[j + i];\n
} else {\n
W[j] = safe_add(safe_add(safe_add(Gamma1256(\n
W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]);\n
}\n
T1 = safe_add(safe_add(safe_add(\n
safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]);\n
T2 = safe_add(Sigma0256(a), Maj(a, b, c));\n
h = g; g = f; f = e; e = safe_add(d, T1);\n
d = c; c = b; b = a; a = safe_add(T1, T2);\n
}\n
HASH[0] = safe_add(a, HASH[0]); HASH[1] = safe_add(b, HASH[1]);\n
HASH[2] = safe_add(c, HASH[2]); HASH[3] = safe_add(d, HASH[3]);\n
HASH[4] = safe_add(e, HASH[4]); HASH[5] = safe_add(f, HASH[5]);\n
HASH[6] = safe_add(g, HASH[6]); HASH[7] = safe_add(h, HASH[7]);\n
}\n
return HASH;\n
}\n
function str2binb (str) {\n
var bin = Array();\n
var mask = (1 << chrsz) - 1;\n
for(var i = 0; i < str.length * chrsz; i += chrsz)\n
bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i%32);\n
return bin;\n
}\n
function binb2hex (binarray) {\n
var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */\n
var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";\n
var str = "";\n
for (var i = 0; i < binarray.length * 4; i++) {\n
str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) +\n
hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF);\n
}\n
return str;\n
}\n
function hex_sha256(s){\n
return binb2hex(core_sha256(str2binb(s),s.length * chrsz));\n
}\n
window.hex_sha256 = hex_sha256;\n
}());\n
}));
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>4494</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment