Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
This commit is contained in:
commit
7793d3b7ad
|
@ -2,6 +2,13 @@ $(document).ready(
|
|||
function() {
|
||||
var form = $('#form_new_bookmark');
|
||||
form.append('<input type="hidden" name="ajax" value="1"/>');
|
||||
function doClose() {
|
||||
self.close();
|
||||
// If in popup blocker situation, we'll have to redirect back.
|
||||
setTimeout(function() {
|
||||
window.location = $('#url').val();
|
||||
}, 100);
|
||||
}
|
||||
form.ajaxForm({dataType: 'xml',
|
||||
timeout: '60000',
|
||||
beforeSend: function(formData) {
|
||||
|
@ -11,12 +18,12 @@ $(document).ready(
|
|||
error: function (xhr, textStatus, errorThrown) {
|
||||
form.removeClass('processing');
|
||||
form.find('#submit').removeClass('disabled');
|
||||
self.close();
|
||||
doClose();
|
||||
},
|
||||
success: function(data, textStatus) {
|
||||
form.removeClass('processing');
|
||||
form.find('#submit').removeClass('disabled');
|
||||
self.close();
|
||||
doClose();
|
||||
}});
|
||||
|
||||
}
|
||||
|
|
|
@ -21,5 +21,17 @@ class UUIDTest extends PHPUnit_Framework_TestCase
|
|||
$this->assertEquals(0x4000, hexdec(substr($result, 14, 4)) & 0xF000);
|
||||
$this->assertEquals(0x8000, hexdec(substr($result, 19, 4)) & 0xC000);
|
||||
}
|
||||
|
||||
public function testUnique()
|
||||
{
|
||||
$reps = 100;
|
||||
$ids = array();
|
||||
|
||||
for ($i = 0; $i < $reps; $i++) {
|
||||
$ids[] = UUID::gen();
|
||||
}
|
||||
|
||||
$this->assertEquals(count($ids), count(array_unique($ids)), "UUIDs must be unique");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user