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
5601ceda
Commit
5601ceda
authored
Jan 18, 2017
by
yann300
Committed by
GitHub
Jan 18, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #170 from ethereum/treeView
Tree view
parents
7dd80d33
0edf9f88
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
150 additions
and
71 deletions
+150
-71
CalldataPanel.js
src/ui/CalldataPanel.js
+1
-1
CallstackPanel.js
src/ui/CallstackPanel.js
+1
-1
CodeListView.js
src/ui/CodeListView.js
+2
-3
DropdownPanel.js
src/ui/DropdownPanel.js
+24
-33
FullStoragesChanges.js
src/ui/FullStoragesChanges.js
+1
-1
MemoryPanel.js
src/ui/MemoryPanel.js
+5
-1
SolidityLocals.js
src/ui/SolidityLocals.js
+1
-1
SolidityState.js
src/ui/SolidityState.js
+1
-1
StackPanel.js
src/ui/StackPanel.js
+1
-1
StepDetail.js
src/ui/StepDetail.js
+1
-1
StoragePanel.js
src/ui/StoragePanel.js
+1
-1
TreeView.js
src/ui/TreeView.js
+70
-0
TxBrowser.js
src/ui/TxBrowser.js
+3
-5
VmDebugger.js
src/ui/VmDebugger.js
+3
-4
dropdownPanel.js
src/ui/styles/dropdownPanel.js
+1
-2
treeView.js
src/ui/styles/treeView.js
+16
-0
init.js
test-browser/init.js
+5
-1
vmdebugger.js
test-browser/vmdebugger.js
+13
-14
No files found.
src/ui/CalldataPanel.js
View file @
5601ceda
...
@@ -5,7 +5,7 @@ var yo = require('yo-yo')
...
@@ -5,7 +5,7 @@ var yo = require('yo-yo')
function
CalldataPanel
(
_parent
,
_traceManager
)
{
function
CalldataPanel
(
_parent
,
_traceManager
)
{
this
.
parent
=
_parent
this
.
parent
=
_parent
this
.
traceManager
=
_traceManager
this
.
traceManager
=
_traceManager
this
.
basicPanel
=
new
DropdownPanel
(
'Call Data'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Call Data'
,
{
json
:
true
}
)
this
.
init
()
this
.
init
()
}
}
...
...
src/ui/CallstackPanel.js
View file @
5601ceda
...
@@ -5,7 +5,7 @@ var yo = require('yo-yo')
...
@@ -5,7 +5,7 @@ var yo = require('yo-yo')
function
CallstackPanel
(
_parent
,
_traceManager
)
{
function
CallstackPanel
(
_parent
,
_traceManager
)
{
this
.
parent
=
_parent
this
.
parent
=
_parent
this
.
traceManager
=
_traceManager
this
.
traceManager
=
_traceManager
this
.
basicPanel
=
new
DropdownPanel
(
'Call Stack'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Call Stack'
,
{
json
:
true
}
)
this
.
init
()
this
.
init
()
}
}
...
...
src/ui/CodeListView.js
View file @
5601ceda
...
@@ -11,7 +11,7 @@ function CodeListView (_parent, _codeManager) {
...
@@ -11,7 +11,7 @@ function CodeListView (_parent, _codeManager) {
this
.
address
this
.
address
this
.
codeView
this
.
codeView
this
.
itemSelected
this
.
itemSelected
this
.
basicPanel
=
new
DropdownPanel
(
'Instructions'
,
true
)
this
.
basicPanel
=
new
DropdownPanel
(
'Instructions'
,
{
json
:
false
}
)
this
.
init
()
this
.
init
()
}
}
...
@@ -51,8 +51,7 @@ CodeListView.prototype.changed = function (code, address, index) {
...
@@ -51,8 +51,7 @@ CodeListView.prototype.changed = function (code, address, index) {
this
.
code
=
code
this
.
code
=
code
this
.
address
=
address
this
.
address
=
address
this
.
codeView
=
this
.
renderAssemblyItems
()
this
.
codeView
=
this
.
renderAssemblyItems
()
this
.
basicPanel
.
data
=
this
.
codeView
this
.
basicPanel
.
setContent
(
this
.
codeView
)
this
.
basicPanel
.
update
()
}
}
this
.
indexChanged
(
index
)
this
.
indexChanged
(
index
)
}
}
...
...
src/ui/DropdownPanel.js
View file @
5601ceda
...
@@ -3,49 +3,40 @@ var yo = require('yo-yo')
...
@@ -3,49 +3,40 @@ var yo = require('yo-yo')
var
ui
=
require
(
'../helpers/ui'
)
var
ui
=
require
(
'../helpers/ui'
)
var
styleDropdown
=
require
(
'./styles/dropdownPanel'
)
var
styleDropdown
=
require
(
'./styles/dropdownPanel'
)
var
basicStyles
=
require
(
'./styles/basicStyles'
)
var
basicStyles
=
require
(
'./styles/basicStyles'
)
var
TreeView
=
require
(
'./TreeView'
)
function
DropdownPanel
(
_name
,
_raw
)
{
function
DropdownPanel
(
_name
,
_opts
)
{
this
.
data
if
(
!
_opts
)
{
_opts
=
{}
}
this
.
name
=
_name
this
.
name
=
_name
this
.
json
=
_opts
.
json
if
(
this
.
json
)
{
this
.
treeView
=
new
TreeView
(
_opts
)
}
this
.
view
this
.
view
_raw
=
_raw
===
undefined
?
false
:
_raw
this
.
raw
=
_raw
}
}
DropdownPanel
.
prototype
.
update
=
function
(
_data
)
{
DropdownPanel
.
prototype
.
update
=
function
(
_data
)
{
if
(
!
this
.
view
)
{
if
(
this
.
view
)
{
return
this
.
view
.
querySelector
(
'.dropdownpanel .dropdownrawcontent'
).
innerText
=
JSON
.
stringify
(
_data
,
null
,
'
\
t'
)
}
if
(
_data
)
{
this
.
data
=
_data
}
this
.
view
.
querySelector
(
'.dropdownpanel div.dropdowncontent'
).
innerHTML
=
''
if
(
!
this
.
raw
)
{
var
data
=
JSON
.
stringify
(
this
.
data
,
null
,
'
\
t'
)
if
(
!
this
.
data
||
data
===
'[]'
||
data
===
'{}'
)
{
this
.
data
=
[
'Empty'
]
}
var
div
=
document
.
createElement
(
'div'
)
if
(
Array
.
isArray
(
this
.
data
))
{
this
.
data
.
map
(
function
(
item
,
i
)
{
div
.
appendChild
(
yo
`<div>
${
item
}
</div>`
)
})
}
else
{
for
(
var
k
in
this
.
data
)
{
var
content
=
typeof
this
.
data
[
k
]
===
'string'
?
this
.
data
[
k
]
:
JSON
.
stringify
(
this
.
data
[
k
])
div
.
appendChild
(
yo
`<div><div title=
${
k
}
style=
${
ui
.
formatCss
(
basicStyles
.
truncate
,
{
display
:
'inline-block'
,
'width'
:
'10%'
})}
>
${
k
}
</div><div title=
${
content
}
style=
${
ui
.
formatCss
(
basicStyles
.
truncate
,
{
display
:
'inline-block'
,
'width'
:
'78%'
})}
>
${
content
}
</div></div>`
)
}
}
this
.
view
.
querySelector
(
'.dropdownpanel div.dropdowncontent'
).
appendChild
(
div
)
this
.
view
.
querySelector
(
'.dropdownpanel button.btn'
).
style
.
display
=
'block'
this
.
view
.
querySelector
(
'.dropdownpanel button.btn'
).
style
.
display
=
'block'
this
.
view
.
querySelector
(
'.dropdownpanel .dropdownrawcontent'
).
innerText
=
data
if
(
this
.
json
)
{
}
else
{
this
.
treeView
.
update
(
_data
)
this
.
view
.
querySelector
(
'.dropdownpanel div.dropdowncontent'
).
appendChild
(
this
.
data
)
}
this
.
view
.
querySelector
(
'.dropdownpanel button.btn'
).
style
.
display
=
'none'
}
}
}
}
DropdownPanel
.
prototype
.
setContent
=
function
(
node
)
{
var
parent
=
this
.
view
.
querySelector
(
'.dropdownpanel div.dropdowncontent'
)
parent
.
replaceChild
(
node
,
parent
.
firstElementChild
)
}
DropdownPanel
.
prototype
.
render
=
function
(
overridestyle
)
{
DropdownPanel
.
prototype
.
render
=
function
(
overridestyle
)
{
var
content
=
yo
`<div>Empty</div>`
if
(
this
.
json
)
{
content
=
this
.
treeView
.
render
({})
}
overridestyle
===
undefined
?
{}
:
overridestyle
overridestyle
===
undefined
?
{}
:
overridestyle
var
self
=
this
var
self
=
this
var
view
=
yo
`<div>
var
view
=
yo
`<div>
...
@@ -55,7 +46,7 @@ DropdownPanel.prototype.render = function (overridestyle) {
...
@@ -55,7 +46,7 @@ DropdownPanel.prototype.render = function (overridestyle) {
<div class='dropdownpanel' style=
${
ui
.
formatCss
(
styleDropdown
.
content
)}
style='display:none'>
<div class='dropdownpanel' style=
${
ui
.
formatCss
(
styleDropdown
.
content
)}
style='display:none'>
<button onclick=
${
function
()
{
self
.
toggleRaw
()
}
} style=
${
ui
.
formatCss
(
basicStyles
.
button
,
styleDropdown
.
copyBtn
)}
title='raw' class="btn fa fa-eye" type="button">
<button onclick=
${
function
()
{
self
.
toggleRaw
()
}
} style=
${
ui
.
formatCss
(
basicStyles
.
button
,
styleDropdown
.
copyBtn
)}
title='raw' class="btn fa fa-eye" type="button">
</button>
</button>
<div style=
${
ui
.
formatCss
(
styleDropdown
.
inner
,
overridestyle
)}
class='dropdowncontent'>
<div>Empty</div>
</div>
<div style=
${
ui
.
formatCss
(
styleDropdown
.
inner
,
overridestyle
)}
class='dropdowncontent'>
${
content
}
</div>
<div style=
${
ui
.
formatCss
(
styleDropdown
.
inner
,
overridestyle
)}
class='dropdownrawcontent' style='display:none'></div>
<div style=
${
ui
.
formatCss
(
styleDropdown
.
inner
,
overridestyle
)}
class='dropdownrawcontent' style='display:none'></div>
</div>
</div>
</div>`
</div>`
...
...
src/ui/FullStoragesChanges.js
View file @
5601ceda
...
@@ -8,7 +8,7 @@ function FullStoragesChanges (_parent, _traceManager) {
...
@@ -8,7 +8,7 @@ function FullStoragesChanges (_parent, _traceManager) {
this
.
addresses
=
[]
this
.
addresses
=
[]
this
.
view
this
.
view
this
.
traceLength
this
.
traceLength
this
.
basicPanel
=
new
DropdownPanel
(
'Full Storages Changes'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Full Storages Changes'
,
{
json
:
true
}
)
this
.
init
()
this
.
init
()
}
}
...
...
src/ui/MemoryPanel.js
View file @
5601ceda
...
@@ -6,7 +6,11 @@ var yo = require('yo-yo')
...
@@ -6,7 +6,11 @@ var yo = require('yo-yo')
function
MemoryPanel
(
_parent
,
_traceManager
)
{
function
MemoryPanel
(
_parent
,
_traceManager
)
{
this
.
parent
=
_parent
this
.
parent
=
_parent
this
.
traceManager
=
_traceManager
this
.
traceManager
=
_traceManager
this
.
basicPanel
=
new
DropdownPanel
(
'Memory'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Memory'
,
{
json
:
true
,
css
:
{
'font-family'
:
'monospace'
}})
this
.
init
()
this
.
init
()
}
}
...
...
src/ui/SolidityLocals.js
View file @
5601ceda
...
@@ -9,7 +9,7 @@ class SolidityLocals {
...
@@ -9,7 +9,7 @@ class SolidityLocals {
this
.
parent
=
_parent
this
.
parent
=
_parent
this
.
internalTreeCall
=
internalTreeCall
this
.
internalTreeCall
=
internalTreeCall
this
.
traceManager
=
_traceManager
this
.
traceManager
=
_traceManager
this
.
basicPanel
=
new
DropdownPanel
(
'Solidity Locals'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Solidity Locals'
,
{
json
:
true
}
)
this
.
init
()
this
.
init
()
}
}
...
...
src/ui/SolidityState.js
View file @
5601ceda
...
@@ -8,7 +8,7 @@ function SolidityState (_parent, _traceManager, _codeManager, _solidityProxy) {
...
@@ -8,7 +8,7 @@ function SolidityState (_parent, _traceManager, _codeManager, _solidityProxy) {
this
.
traceManager
=
_traceManager
this
.
traceManager
=
_traceManager
this
.
codeManager
=
_codeManager
this
.
codeManager
=
_codeManager
this
.
solidityProxy
=
_solidityProxy
this
.
solidityProxy
=
_solidityProxy
this
.
basicPanel
=
new
DropdownPanel
(
'Solidity State'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Solidity State'
,
{
json
:
true
}
)
this
.
init
()
this
.
init
()
}
}
...
...
src/ui/StackPanel.js
View file @
5601ceda
...
@@ -6,7 +6,7 @@ var yo = require('yo-yo')
...
@@ -6,7 +6,7 @@ var yo = require('yo-yo')
function
StackPanel
(
_parent
,
_traceManager
)
{
function
StackPanel
(
_parent
,
_traceManager
)
{
this
.
parent
=
_parent
this
.
parent
=
_parent
this
.
traceManager
=
_traceManager
this
.
traceManager
=
_traceManager
this
.
basicPanel
=
new
DropdownPanel
(
'Stack'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Stack'
,
{
json
:
true
}
)
this
.
init
()
this
.
init
()
}
}
...
...
src/ui/StepDetail.js
View file @
5601ceda
...
@@ -6,7 +6,7 @@ function StepDetail (_parent, _traceManager) {
...
@@ -6,7 +6,7 @@ function StepDetail (_parent, _traceManager) {
this
.
parent
=
_parent
this
.
parent
=
_parent
this
.
traceManager
=
_traceManager
this
.
traceManager
=
_traceManager
this
.
basicPanel
=
new
DropdownPanel
(
'Step detail'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Step detail'
,
{
json
:
true
}
)
this
.
detail
=
initDetail
()
this
.
detail
=
initDetail
()
this
.
view
this
.
view
...
...
src/ui/StoragePanel.js
View file @
5601ceda
...
@@ -5,7 +5,7 @@ var yo = require('yo-yo')
...
@@ -5,7 +5,7 @@ var yo = require('yo-yo')
function
StoragePanel
(
_parent
,
_traceManager
,
_address
)
{
function
StoragePanel
(
_parent
,
_traceManager
,
_address
)
{
this
.
parent
=
_parent
this
.
parent
=
_parent
this
.
traceManager
=
_traceManager
this
.
traceManager
=
_traceManager
this
.
basicPanel
=
new
DropdownPanel
(
'Storage Changes'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Storage Changes'
,
{
json
:
true
}
)
this
.
address
=
_address
this
.
address
=
_address
this
.
init
()
this
.
init
()
this
.
disabled
=
false
this
.
disabled
=
false
...
...
src/ui/TreeView.js
0 → 100644
View file @
5601ceda
'use strict'
var
yo
=
require
(
'yo-yo'
)
var
style
=
require
(
'./styles/treeView'
)
var
ui
=
require
(
'../helpers/ui'
)
class
TreeView
{
constructor
(
opts
)
{
function
noop
(
node
)
{
}
this
.
beforeJsonNodeRendered
=
opts
.
beforeJsonNodeRendered
||
noop
this
.
beforeJsonValueRendered
=
opts
.
beforeJsonValueRendered
||
noop
this
.
view
=
null
this
.
cssLabel
=
ui
.
formatCss
(
opts
.
css
||
{},
style
.
label
)
this
.
cssList
=
ui
.
formatCss
(
opts
.
css
||
{},
style
.
list
)
}
render
(
json
)
{
var
view
=
yo
`<div>
${
this
.
renderProperties
(
json
,
true
)}
</div>`
if
(
!
this
.
view
)
{
this
.
view
=
view
}
return
view
}
update
(
json
)
{
if
(
this
.
view
)
{
yo
.
update
(
this
.
view
,
this
.
render
(
json
),
{
onBeforeElUpdated
:
(
fromEl
,
toEl
)
=>
{
toEl
.
style
.
display
=
fromEl
.
style
.
display
toEl
.
className
=
fromEl
.
className
return
true
}})
}
}
renderObject
(
item
,
key
,
expand
)
{
var
label
if
(
item
instanceof
Array
||
item
instanceof
Object
)
{
var
properties
=
this
.
renderProperties
(
item
,
false
)
label
=
yo
`<span style=
${
this
.
cssLabel
}
><label style='width: 10px' id='caret'></label><label>
${
key
}
-
${
properties
.
length
}
items</label></span>`
var
list
=
yo
`<ul style=
${
this
.
cssList
}
>
${
properties
}
</ol>`
list
.
style
.
display
=
expand
?
'block'
:
'none'
label
.
firstElementChild
.
className
=
expand
?
'fa fa-caret-down'
:
'fa fa-caret-right'
label
.
onclick
=
function
()
{
this
.
firstElementChild
.
className
=
this
.
firstElementChild
.
className
===
'fa fa-caret-right'
?
'fa fa-caret-down'
:
'fa fa-caret-right'
var
list
=
this
.
parentElement
.
querySelector
(
'ul'
)
list
.
style
.
display
=
list
.
style
.
display
===
'none'
?
'block'
:
'none'
}
if
(
this
.
beforeJsonNodeRendered
)
{
this
.
beforeJsonNodeRendered
(
label
,
item
,
key
)
}
return
yo
`<li style=
${
this
.
cssList
}
>
${
label
}${
list
}
</li>`
}
else
{
label
=
yo
`<label style=
${
this
.
cssLabel
}
>
${
key
}
</label>`
if
(
this
.
beforeJsonValueRendered
)
{
this
.
beforeJsonValueRendered
(
label
,
item
,
key
)
}
return
yo
`<li style=
${
this
.
cssList
}
>
${
label
}
: <span style=
${
this
.
cssLabel
}
>
${
item
}
</span></li>`
}
}
renderProperties
(
json
,
expand
)
{
var
properties
=
Object
.
keys
(
json
).
map
((
innerkey
)
=>
{
return
this
.
renderObject
(
json
[
innerkey
],
innerkey
,
expand
)
})
return
properties
}
}
module
.
exports
=
TreeView
src/ui/TxBrowser.js
View file @
5601ceda
...
@@ -14,7 +14,7 @@ function TxBrowser (_parent) {
...
@@ -14,7 +14,7 @@ function TxBrowser (_parent) {
this
.
txNumber
this
.
txNumber
this
.
view
this
.
view
this
.
displayConnectionSetting
=
true
this
.
displayConnectionSetting
=
true
this
.
basicPanel
=
new
DropdownPanel
(
'Transaction'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Transaction'
,
{
json
:
true
}
)
this
.
basicPanel
.
data
=
{}
this
.
basicPanel
.
data
=
{}
var
self
=
this
var
self
=
this
_parent
.
event
.
register
(
'providerChanged'
,
this
,
function
(
provider
)
{
_parent
.
event
.
register
(
'providerChanged'
,
this
,
function
(
provider
)
{
...
@@ -34,8 +34,7 @@ function TxBrowser (_parent) {
...
@@ -34,8 +34,7 @@ function TxBrowser (_parent) {
TxBrowser
.
prototype
.
setDefaultValues
=
function
()
{
TxBrowser
.
prototype
.
setDefaultValues
=
function
()
{
this
.
connectInfo
=
''
this
.
connectInfo
=
''
this
.
basicPanel
.
data
=
{}
this
.
basicPanel
.
update
({})
this
.
basicPanel
.
update
()
this
.
basicPanel
.
hide
()
this
.
basicPanel
.
hide
()
this
.
updateWeb3Url
(
util
.
web3
.
currentProvider
.
host
)
this
.
updateWeb3Url
(
util
.
web3
.
currentProvider
.
host
)
if
(
this
.
view
)
{
if
(
this
.
view
)
{
...
@@ -86,8 +85,7 @@ TxBrowser.prototype.update = function (error, tx) {
...
@@ -86,8 +85,7 @@ TxBrowser.prototype.update = function (error, tx) {
this
.
view
.
querySelector
(
'#error'
).
innerHTML
=
'Cannot find transaction with reference. Block number: '
+
this
.
blockNumber
+
'. Transaction index/hash: '
+
this
.
txNumber
this
.
view
.
querySelector
(
'#error'
).
innerHTML
=
'Cannot find transaction with reference. Block number: '
+
this
.
blockNumber
+
'. Transaction index/hash: '
+
this
.
txNumber
}
}
}
}
this
.
basicPanel
.
data
=
info
this
.
basicPanel
.
update
(
info
)
this
.
basicPanel
.
update
()
}
}
TxBrowser
.
prototype
.
updateWeb3Url
=
function
(
newhost
)
{
TxBrowser
.
prototype
.
updateWeb3Url
=
function
(
newhost
)
{
...
...
src/ui/VmDebugger.js
View file @
5601ceda
...
@@ -24,17 +24,16 @@ function VmDebugger (_parent, _traceManager, _codeManager, _solidityProxy, _call
...
@@ -24,17 +24,16 @@ function VmDebugger (_parent, _traceManager, _codeManager, _solidityProxy, _call
this
.
solidityLocals
=
new
SolidityLocals
(
_parent
,
_traceManager
,
_callTree
)
this
.
solidityLocals
=
new
SolidityLocals
(
_parent
,
_traceManager
,
_callTree
)
/* Return values - */
/* Return values - */
this
.
returnValuesPanel
=
new
DropdownPanel
(
'Return Value'
)
this
.
returnValuesPanel
=
new
DropdownPanel
(
'Return Value'
,
{
json
:
true
}
)
this
.
returnValuesPanel
.
data
=
{}
this
.
returnValuesPanel
.
data
=
{}
_parent
.
event
.
register
(
'indexChanged'
,
this
.
returnValuesPanel
,
function
(
index
)
{
_parent
.
event
.
register
(
'indexChanged'
,
this
.
returnValuesPanel
,
function
(
index
)
{
var
self
=
this
var
self
=
this
_traceManager
.
getReturnValue
(
index
,
function
(
error
,
returnValue
)
{
_traceManager
.
getReturnValue
(
index
,
function
(
error
,
returnValue
)
{
if
(
error
)
{
if
(
error
)
{
self
.
data
=
[
error
]
self
.
update
([
error
])
}
else
if
(
_parent
.
currentStepIndex
===
index
)
{
}
else
if
(
_parent
.
currentStepIndex
===
index
)
{
self
.
data
=
[
returnValue
]
self
.
update
([
returnValue
])
}
}
self
.
update
()
})
})
})
})
/* Return values - */
/* Return values - */
...
...
src/ui/styles/dropdownPanel.js
View file @
5601ceda
...
@@ -13,8 +13,7 @@ module.exports = {
...
@@ -13,8 +13,7 @@ module.exports = {
},
},
content
:
{
content
:
{
'color'
:
'#111111'
,
'color'
:
'#111111'
,
'width'
:
'100%'
,
'width'
:
'100%'
'font-family'
:
'monospace'
},
},
inner
:
{
inner
:
{
'padding'
:
'2px'
,
'padding'
:
'2px'
,
...
...
src/ui/styles/treeView.js
0 → 100644
View file @
5601ceda
'use strict'
module
.
exports
=
{
list
:
{
'list-style-type'
:
'none'
,
'-webkit-margin-before'
:
'0px'
,
'-webkit-margin-after'
:
'0px'
,
'-webkit-margin-start'
:
'0px'
,
'-webkit-margin-end'
:
'0px'
,
'-webkit-padding-start'
:
'0px'
,
'margin-left'
:
'10px'
},
label
:
{
'vertical-align'
:
'top'
,
'font-family'
:
'arial,sans-serif'
}
}
test-browser/init.js
View file @
5601ceda
...
@@ -32,7 +32,7 @@ function extendBrowser (browser) {
...
@@ -32,7 +32,7 @@ function extendBrowser (browser) {
}
}
browser
.
assertStepDetail
=
function
(
vmtracestepinfo
,
stepinfo
,
addmemoryinfo
,
gasinfo
,
remaininggasinfo
,
loadedaddressinfo
)
{
browser
.
assertStepDetail
=
function
(
vmtracestepinfo
,
stepinfo
,
addmemoryinfo
,
gasinfo
,
remaininggasinfo
,
loadedaddressinfo
)
{
assertPanel
(
'#stepdetail'
,
browser
,
[
'vmtracestep
'
+
vmtracestepinfo
,
'executionstep'
+
stepinfo
,
'addmemory'
+
addmemoryinfo
,
'gas'
+
gasinfo
,
'remaininggas'
+
remaininggasinfo
,
'loadedaddress
'
+
loadedaddressinfo
])
assertPanel
(
'#stepdetail'
,
browser
,
[
'vmtracestep
:'
+
vmtracestepinfo
,
'executionstep:'
+
stepinfo
,
'addmemory:'
+
addmemoryinfo
,
'gas:'
+
gasinfo
,
'remaininggas:'
+
remaininggasinfo
,
'loadedaddress:
'
+
loadedaddressinfo
])
return
browser
return
browser
}
}
...
@@ -141,8 +141,12 @@ function assertPanel (id, browser, value) {
...
@@ -141,8 +141,12 @@ function assertPanel (id, browser, value) {
return
ret
return
ret
},
[
id
,
selector
],
function
(
returnValues
)
{
},
[
id
,
selector
],
function
(
returnValues
)
{
value
.
map
(
function
(
item
,
index
)
{
value
.
map
(
function
(
item
,
index
)
{
if
(
returnValues
.
value
.
length
)
{
var
testValue
=
returnValues
.
value
[
index
].
replace
(
/
\r\n
/g
,
''
).
replace
(
/
\t
/g
,
''
).
replace
(
/
\s
/g
,
''
)
var
testValue
=
returnValues
.
value
[
index
].
replace
(
/
\r\n
/g
,
''
).
replace
(
/
\t
/g
,
''
).
replace
(
/
\s
/g
,
''
)
browser
.
assert
.
equal
(
testValue
,
value
[
index
])
browser
.
assert
.
equal
(
testValue
,
value
[
index
])
}
else
{
browser
.
assert
.
equal
(
item
,
''
)
}
})
})
})
})
return
browser
return
browser
...
...
test-browser/vmdebugger.js
View file @
5601ceda
...
@@ -63,21 +63,20 @@ function panels (browser) {
...
@@ -63,21 +63,20 @@ function panels (browser) {
.
setValue
(
'#txinput'
,
'0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51'
)
.
setValue
(
'#txinput'
,
'0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51'
)
.
click
(
'#load'
)
.
click
(
'#load'
)
.
click
(
'#nextcall'
)
.
click
(
'#nextcall'
)
.
assertStack
([
'0x'
,
'0x60'
,
'0x65'
,
'0x38'
,
'0x55'
,
'0x60fe47b1'
])
.
assertStack
([
'0:0x'
,
'1:0x60'
,
'2:0x65'
,
'3:0x38'
,
'4:0x55'
,
'5:0x60fe47b1'
])
.
pause
(
5000
)
.
assertStorageChanges
([
'0x00:0x38'
])
.
assertStorageChanges
([
'0x000x38'
])
.
assertCallData
([
'0:0x60fe47b10000000000000000000000000000000000000000000000000000000000000038'
])
.
assertCallData
([
'0x60fe47b10000000000000000000000000000000000000000000000000000000000000038'
])
.
assertCallStack
([
'0:0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5'
])
.
assertCallStack
([
'0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5'
])
.
assertStackValue
(
1
,
'1:0x60'
)
.
assertStackValue
(
1
,
'0x60'
)
.
assertMemoryValue
(
6
,
'0x60:60606040526040516020806045833981????R??Q????E?9?'
)
.
assertMemoryValue
(
6
,
'0x6060606040526040516020806045833981????R??Q????E?9?'
)
.
assertMemoryValue
(
7
,
'0x70:01604052808051906020019091905050???R??Q???????PP'
)
.
assertMemoryValue
(
7
,
'0x7001604052808051906020019091905050???R??Q???????PP'
)
.
assertMemoryValue
(
8
,
'0x80:5b806001016000600050819055505b50?????????P??UP?P'
)
.
assertMemoryValue
(
8
,
'0x805b806001016000600050819055505b50?????????P??UP?P'
)
.
click
(
'#intoforward'
)
// CREATE
.
click
(
'#intoforward'
)
// CREATE
.
assertStack
([
'
Empty
'
])
.
assertStack
([
''
])
.
assertStorageChanges
([
'
Empty
'
])
.
assertStorageChanges
([
''
])
.
assertMemory
([
'
Empty
'
])
.
assertMemory
([
''
])
.
assertCallData
([
'0x0000000000000000000000000000000000000000000000000000000000000000000000000000006060606040526040516020806045833981016040528080519060200190919050505b806001016000600050819055'
])
.
assertCallData
([
'0
:0
x0000000000000000000000000000000000000000000000000000000000000000000000000000006060606040526040516020806045833981016040528080519060200190919050505b806001016000600050819055'
])
.
assertCallStack
([
'0
x0d3a18d64dfe4f927832ab58d6451cecc4e517c5'
,
'
(ContractCreation-Step63)'
])
.
assertCallStack
([
'0
:0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5'
,
'1:
(ContractCreation-Step63)'
])
return
browser
return
browser
}
}
...
...
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