diff --git a/src/ui/TxBrowser.js b/src/ui/TxBrowser.js index 9e832a2931..7c80ab6303 100644 --- a/src/ui/TxBrowser.js +++ b/src/ui/TxBrowser.js @@ -36,8 +36,7 @@ TxBrowser.prototype.setDefaultValues = function () { this.blockNumber = '' this.txNumber = '' this.connectInfo = '' - this.basicPanel.data = {} - this.basicPanel.update() + this.basicPanel.update({}) this.basicPanel.hide() this.updateWeb3Url(util.web3.currentProvider.host) if (this.view) { diff --git a/src/ui/VmDebugger.js b/src/ui/VmDebugger.js index 95c32dbfbc..c43abcede8 100644 --- a/src/ui/VmDebugger.js +++ b/src/ui/VmDebugger.js @@ -30,11 +30,10 @@ function VmDebugger (_parent, _traceManager, _codeManager, _solidityProxy, _call var self = this _traceManager.getReturnValue(index, function (error, returnValue) { if (error) { - self.data = [error] + self.update([error]) } else if (_parent.currentStepIndex === index) { - self.data = [returnValue] + self.update([returnValue]) } - self.update() }) }) /* Return values - */ diff --git a/test-browser/init.js b/test-browser/init.js index 59d837f754..456d861420 100644 --- a/test-browser/init.js +++ b/test-browser/init.js @@ -32,7 +32,7 @@ function extendBrowser (browser) { } 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 } @@ -141,8 +141,12 @@ function assertPanel (id, browser, value) { return ret }, [id, selector], function (returnValues) { value.map(function (item, index) { - var testValue = returnValues.value[index].replace(/\r\n/g, '').replace(/\t/g, '').replace(/\s/g, '') - browser.assert.equal(testValue, value[index]) + if (returnValues.value.length) { + var testValue = returnValues.value[index].replace(/\r\n/g, '').replace(/\t/g, '').replace(/\s/g, '') + browser.assert.equal(testValue, value[index]) + } else { + browser.assert.equal(item, '') + } }) }) return browser diff --git a/test-browser/vmdebugger.js b/test-browser/vmdebugger.js index da35da8d89..81eb29477b 100644 --- a/test-browser/vmdebugger.js +++ b/test-browser/vmdebugger.js @@ -63,21 +63,20 @@ function panels (browser) { .setValue('#txinput', '0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51') .click('#load') .click('#nextcall') - .assertStack(['0x', '0x60', '0x65', '0x38', '0x55', '0x60fe47b1']) - .pause(5000) - .assertStorageChanges(['0x000x38']) - .assertCallData(['0x60fe47b10000000000000000000000000000000000000000000000000000000000000038']) - .assertCallStack(['0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5']) - .assertStackValue(1, '0x60') - .assertMemoryValue(6, '0x6060606040526040516020806045833981????R??Q????E?9?') - .assertMemoryValue(7, '0x7001604052808051906020019091905050???R??Q???????PP') - .assertMemoryValue(8, '0x805b806001016000600050819055505b50?????????P??UP?P') + .assertStack(['0:0x', '1:0x60', '2:0x65', '3:0x38', '4:0x55', '5:0x60fe47b1']) + .assertStorageChanges(['0x00:0x38']) + .assertCallData(['0:0x60fe47b10000000000000000000000000000000000000000000000000000000000000038']) + .assertCallStack(['0:0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5']) + .assertStackValue(1, '1:0x60') + .assertMemoryValue(6, '0x60:60606040526040516020806045833981????R??Q????E?9?') + .assertMemoryValue(7, '0x70:01604052808051906020019091905050???R??Q???????PP') + .assertMemoryValue(8, '0x80:5b806001016000600050819055505b50?????????P??UP?P') .click('#intoforward') // CREATE - .assertStack(['Empty']) - .assertStorageChanges(['Empty']) - .assertMemory(['Empty']) - .assertCallData(['0x0000000000000000000000000000000000000000000000000000000000000000000000000000006060606040526040516020806045833981016040528080519060200190919050505b806001016000600050819055']) - .assertCallStack(['0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5', '(ContractCreation-Step63)']) + .assertStack(['']) + .assertStorageChanges(['']) + .assertMemory(['']) + .assertCallData(['0:0x0000000000000000000000000000000000000000000000000000000000000000000000000000006060606040526040516020806045833981016040528080519060200190919050505b806001016000600050819055']) + .assertCallStack(['0:0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5', '1:(ContractCreation-Step63)']) return browser }