Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
fc5d8d1b
Commit
fc5d8d1b
authored
Nov 15, 2021
by
Eduardo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply suggestions from code review
Co-authored-by:
Robert Knight
<
robertknight@gmail.com
>
parent
35fc303b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
port-provider.js
src/shared/port-provider.js
+3
-3
port-finder-test.js
src/shared/test/port-finder-test.js
+1
-1
port-provider-test.js
src/shared/test/port-provider-test.js
+1
-1
No files found.
src/shared/port-provider.js
View file @
fc5d8d1b
...
...
@@ -15,7 +15,7 @@ import { isMessageEqual } from './port-util';
* frames.
*
* There are 4 types of frames:
* - `host`: frame where the
h
ypothesis client is initially loaded.
* - `host`: frame where the
H
ypothesis client is initially loaded.
* - `guest`: frames with annotatable content. In some instances a `guest`
* frame can be the same as the `host` frame, in other cases, it is an iframe
* where either (1) the hypothesis client has been injected or (2) the
...
...
@@ -33,7 +33,7 @@ import { isMessageEqual } from './port-util';
* |-> `notebook` iframe
* |-> [`guest` iframes]
*
* Currently, we support
the
communication between the following pairs of frames:
* Currently, we support communication between the following pairs of frames:
* - `guest-host`
* - `guest-sidebar`
* - `host-sidebar`
...
...
@@ -65,7 +65,7 @@ export class PortProvider {
/**
* @param {string} hypothesisAppsOrigin - the origin of the hypothesis apps
* is use to send the notebook and sidebar ports to only the frames that
* match
es
the origin.
* match the origin.
*/
constructor
(
hypothesisAppsOrigin
)
{
this
.
_hypothesisAppsOrigin
=
hypothesisAppsOrigin
;
...
...
src/shared/test/port-finder-test.js
View file @
fc5d8d1b
...
...
@@ -28,7 +28,7 @@ describe('PortFinder', () => {
});
describe
(
'#destroy'
,
()
=>
{
it
(
'ignores `offer` messages of ports'
,
async
()
=>
{
it
(
'ignores
subsequent
`offer` messages of ports'
,
async
()
=>
{
let
error
;
const
channel
=
'host-sidebar'
;
const
port
=
'sidebar'
;
...
...
src/shared/test/port-provider-test.js
View file @
fc5d8d1b
...
...
@@ -208,7 +208,7 @@ describe('PortProvider', () => {
);
});
it
(
'responds to the first valid port request
, ignore
additional requests'
,
async
()
=>
{
it
(
'responds to the first valid port request
but ignores
additional requests'
,
async
()
=>
{
const
data
=
{
channel
:
'guest-host'
,
port
:
'guest'
,
...
...
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