Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
e668b89c
Unverified
Commit
e668b89c
authored
Oct 12, 2020
by
David Disu
Committed by
GitHub
Oct 12, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #471 from ethereum/fix#469
Make sure contents accessed by their external URL are properly handled
parents
22c1e665
11b4b5a3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
debugger.test.ts
apps/remix-ide-e2e/src/tests/debugger.test.ts
+27
-1
fileProvider.js
apps/remix-ide/src/app/files/fileProvider.js
+2
-0
No files found.
apps/remix-ide-e2e/src/tests/debugger.test.ts
View file @
e668b89c
...
...
@@ -72,7 +72,28 @@ module.exports = {
.
click
(
'*[data-id="buttonNavigatorJumpNextBreakpoint"]'
)
.
pause
(
2000
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'vm trace step:
\
n184'
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'execution step:
\
n184'
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'execution step:
\
n184'
)
},
'Should display solidity imported code while debugging github import'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
clickLaunchIcon
(
'solidity'
)
.
setSolidityCompilerVersion
(
'soljson-v0.6.12+commit.27d51765.js'
)
.
clickLaunchIcon
(
'udapp'
)
.
testContracts
(
'externalImport.sol'
,
sources
[
1
][
'browser/externalImport.sol'
],
[
'ERC20'
])
.
selectContract
(
'ERC20'
)
.
createContract
(
'"tokenName", "symbol"'
)
.
debugTransaction
(
2
)
.
pause
(
2000
)
.
goToVMTraceStep
(
10
)
.
getEditorValue
((
content
)
=>
{
browser
.
assert
.
ok
(
content
.
indexOf
(
`constructor (string memory name, string memory symbol) public {
_name = name;
_symbol = symbol;
_decimals = 18;
}`
)
!=
-
1
,
'current displayed content is not from the ERC20 source code'
)
})
.
end
()
},
...
...
@@ -112,5 +133,10 @@ const sources = [
}
`
}
},
{
'browser/externalImport.sol'
:
{
content
:
'import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; contract test7 {}'
}
}
]
apps/remix-ide/src/app/files/fileProvider.js
View file @
e668b89c
...
...
@@ -70,6 +70,7 @@ class FileProvider {
}
_exists
(
path
)
{
path
=
this
.
getPathFromUrl
(
path
)
||
path
// ensure we actually use the normalized path from here
var
unprefixedpath
=
this
.
removePrefix
(
path
)
return
path
===
this
.
type
?
true
:
window
.
remixFileSystem
.
existsSync
(
unprefixedpath
)
}
...
...
@@ -148,6 +149,7 @@ class FileProvider {
}
isFile
(
path
)
{
path
=
this
.
getPathFromUrl
(
path
)
||
path
// ensure we actually use the normalized path from here
path
=
this
.
removePrefix
(
path
)
return
window
.
remixFileSystem
.
statSync
(
path
).
isFile
()
}
...
...
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