window.location.pathname.substr 1
else
window.location.pathname
- global.__filename = decodeURIComponent pathname
+ global.__filename = path.normalize decodeURIComponent(pathname)
global.__dirname = path.dirname global.__filename
# Set module's filename so relative require can work as expected.
assert.equal a.id, 1127
it 'should search module from the user app', ->
- assert.equal remote.process.mainModule.filename, path.resolve(__dirname, 'static', 'main.js')
- assert.equal remote.process.mainModule.paths[0], path.resolve(__dirname, 'static', 'node_modules')
+ assert.equal path.normalize(remote.process.mainModule.filename), path.resolve(__dirname, 'static', 'main.js')
+ assert.equal path.normalize(remote.process.mainModule.paths[0]), path.resolve(__dirname, 'static', 'node_modules')
describe 'remote.createFunctionWithReturnValue', ->
it 'should be called in browser synchronously', ->