spec: Make the basic-auth spec stronger
This commit is contained in:
parent
9ec60cd585
commit
1a93b1db52
3 changed files with 31 additions and 29 deletions
15
spec/fixtures/pages/basic-auth.html
vendored
15
spec/fixtures/pages/basic-auth.html
vendored
|
@ -1,16 +1,21 @@
|
|||
<html>
|
||||
<body>
|
||||
<script src='http://127.0.0.1:62342/jquery.js'></script>
|
||||
<script src="../../static/jquery-2.0.3.min.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var ipc = require('ipc');
|
||||
var port = location.search.substr("?port=".length);
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://127.0.0.1:62342",
|
||||
url: "http://127.0.0.1:" + port,
|
||||
headers: {
|
||||
"Authorization": "Basic " + btoa("test:test")
|
||||
},
|
||||
success: function (result){
|
||||
require('ipc').send('console-message', result);
|
||||
}
|
||||
success: function(result) {
|
||||
ipc.sendToHost(result);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
ipc.sendToHost(error);
|
||||
},
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue