Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
noVNC
Commits
1f84c999
Commit
1f84c999
authored
Nov 18, 2014
by
Solly Ross
Browse files
Options
Browse Files
Download
Plain Diff
Merge "pull-request/412" (ramondeklein/noVNC)
Closes #412
parents
c42ea225
40ac6f0a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
rfb.js
include/rfb.js
+1
-2
test.rfb.js
tests/test.rfb.js
+26
-0
No files found.
include/rfb.js
View file @
1f84c999
...
...
@@ -1496,8 +1496,7 @@ var RFB;
// Weird: ignore blanks are RAW
Util
.
Debug
(
" Ignoring blank after RAW"
);
}
else
{
this
.
_display
.
fillRect
(
x
,
y
,
w
,
h
,
rQ
,
rQi
);
rQi
+=
this
.
_FBU
.
bytes
-
1
;
this
.
_display
.
fillRect
(
x
,
y
,
w
,
h
,
FBU
.
background
);
}
}
else
if
(
this
.
_FBU
.
subencoding
&
0x01
)
{
// Raw
this
.
_display
.
blitImage
(
x
,
y
,
w
,
h
,
rQ
,
rQi
);
...
...
tests/test.rfb.js
View file @
1f84c999
...
...
@@ -1312,6 +1312,32 @@ describe('Remote Frame Buffer Protocol Client', function() {
expect
(
client
.
_display
).
to
.
have
.
displayed
(
new
Uint8Array
(
expected
));
});
it
(
'should handle a tile with only bg specified and an empty frame afterwards'
,
function
()
{
// set the width so we can have two tiles
client
.
_fb_width
=
8
;
client
.
_display
.
_fb_width
=
8
;
client
.
_display
.
_viewportLoc
.
w
=
8
;
var
info
=
[{
x
:
0
,
y
:
0
,
width
:
8
,
height
:
4
,
encoding
:
0x05
}];
var
rect
=
[];
// send a bg frame
rect
.
push
(
0x02
);
rect
.
push32
(
0xff00ff
);
// becomes 00ff00ff --> #00FF00 bg color
// send an empty frame
rect
.
push
(
0x00
);
send_fbu_msg
(
info
,
[
rect
],
client
);
var
expected
=
[];
var
i
;
for
(
i
=
0
;
i
<
16
;
i
++
)
{
expected
.
push32
(
0xff00ff
);
}
// rect 1: solid
for
(
i
=
0
;
i
<
16
;
i
++
)
{
expected
.
push32
(
0xff00ff
);
}
// rect 2: same bkground color
expect
(
client
.
_display
).
to
.
have
.
displayed
(
new
Uint8Array
(
expected
));
});
it
(
'should handle a tile with bg and coloured subrects'
,
function
()
{
var
info
=
[{
x
:
0
,
y
:
0
,
width
:
4
,
height
:
4
,
encoding
:
0x05
}];
var
rect
=
[];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment