electron/spec/fixtures/api
Thiago de Arruda 6ff111a141 perf: don't use JSON to send the result of ipcRenderer.sendSync. (#8953)
* Don't use JSON to send the result of `ipcRenderer.sendSync`.

- Change the return type of AtomViewHostMsg_Message_Sync from `base::string16`
  to `base::ListValue`
- Adjust lib/browser/api/web-contents.js and /lib/renderer/api/ipc-renderer.js
  to wrap/unwrap return values to/from array, instead of
  serializing/deserializing JSON.

This change can greatly improve `ipcRenderer.sendSync` calls where the return
value contains Buffer instances, because those are converted to Array before
being serialized to JSON(which has no efficient way of representing byte
arrays).

A simple benchmark where remote.require('fs') was used to read a 16mb file got
at least 5x faster, not to mention it used a lot less memory.  This difference
tends increases with larger buffers.

* Don't base64 encode Buffers

* Don't allocate V8ValueConverter on the heap

* Replace hidden global.sandbox with NodeBindings::IsInitialized()

* Refactoring: check NodeBindings::IsInitialized() in V8ValueConverter

* Refactor problematic test to make it more reliable

* Add tests for NaN and Infinity
2018-06-13 17:38:31 +10:00
..
electron-module-app
exit-closes-all-windows-app Add failing spec for app.exit with >2 windows 2017-04-11 09:09:17 -07:00
locale-check add app.setLocale() (#11469) 2018-02-08 08:26:37 -06:00
mixed-sandbox-app 🎨 2017-07-11 18:36:01 -07:00
quit-app spec: Add test case for app.relaunch 2016-06-03 12:12:20 +09:00
relaunch Remove standard linter warnings 2016-06-29 09:46:16 -07:00
singleton feat: new makeSingleInstance API (#12782) 2018-05-08 01:29:18 +10:00
singleton-old feat: new makeSingleInstance API (#12782) 2018-05-08 01:29:18 +10:00
allocate-memory.html Add test to verify memory is released after sandboxed popup is closed 2017-05-01 11:30:07 -03:00
beforeunload-false-prevent3.html Fix #8911 2017-05-03 12:47:00 -05:00
beforeunload-false.html Only prevent unload the first time it is attempted 2016-08-03 16:23:39 -07:00
blank.html
close-beforeunload-empty-string.html Only prevent unload the first time it is attempted 2016-08-03 16:23:39 -07:00
close-beforeunload-false.html Only prevent unload the first time it is attempted 2016-08-03 16:23:39 -07:00
close-beforeunload-undefined.html
close.html
crash-restart.html remove deprecated method call 2017-12-07 14:26:57 -05:00
crash.html clean fixture and fix failing travis test 2017-11-01 08:57:22 -04:00
did-fail-load-iframe.html
frame-subscriber.html damaged -> dirty rename, fixed misc issues, changed signature, updated docs and added tests 2016-06-25 18:23:40 +02:00
isolated-preload.js add webFrame to sandboxed renderer 2017-08-23 10:52:02 -07:00
isolated.html add webFrame to sandboxed renderer 2017-08-23 10:52:02 -07:00
loaded-from-dataurl.js Issue #8735:Support base URL option to loadURL for data URLs 2017-02-28 16:49:03 -08:00
localstorage.html
native-window-open-blank.html Add spec for native window.open from iframe 2017-05-26 10:10:36 -07:00
native-window-open-child.html Add test for opeing HTML file 2017-04-04 19:05:13 +09:00
native-window-open-cross-origin.html Use an existing host name so that it resolves quickly and tests don't time out. 2017-11-24 10:58:53 +09:00
native-window-open-file.html Fix JS style in test HTMLs 2017-04-30 19:43:21 +09:00
native-window-open-iframe.html Add spec for native window.open from iframe 2017-05-26 10:10:36 -07:00
native-window-open-isolated-preload.js Add test for nativeWindowOpen + contextIsolation 2017-04-30 19:33:40 +09:00
native-window-open-isolated.html Fix JS style in test HTMLs 2017-04-30 19:43:21 +09:00
native-window-open-native-addon.html Surface require errors so spec does not hang 2017-07-13 08:36:58 -07:00
native-window-open-no-allowpopups.html Add failing spec for native window.open returning null without allowpopups 2017-05-26 10:10:36 -07:00
new-window-preload.js Inherit enabled-sandbox in opened windows 2017-07-17 11:55:15 -07:00
new-window.html Add spec for configuring web preferences from sandboxed new-window event 2017-07-17 11:55:15 -07:00
offscreen-rendering.html adds tests for osr 2016-07-31 17:10:53 +02:00
preload.html
preloads.html Add a SessionPreferences to manage session related data 2017-12-05 15:59:15 +09:00
remote-event-handler.html Assert remote event names 2017-01-25 12:36:55 -08:00
render-view-deleted.html Add spec for render-view-deleted issue 2016-12-02 10:42:09 -08:00
sandbox.html perf: don't use JSON to send the result of ipcRenderer.sendSync. (#8953) 2018-06-13 17:38:31 +10:00
send-sync-message.html
unload.html
window-open-location-change.html Add spec for reloading opened window cross-origin 2017-07-17 11:55:15 -07:00
window-open-location-final.html Add spec for reloading opened window cross-origin 2017-07-17 11:55:15 -07:00
window-open-location-open.html Add spec for reloading opened window cross-origin 2017-07-17 11:55:15 -07:00
window-open-preload.js Add spec for reloading opened window cross-origin 2017-07-17 11:55:15 -07:00