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
474e68bd
Commit
474e68bd
authored
Jul 05, 2016
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix assembly items formatting
parent
39a0ec92
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
73 additions
and
33 deletions
+73
-33
browser_tests.sh
ci/browser_tests.sh
+4
-6
nightwatch.js
nightwatch.js
+2
-2
codeUtils.js
src/code/codeUtils.js
+3
-1
index.js
src/index.js
+2
-2
init.js
test-browser/init.js
+43
-22
init.js
test/init.js
+19
-0
testWeb3.js
test/resources/testWeb3.js
+0
-0
testWeb3.json
test/resources/testWeb3.json
+0
-0
No files found.
ci/browser_tests.sh
View file @
474e68bd
#!/bin/bash
set
-e
SAUCECONNECT_URL
=
"http://saucelabs.com/downloads/sc-4.3.16-linux.tar.gz"
SAUCECONNECT_USERNAME
=
"yann300"
SAUCECONNECT_ACCESSKEY
=
"e6f430f2-daa0-48bb-90fd-8bee20f429eb"
...
...
@@ -18,9 +16,9 @@ while [ ! -f $SAUCECONNECT_READYFILE ]; do
sleep
.5
done
npm run nightwatch_remote_firefox
npm run nightwatch_remote_chrome
npm run nightwatch_remote_safari
#
npm run nightwatch_remote_firefox
#
npm run nightwatch_remote_chrome
#
npm run nightwatch_remote_safari
npm run nightwatch_remote_ie
curl
-X
delete
"http://saucelabs.com/rest/v1/
${
SAUCECONNECT_USERNAME
}
/tunnels/
${
SAUCECONNECT_JOBIDENTIFIER
}
"
curl
"https://saucelabs.com/rest/v1/
${
SAUCECONNECT_USERNAME
}
/tunnels/
${
SAUCECONNECT_JOBIDENTIFIER
}
"
-u
"
${
SAUCECONNECT_USERNAME
}
:
${
SAUCECONNECT_ACCESSKEY
}
"
-X
DELETE
nightwatch.js
View file @
474e68bd
...
...
@@ -68,9 +68,9 @@ module.exports = {
}
},
'i
nternetexplorer
'
:
{
'i
e
'
:
{
'desiredCapabilities'
:
{
'browserName'
:
'internetexplorer'
,
'browserName'
:
'internet
explorer'
,
'javascriptEnabled'
:
true
,
'acceptSslCerts'
:
true
,
'build'
:
'build-'
+
TRAVIS_JOB_NUMBER
,
...
...
src/code/codeUtils.js
View file @
474e68bd
...
...
@@ -18,7 +18,9 @@ module.exports = {
i
+=
jumpNum
}
code
.
push
(
this
.
pad
(
pc
,
this
.
roundLog
(
raw
.
length
,
10
))
+
' '
+
curOpCode
+
' '
+
pushData
.
toString
(
'hex'
))
var
data
=
pushData
.
toString
(
'hex'
)
!==
''
?
' '
+
pushData
.
toString
(
'hex'
)
:
''
code
.
push
(
this
.
pad
(
pc
,
this
.
roundLog
(
raw
.
length
,
10
))
+
' '
+
curOpCode
+
data
)
pushData
=
''
}
return
[
code
,
codeMap
]
...
...
src/index.js
View file @
474e68bd
...
...
@@ -2,8 +2,8 @@
var
Debugger
=
require
(
'./Ethdebugger'
)
function
init
()
{
var
container
=
document
.
getElementById
(
'app'
)
container
.
vmdebugger
=
new
Debugger
()
container
.
appendChild
(
container
.
vmdebugger
.
render
())
window
.
vmdebugger
=
new
Debugger
()
container
.
appendChild
(
window
.
vmdebugger
.
render
())
}
init
()
test-browser/init.js
View file @
474e68bd
/* global web3Override */
var
init
=
require
(
'../test/init'
)
module
.
exports
=
function
(
browser
,
callback
)
{
extendBrowser
(
browser
)
browser
.
url
(
'http://127.0.0.1:8080'
)
injectScript
(
'./test/resources/testWeb3.js'
,
browser
,
function
()
{
.
waitForElementPresent
(
'#app div'
,
1000
)
injectScript
(
'./test/resources/testWeb3.json'
,
browser
,
function
()
{
callback
()
})
}
function
readFile
(
filename
,
callback
)
{
var
fs
=
require
(
'fs'
)
try
{
console
.
log
(
'reading '
+
filename
)
fs
.
readFile
(
filename
,
'utf8'
,
callback
)
}
catch
(
e
)
{
console
.
log
(
e
)
callback
(
e
)
}
}
function
injectScript
(
file
,
browser
,
callback
)
{
readFile
(
file
,
function
(
error
,
result
)
{
init
.
readFile
(
file
,
function
(
error
,
result
)
{
if
(
!
error
)
{
browser
.
execute
(
function
(
data
)
{
eval
.
call
(
null
,
data
)
// eslint-disable-line
var
vmdebugger
=
document
.
getElementById
(
'app'
).
vmdebugger
vmdebugger
.
web3
.
eth
.
getCode
=
web3Override
.
getCode
vmdebugger
.
web3
.
debug
.
traceTransaction
=
web3Override
.
traceTransaction
vmdebugger
.
web3
.
debug
.
storageAt
=
web3Override
.
storageAt
vmdebugger
.
web3
.
eth
.
getTransaction
=
web3Override
.
getTransaction
vmdebugger
.
web3
.
eth
.
getTransactionFromBlock
=
web3Override
.
getTransactionFromBlock
vmdebugger
.
web3
.
eth
.
getBlockNumber
=
web3Override
.
getBlockNumber
// var vmdebugger = window.vmdebugger // document.getElementById('app').vmdebugger
data
=
JSON
.
parse
(
data
)
window
.
vmdebugger
.
web3
.
eth
.
getCode
=
function
(
address
,
callback
)
{
if
(
callback
)
{
callback
(
null
,
data
.
testCodes
[
address
])
}
else
{
return
data
.
testCodes
[
address
]
}
}
window
.
vmdebugger
.
web3
.
debug
.
traceTransaction
=
function
(
txHash
,
options
,
callback
)
{
callback
(
null
,
data
.
testTraces
[
txHash
])
}
window
.
vmdebugger
.
web3
.
debug
.
storageAt
=
function
(
blockNumber
,
txIndex
,
address
,
callback
)
{
callback
(
null
,
{})
}
window
.
vmdebugger
.
web3
.
eth
.
getTransaction
=
function
(
txHash
,
callback
)
{
if
(
callback
)
{
callback
(
null
,
data
.
testTxs
[
txHash
])
}
else
{
return
data
.
testTxs
[
txHash
]
}
}
window
.
vmdebugger
.
web3
.
eth
.
getTransactionFromBlock
=
function
(
blockNumber
,
txIndex
,
callback
)
{
if
(
callback
)
{
callback
(
null
,
data
.
testTxsByBlock
[
blockNumber
+
'-'
+
txIndex
])
}
else
{
return
data
.
testTxsByBlock
[
blockNumber
+
'-'
+
txIndex
]
}
}
window
.
vmdebugger
.
web3
.
eth
.
getBlockNumber
=
function
(
callback
)
{
callback
(
'web3 modified testing purposes :)'
)
}
window
.
vmdebugger
.
web3
.
eth
.
getBlockNumber
(
function
(
r
)
{
console
.
log
(
'rrrr'
+
r
)
})
},
[
result
],
function
()
{
callback
()
})
...
...
test/init.js
View file @
474e68bd
...
...
@@ -6,6 +6,25 @@ var init = {
web3
.
eth
.
getTransaction
=
web3Override
.
getTransaction
web3
.
eth
.
getTransactionFromBlock
=
web3Override
.
getTransactionFromBlock
web3
.
eth
.
getBlockNumber
=
web3Override
.
getBlockNumber
},
readFile
:
function
(
filename
,
callback
)
{
var
fs
=
require
(
'fs'
)
try
{
console
.
log
(
'reading '
+
filename
)
if
(
callback
)
{
fs
.
readFile
(
filename
,
'utf8'
,
callback
)
}
else
{
return
fs
.
readFileSync
(
filename
,
'utf8'
)
}
}
catch
(
e
)
{
console
.
log
(
e
)
if
(
callback
)
{
callback
(
e
)
}
else
{
return
e
}
}
}
}
...
...
test/resources/testWeb3.js
View file @
474e68bd
This diff is collapsed.
Click to expand it.
test/resources/testWeb3.json
0 → 100644
View file @
474e68bd
This diff is collapsed.
Click to expand it.
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