Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
noVNC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cdn
noVNC
Commits
c4482d2d
Commit
c4482d2d
authored
8 years ago
by
Pierre Ossman
Browse files
Options
Downloads
Patches
Plain Diff
Remove buffer limit tests
We no longer limit writes to the socket.
parent
d2467189
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test.websock.js
+1
-18
1 addition, 18 deletions
tests/test.websock.js
with
1 addition
and
18 deletions
tests/test.websock.js
+
1
−
18
View file @
c4482d2d
...
@@ -170,8 +170,7 @@ describe('Websock', function() {
...
@@ -170,8 +170,7 @@ describe('Websock', function() {
};
};
});
});
it
(
'
should actually send on the websocket if the websocket does not have too much buffered
'
,
function
()
{
it
(
'
should actually send on the websocket
'
,
function
()
{
sock
.
maxBufferedAmount
=
10
;
sock
.
_websocket
.
bufferedAmount
=
8
;
sock
.
_websocket
.
bufferedAmount
=
8
;
sock
.
_websocket
.
readyState
=
WebSocket
.
OPEN
sock
.
_websocket
.
readyState
=
WebSocket
.
OPEN
sock
.
_sQ
=
new
Uint8Array
([
1
,
2
,
3
]);
sock
.
_sQ
=
new
Uint8Array
([
1
,
2
,
3
]);
...
@@ -183,30 +182,14 @@ describe('Websock', function() {
...
@@ -183,30 +182,14 @@ describe('Websock', function() {
expect
(
sock
.
_websocket
.
send
).
to
.
have
.
been
.
calledWith
(
encoded
);
expect
(
sock
.
_websocket
.
send
).
to
.
have
.
been
.
calledWith
(
encoded
);
});
});
it
(
'
should return true if the websocket did not have too much buffered
'
,
function
()
{
sock
.
maxBufferedAmount
=
10
;
sock
.
_websocket
.
bufferedAmount
=
8
;
expect
(
sock
.
flush
()).
to
.
be
.
true
;
});
it
(
'
should not call send if we do not have anything queued up
'
,
function
()
{
it
(
'
should not call send if we do not have anything queued up
'
,
function
()
{
sock
.
_sQlen
=
0
;
sock
.
_sQlen
=
0
;
sock
.
maxBufferedAmount
=
10
;
sock
.
_websocket
.
bufferedAmount
=
8
;
sock
.
_websocket
.
bufferedAmount
=
8
;
sock
.
flush
();
sock
.
flush
();
expect
(
sock
.
_websocket
.
send
).
not
.
to
.
have
.
been
.
called
;
expect
(
sock
.
_websocket
.
send
).
not
.
to
.
have
.
been
.
called
;
});
});
it
(
'
should not send and return false if the websocket has too much buffered
'
,
function
()
{
sock
.
maxBufferedAmount
=
10
;
sock
.
_websocket
.
bufferedAmount
=
12
;
expect
(
sock
.
flush
()).
to
.
be
.
false
;
expect
(
sock
.
_websocket
.
send
).
to
.
not
.
have
.
been
.
called
;
});
});
});
describe
(
'
send
'
,
function
()
{
describe
(
'
send
'
,
function
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment