* chore: replace standard with eslint-config-standard
This adds support for --cache so linting JS only takes ~1 second and only lints things that changed
It also allows us to add custom linting rules
* chore: add eslint-plugin-mocha and enable the no-exclusive-tests rule
This will block anyone from pushing / merging a `.only` test or describe
* feat: add will-redirect to allow people to prevent 30X redirects
* spec: add tests for the will-redirect event
* refactor: implement will-redirect using NavigationThrottle instead of PostTask
This avoids a potential race condition and immediately cancels the
navigation
* docs: add docs for did-redirect-navigation
* refactor: move AtomNavigationThrottle out of net folder
* refactor: update header guard for atom_navigation_throttle.h
* refactor: fix chromium style errors in the GN build
* refactor: update throttle impl to NOTREACHED and std::make_unqique
* build: remove common/icu/no_inline_default_constructor.patch
It was added in https://github.com/electron/libchromiumcontent/pull/207,
the issue is no longer valid in the GN build.
* build: remove common/icu/build_gn.patch
In GN release build all code including node are linked
statically in a single binary, the workaround is no longer valid.
* build: remove ununsed patches
* build: remove is_electron_gn_build arg
* build: remove component mode crt config patch
* build: remove executable config patch for character_data_generator
* build: remove latency_info.patch
* build: remove exec_script_whitelist patch
* build: update patches/common/v8/build_gn.patch
* build: remove common/chromium/fix-arm64-linking-error.patch
It was added in a1df18ca36
to workaround a linker issue.
* build: remove common/chromium/protobuf_build_gn.patch
It was added to workaround a VS linker bug, it has been fixed
in Update 1
* build: remove common/chromium/disable-recursive-surface-sync.patch
It was added in 6bc6626e2c
to fix dcheck on macOS, it no longer appears to be an issue.
* Add support for multiple mocha reporters
Allows us to output to junit file and to console at the same time
* Cleanup VSTS file
Don't install depot_tools everytime as it is already installed.
Only run tests if "RUN_TESTS" environment variable is set
Only notify slack if "NOTIFY_SLACK" environment variable is set
Don't use sccache for release builds
Move CircleCI mac builds to VSTS
* Only build mac PRS from forks
Don't install depot_tools everytime as it is already installed.
Only run tests if "RUN_TESTS" environment variable is set
Only notify slack if "NOTIFY_SLACK" environment variable is set
Don't use sccache for release builds
Move CircleCI mac builds to VSTS
Use sccache helper script
* rename vsts-gn.yml to vsts.yml
Make sure Electron isn't running before starting tests
In the GN build, libchromiumcontent is no longer a distinct library, but
merely a container for a set of scripts and patches. Maintaining those
patches in a separate repository is tedious and error-prone, so merge
them into the main repo.
Once this is merged and GN is the default way to build Electron, the
libchromiumcontent repository can be archived.
* Removes un-used and non-functional code coverage helpers
* Removes un-used release script aliases
* Moves TLS to a lib folder for cleaner directory structure
* Implements start.py as start.js for the GN build
* Adds a re-usable getElectronExec helper for future scripts
* Refactors spec runner to use the helper
* chore: fix cpplint 'include_what_you_use' warnings
Typically by including <memory>, <utility> etc.
* chore: fix 'static/global string constant' warning
Use C style strings instead of std::string.
Style guide forbids non-trivial static / global variables. https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables
/home/charles/electron/electron-gn/src/electron/script/cpplint.js
* refactor: remove global string variables.
Fix 'global string variables are not permitted' linter warnings
by using the base::NoDestructor<> wrapper to make it explicit that
these variables are never destroyed.
The style guide's take on globals with nontrivial destructors:
https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables
* fix: initializer error introduced in last commit
* fix: remove WIP file that was included by accident
* fix: include order
* fix: include order
* fix: include order
* fix: include order, again
* remove obsolete tests
* remove unused deprecate API
* make a warnOnce helper for the deprecate methods
* misc. copyediting, e.g. variable names, whitespace
* test that any deprecation warns once at most
* use strict
* fix: Invalidate weak ptrs before window Javascript object is destroyed
* chore: add regression test for #14513
This test is similar to the original gist at https://gist.github.com/bpasero/a02a645e11f4946dcca1331d0299149d -- the key is to open multiple windows and add an `app.on('browser-window-focus') listener that accesses window.id.
* fix: last commit didn't test the right thing.
The test needs to run in the main process to reproduce the
conditions reported in #14513
* fix: cpplint didn't work in GN
* feat: make cpplint non-errors less noisy
* refactor: remove unneeded findCppLint helper
We don't need this in the GN world: it's the user's responsibility
to have depot_tools in their path.
* refactor: use const instead of let where possible