chore: fix spelling errors in multiple files (#34574)

* chore: fix spelling in .circleci

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in BUILD.gn

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in appveyor.yml

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in build

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in docs

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in lib

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in script

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in shell

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in spec

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in spec-main

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref 2022-06-16 03:46:11 -04:00 коммит произвёл GitHub
Родитель f418a49857
Коммит ea4278754c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
58 изменённых файлов: 88 добавлений и 88 удалений

Просмотреть файл

@ -639,7 +639,7 @@ step-electron-publish: &step-electron-publish
echo 'Uploading Electron release distribution to Azure'
script/release/uploaders/upload.py --verbose --UPLOAD_TO_STORAGE
else
echo 'Uploading Electron release distribution to Github releases'
echo 'Uploading Electron release distribution to GitHub releases'
script/release/uploaders/upload.py --verbose
fi

Просмотреть файл

@ -132,7 +132,7 @@ config("electron_lib_config") {
include_dirs = [ "." ]
}
# We geneate the definitions twice here, once in //electron/electron.d.ts
# We generate the definitions twice here, once in //electron/electron.d.ts
# and once in $target_gen_dir
# The one in $target_gen_dir is used for the actual TSC build later one
# and the one in //electron/electron.d.ts is used by your IDE (vscode)

Просмотреть файл

@ -3,7 +3,7 @@
# - "GN_EXTRA_ARGS" Additional gn arguments for a build config,
# e.g. 'target_cpu="x86"' to build for a 32bit platform.
# https://gn.googlesource.com/gn/+/master/docs/reference.md#target_cpu
# Don't forget to set up "NPM_CONFIG_ARCH" and "TARGET_ARCH" accordningly
# Don't forget to set up "NPM_CONFIG_ARCH" and "TARGET_ARCH" accordingly
# if you pass a custom value for 'target_cpu'.
# - "ELECTRON_RELEASE" Set it to '1' upload binaries on success.
# - "NPM_CONFIG_ARCH" E.g. 'x86'. Is used to build native Node.js modules.
@ -12,7 +12,7 @@
# Is used in some publishing scripts, but does NOT affect the Electron binary.
# Must match 'target_cpu' passed to "GN_EXTRA_ARGS" and "NPM_CONFIG_ARCH" value.
# - "UPLOAD_TO_STORAGE" Set it to '1' upload a release to the Azure bucket.
# Otherwise the release will be uploaded to the Github Releases.
# Otherwise the release will be uploaded to the GitHub Releases.
# (The value is only checked if "ELECTRON_RELEASE" is defined.)
#
# The publishing scripts expect access tokens to be defined as env vars,
@ -215,7 +215,7 @@ test_script:
}
- cd electron
- if "%RUN_TESTS%"=="true" ( echo Running main test suite & node script/yarn test -- --trace-uncaught --runners=main --enable-logging=file --log-file=%cd%\electron.log )
- if "%RUN_TESTS%"=="true" ( echo Running remote test suite & node script/yarn test -- --trace-uncaught --runners=remote --runTestFilesSeperately --enable-logging=file --log-file=%cd%\electron.log )
- if "%RUN_TESTS%"=="true" ( echo Running remote test suite & node script/yarn test -- --trace-uncaught --runners=remote --runTestFilesSeparately --enable-logging=file --log-file=%cd%\electron.log )
- if "%RUN_TESTS%"=="true" ( echo Running native test suite & node script/yarn test -- --trace-uncaught --runners=native --enable-logging=file --log-file=%cd%\electron.log )
- cd ..
- if "%RUN_TESTS%"=="true" ( echo Verifying non proprietary ffmpeg & python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg )

Просмотреть файл

@ -4,7 +4,7 @@
# Cocoa .app bundle. The presence of these empty directories is sufficient to
# convince Cocoa that the application supports the named localization, even if
# an InfoPlist.strings file is not provided. Chrome uses these empty locale
# directoires for its helper executable bundles, which do not otherwise
# directories for its helper executable bundles, which do not otherwise
# require any direct Cocoa locale support.
import os

Просмотреть файл

@ -1,6 +1,6 @@
template("node_action") {
assert(defined(invoker.script), "Need script path to run")
assert(defined(invoker.args), "Need script argumets")
assert(defined(invoker.args), "Need script arguments")
action(target_name) {
forward_variables_from(invoker,

Просмотреть файл

@ -1,7 +1,7 @@
template("npm_action") {
assert(defined(invoker.script),
"Need script name to run (must be defined in package.json)")
assert(defined(invoker.args), "Need script argumets")
assert(defined(invoker.args), "Need script arguments")
action("npm_pre_flight_" + target_name) {
inputs = [

Просмотреть файл

@ -51,7 +51,7 @@ template("compile_ib_files") {
# Template to compile and package Mac XIB files as bundle data.
# Arguments
# sources:
# list of string, sources to comiple
# list of string, sources to compile
# output_path:
# (optional) string, the path to use for the outputs list in the
# bundle_data step. If unspecified, defaults to bundle_resources_dir.

Просмотреть файл

@ -1381,7 +1381,7 @@ method returns false. If we fail to perform the copy, then this method will
throw an error. The message in the error should be informative and tell
you exactly what went wrong.
By default, if an app of the same name as the one being moved exists in the Applications directory and is _not_ running, the existing app will be trashed and the active app moved into its place. If it _is_ running, the pre-existing running app will assume focus and the previously active app will quit itself. This behavior can be changed by providing the optional conflict handler, where the boolean returned by the handler determines whether or not the move conflict is resolved with default behavior. i.e. returning `false` will ensure no further action is taken, returning `true` will result in the default behavior and the method continuing.
By default, if an app of the same name as the one being moved exists in the Applications directory and is _not_ running, the existing app will be trashed and the active app moved into its place. If it _is_ running, the preexisting running app will assume focus and the previously active app will quit itself. This behavior can be changed by providing the optional conflict handler, where the boolean returned by the handler determines whether or not the move conflict is resolved with default behavior. i.e. returning `false` will ensure no further action is taken, returning `true` will result in the default behavior and the method continuing.
For example:

Просмотреть файл

@ -713,7 +713,7 @@ To clear the handler, call `setDevicePermissionHandler(null)`.
This handler can be used to provide default permissioning to devices without first calling for permission
to devices (eg via `navigator.hid.requestDevice`). If this handler is not defined, the default device
permissions as granted through device selection (eg via `navigator.hid.requestDevice`) will be used.
Additionally, the default behavior of Electron is to store granted device permision through the lifetime
Additionally, the default behavior of Electron is to store granted device permission through the lifetime
of the corresponding WebContents. If longer term storage is needed, a developer can store granted device
permissions (eg when handling the `select-hid-device` event) and then read from that storage with `setDevicePermissionHandler`.

Просмотреть файл

@ -64,7 +64,7 @@ If you want to add a new API module to Electron, you'll want to look in [creatin
Electron has a fully-fledged governance system that oversees activity in Electron and whose working groups are responsible for areas like APIs, releases, and upgrades to Electron's dependencies including Chromium and Node.js. Depending on how frequently and to what end you want to contribute, you may want to consider joining a working group.
Details about each group and their reponsibilities can be found in the [governance repo](https://github.com/electron/governance).
Details about each group and their responsibilities can be found in the [governance repo](https://github.com/electron/governance).
## Patches in Electron

Просмотреть файл

@ -9,7 +9,7 @@ Some of the more common approaches are outlined below.
Chromium contains logging macros which can aid debugging by printing information to console in C++ and Objective-C++.
You might use this to print out variable values, function names, and line numbers, amonst other things.
You might use this to print out variable values, function names, and line numbers, amongst other things.
Some examples:
@ -25,7 +25,7 @@ See [logging.h](https://chromium.googlesource.com/chromium/src/base/+/refs/heads
## Printing Stacktraces
Chromium contains a helper to print stack traces to console without interrrupting the program.
Chromium contains a helper to print stack traces to console without interrupting the program.
```cpp
#include "base/debug/stack_trace.h"

Просмотреть файл

@ -43,7 +43,7 @@ the WebHID API:
* [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler)
can be used to provide default permissioning to devices without first calling
for permission to devices via `navigator.hid.requestDevice`. Additionally,
the default behavior of Electron is to store granted device permision through
the default behavior of Electron is to store granted device permission through
the lifetime of the corresponding WebContents. If longer term storage is
needed, a developer can store granted device permissions (eg when handling
the `select-hid-device` event) and then read from that storage with
@ -92,7 +92,7 @@ There are several additional APIs for working with the Web Serial API:
* [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler)
can be used to provide default permissioning to devices without first calling
for permission to devices via `navigator.serial.requestPort`. Additionally,
the default behavior of Electron is to store granted device permision through
the default behavior of Electron is to store granted device permission through
the lifetime of the corresponding WebContents. If longer term storage is
needed, a developer can store granted device permissions (eg when handling
the `select-serial-port` event) and then read from that storage with

Просмотреть файл

@ -18,7 +18,7 @@ npm install --save-dev electron@latest
There are several major changes from our 1.x strategy outlined below. Each change is intended to satisfy the needs and priorities of developers/maintainers and app developers.
1. Strict use of the the [SemVer](#semver) spec
1. Strict use of the [SemVer](#semver) spec
2. Introduction of semver-compliant `-beta` tags
3. Introduction of [conventional commit messages](https://conventionalcommits.org/)
4. Well-defined stabilization branches

Просмотреть файл

@ -10,7 +10,7 @@ import * as ipcMainUtils from '@electron/internal/browser/ipc-main-internal-util
import { MessagePortMain } from '@electron/internal/browser/message-port-main';
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
// session is not used here, the purpose is to make sure session is initalized
// session is not used here, the purpose is to make sure session is initialized
// before the webContents module.
// eslint-disable-next-line
session

Просмотреть файл

@ -172,7 +172,7 @@ const LINTERS = [{
run: (opts, filenames) => {
const patchesDir = path.resolve(__dirname, '../patches');
const patchesConfig = path.resolve(patchesDir, 'config.json');
// If the config does not exist, that's a proiblem
// If the config does not exist, that's a problem
if (!fs.existsSync(patchesConfig)) {
process.exit(1);
}

Просмотреть файл

@ -115,7 +115,7 @@ async function getCircleCIWorkflowId (pipelineId) {
workflowId = workflows.items.find(item => item.name.includes('publish')).id;
break;
}
console.log('Unxpected number of workflows, response was:', workflows);
console.log('Unexpected number of workflows, response was:', workflows);
workflowId = -1;
break;
}
@ -139,7 +139,7 @@ async function getCircleCIJobNumber (workflowId) {
continue;
}
if (jobInfo.items.length !== 1) {
console.log('Unxpected number of jobs, response was:', jobInfo);
console.log('Unexpected number of jobs, response was:', jobInfo);
jobNumber = -1;
break;
}

Просмотреть файл

@ -133,7 +133,7 @@ const getPreviousPoint = async (point) => {
console.log('error', error);
}
// Otherwise, use the newest stable release that preceeds this branch.
// Otherwise, use the newest stable release that precedes this branch.
// To reach that you may have to walk past >1 branch, e.g. to get past
// 2-1-x which never had a stable release.
let branch = currentBranch;

Просмотреть файл

@ -410,7 +410,7 @@ const getNotes = async (fromRef, toRef, newVersion) => {
// remove any old commits
pool.commits = pool.commits.filter(commit => !pool.processedHashes.has(commit.hash));
// if a commmit _and_ revert occurred in the unprocessed set, skip them both
// if a commit _and_ revert occurred in the unprocessed set, skip them both
for (const commit of pool.commits) {
const revertHash = commit.revertHash;
if (!revertHash) {

Просмотреть файл

@ -92,9 +92,9 @@ def main():
shutil.copy2(os.path.join(OUT_DIR, 'dsym.zip'), dsym_zip)
upload_electron(release, dsym_zip, args)
dsym_snaphot_zip = os.path.join(OUT_DIR, DSYM_SNAPSHOT_NAME)
shutil.copy2(os.path.join(OUT_DIR, 'dsym-snapshot.zip'), dsym_snaphot_zip)
upload_electron(release, dsym_snaphot_zip, args)
dsym_snapshot_zip = os.path.join(OUT_DIR, DSYM_SNAPSHOT_NAME)
shutil.copy2(os.path.join(OUT_DIR, 'dsym-snapshot.zip'), dsym_snapshot_zip)
upload_electron(release, dsym_snapshot_zip, args)
elif PLATFORM == 'win32':
if get_target_arch() != 'ia32':
pdb_zip = os.path.join(OUT_DIR, PDB_NAME)
@ -359,7 +359,7 @@ def upload_electron(release, file_path, args):
def upload_io_to_github(release, filename, filepath, version):
print('Uploading %s to Github' % \
print('Uploading %s to GitHub' % \
(filename))
script_path = os.path.join(
ELECTRON_DIR, 'script', 'release', 'uploaders', 'upload-to-github.ts')

Просмотреть файл

@ -272,7 +272,7 @@ function parseCommandLine () {
if (opts.help) showUsage();
if (!opts['out-dir']) {
console.log('--out-dir is a required argunment');
console.log('--out-dir is a required argument');
process.exit(0);
}

Просмотреть файл

@ -13,7 +13,7 @@ const fail = '✗'.red;
const args = require('minimist')(process.argv, {
string: ['runners', 'target'],
boolean: ['buildNativeTests', 'runTestFilesSeperately'],
boolean: ['buildNativeTests', 'runTestFilesSeparately'],
unknown: arg => unknownFlags.push(arg)
});
@ -155,7 +155,7 @@ const specFilter = (file) => {
};
async function runTests (specDir, testName) {
if (args.runTestFilesSeperately) {
if (args.runTestFilesSeparately) {
const getFiles = require('../spec/static/get-files');
const testFiles = await getFiles(path.resolve(__dirname, `../${specDir}`), { filter: specFilter });
const baseElectronDir = path.resolve(__dirname, '..');

Просмотреть файл

@ -160,7 +160,7 @@ class SystemPreferences
std::string current_color_;
bool invertered_color_scheme_ = false;
bool inverted_color_scheme_ = false;
bool high_contrast_color_scheme_ = false;

Просмотреть файл

@ -185,7 +185,7 @@ std::string SystemPreferences::GetMediaAccessStatus(
}
void SystemPreferences::InitializeWindow() {
invertered_color_scheme_ = IsInvertedColorScheme();
inverted_color_scheme_ = IsInvertedColorScheme();
high_contrast_color_scheme_ = IsHighContrastColorScheme();
// Wait until app is ready before creating sys color listener
@ -243,10 +243,10 @@ LRESULT CALLBACK SystemPreferences::WndProc(HWND hwnd,
}
void SystemPreferences::OnSysColorChange() {
bool new_invertered_color_scheme = IsInvertedColorScheme();
if (new_invertered_color_scheme != invertered_color_scheme_) {
invertered_color_scheme_ = new_invertered_color_scheme;
Emit("inverted-color-scheme-changed", new_invertered_color_scheme);
bool new_inverted_color_scheme = IsInvertedColorScheme();
if (new_inverted_color_scheme != inverted_color_scheme_) {
inverted_color_scheme_ = new_inverted_color_scheme;
Emit("inverted-color-scheme-changed", new_inverted_color_scheme);
}
bool new_high_contrast_color_scheme = IsHighContrastColorScheme();

Просмотреть файл

@ -991,7 +991,7 @@ void WebContents::DeleteThisIfAlive() {
}
void WebContents::Destroy() {
// The content::WebContents should be destroyed asyncronously when possible
// The content::WebContents should be destroyed asynchronously when possible
// as user may choose to destroy WebContents during an event of it.
if (Browser::Get()->is_shutting_down() || IsGuest()) {
DeleteThisIfAlive();

Просмотреть файл

@ -64,7 +64,7 @@ bool WebContents::PlatformHandleKeyboardEvent(
[event.os_event.window redispatchKeyEvent:event.os_event];
// FIXME(nornagon): this isn't the right return value; we should implement
// devtools windows as Widgets in order to take advantage of the
// pre-existing redispatch code in bridged_native_widget.
// preexisting redispatch code in bridged_native_widget.
return false;
} else if (event.os_event.window &&
[event.os_event.window

Просмотреть файл

@ -43,7 +43,7 @@ class Event : public gin::Wrappable<Event> {
const char* GetTypeName() override;
private:
// Replyer for the synchronous messages.
// Replier for the synchronous messages.
InvokeCallback callback_;
};

Просмотреть файл

@ -49,7 +49,7 @@ class BrowserObserver : public base::CheckedObserver {
virtual void OnWillFinishLaunching() {}
virtual void OnFinishLaunching(const base::DictionaryValue& launch_info) {}
// The browser's accessibility suppport has changed.
// The browser's accessibility support has changed.
virtual void OnAccessibilitySupportChanged() {}
// The app message loop is ready

Просмотреть файл

@ -131,7 +131,7 @@ void BluetoothChooser::AddOrUpdateDevice(const std::string& device_id,
"select-bluetooth-device", GetDeviceList(),
base::BindOnce(&OnDeviceChosen, event_handler_));
// If emit not implimented select first device that matches the filters
// If emit not implemented select first device that matches the filters
// provided.
if (!prevent_default) {
event_handler_.Run(content::BluetoothChooserEvent::SELECTED, device_id);

Просмотреть файл

@ -1517,7 +1517,7 @@ void NativeWindowViews::OnWidgetActivationChanged(views::Widget* changed_widget,
NativeWindow::NotifyWindowBlur();
}
// Hide menu bar when window is blured.
// Hide menu bar when window is blurred.
if (!active && IsMenuBarAutoHide() && IsMenuBarVisible())
SetMenuBarVisibility(false);

Просмотреть файл

@ -62,7 +62,7 @@ void CalculatePopupXAndWidthHorizontallyCentered(
// Calculate how much the pop-up needs to grow into the non-preferred
// direction.
int amount_to_grow_in_unpreffered_direction =
int amount_to_grow_in_unpreferred_direction =
std::max(0, popup_width - space_to_grow_in_preferred_direction);
bubble_bounds->set_width(popup_width);
@ -70,10 +70,10 @@ void CalculatePopupXAndWidthHorizontallyCentered(
// Note, in RTL the |pop_up_width| must be subtracted to achieve
// right-alignment of the pop-up with the element.
bubble_bounds->set_x(preferred_starting_point - popup_width +
amount_to_grow_in_unpreffered_direction);
amount_to_grow_in_unpreferred_direction);
} else {
bubble_bounds->set_x(preferred_starting_point -
amount_to_grow_in_unpreffered_direction);
amount_to_grow_in_unpreferred_direction);
}
}

Просмотреть файл

@ -17,7 +17,7 @@
}
@dynamic styleMask;
// The Nonactivating mask is reserverd for NSPanel,
// The Nonactivating mask is reserved for NSPanel,
// but we can use this workaround to add it at runtime
- (NSWindowStyleMask)styleMask {
return originalStyleMask | NSWindowStyleMaskNonactivatingPanel;

Просмотреть файл

@ -85,7 +85,7 @@ class InspectableWebContents
void UpdateDevToolsZoomLevel(double level);
private:
// DevToolsEmbedderMessageDispacher::Delegate
// DevToolsEmbedderMessageDispatcher::Delegate
void ActivateWindow() override;
void CloseWindow() override;
void LoadCompleted() override;

Просмотреть файл

@ -47,10 +47,10 @@ class ClientFrameViewLinux : public FramelessView,
// views::WindowButtonOrderObserver:
void OnWindowButtonOrderingChange() override;
// Overriden from FramelessView:
// Overridden from FramelessView:
int ResizingBorderHitTest(const gfx::Point& point) override;
// Overriden from views::NonClientFrameView:
// Overridden from views::NonClientFrameView:
gfx::Rect GetBoundsForClientView() const override;
gfx::Rect GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) const override;

Просмотреть файл

@ -51,7 +51,7 @@ bool MonitorHasAutohideTaskbarForEdge(UINT edge, HMONITOR monitor) {
// There is a potential race condition here:
// 1. A maximized chrome window is fullscreened.
// 2. It is switched back to maximized.
// 3. In the process the window gets a WM_NCCACLSIZE message which calls us to
// 3. In the process the window gets a WM_NCCALCSIZE message which calls us to
// get the autohide state.
// 4. The worker thread is invoked. It calls the API to get the autohide
// state. On Windows versions earlier than Windows 7, taskbars could

Просмотреть файл

@ -76,7 +76,7 @@ bool ElectronDesktopWindowTreeHostWin::GetDwmFrameInsetsInPixels(
bool ElectronDesktopWindowTreeHostWin::GetClientAreaInsets(
gfx::Insets* insets,
HMONITOR monitor) const {
// Windows by deafult extends the maximized window slightly larger than
// Windows by default extends the maximized window slightly larger than
// current workspace, for frameless window since the standard frame has been
// removed, the client area would then be drew outside current workspace.
//

Просмотреть файл

@ -388,7 +388,7 @@ void WebContentsPreferences::AppendCommandLineSwitches(
// We are appending args to a webContents so let's save the current state
// of our preferences object so that during the lifetime of the WebContents
// we can fetch the options used to initally configure the WebContents
// we can fetch the options used to initially configure the WebContents
// last_preference_ = preference_.Clone();
SaveLastPreferences();
}

Просмотреть файл

@ -44,7 +44,7 @@ class WebContentsPreferences
void SetFromDictionary(const gin_helper::Dictionary& new_web_preferences);
// Append command paramters according to preferences.
// Append command parameters according to preferences.
void AppendCommandLineSwitches(base::CommandLine* command_line,
bool is_subframe);

Просмотреть файл

@ -19,7 +19,7 @@ namespace cryptotokenPrivate {
DOMString appId;
// The origin of the caller.
DOMString origin;
// Identifies the tab in which the registration is occuring so that any
// Identifies the tab in which the registration is occurring so that any
// permissions prompt is correctly located.
long tabId;
};

Просмотреть файл

@ -93,7 +93,7 @@
{
"type": "object",
"name": "result",
"description": "LanguageDetectionResult object that holds detected langugae reliability and array of DetectedLanguage",
"description": "LanguageDetectionResult object that holds detected language reliability and array of DetectedLanguage",
"properties": {
"isReliable": { "type": "boolean", "description": "CLD detected language reliability" },
"languages":

Просмотреть файл

@ -40,7 +40,7 @@ class EventEmitter : public gin_helper::Wrappable<T> {
using Base = gin_helper::Wrappable<T>;
using ValueArray = std::vector<v8::Local<v8::Value>>;
// Make the convinient methods visible:
// Make the convenient methods visible:
// https://isocpp.org/wiki/faq/templates#nondependent-name-lookup-members
v8::Isolate* isolate() const { return Base::isolate(); }
v8::Local<v8::Object> GetWrapper() const { return Base::GetWrapper(); }

Просмотреть файл

@ -313,7 +313,7 @@ struct CallbackTraits<base::RepeatingCallback<T>> {
// Specialization for member function pointers. We need to handle this case
// specially because the first parameter for callbacks to MFP should typically
// come from the the JavaScript "this" object the function was called on, not
// come from the JavaScript "this" object the function was called on, not
// from the first normal parameter.
template <typename T>
struct CallbackTraits<

Просмотреть файл

@ -50,7 +50,7 @@ class KeyWeakMap {
return v8::Local<v8::Object>::New(isolate, iter->second.second);
}
// Whethere there is an object with |key| in this WeakMap.
// Whether there is an object with |key| in this WeakMap.
bool Has(const K& key) const { return map_.find(key) != map_.end(); }
// Returns all objects.

Просмотреть файл

@ -84,7 +84,7 @@ void ElectronRenderFrameObserver::DidInstallConditionalFeatures(
// When a child window is created with window.open, its WebPreferences will
// be copied from its parent, and Chromium will initialize JS context in it
// immediately.
// Normally the WebPreferences is overriden in browser before navigation,
// Normally the WebPreferences is overridden in browser before navigation,
// but this behavior bypasses the browser side navigation and the child
// window will get wrong WebPreferences in the initialization.
// This will end up initializing Node.js in the child window with wrong

Просмотреть файл

@ -127,7 +127,7 @@ describe('app module', () => {
});
describe('app.isPackaged', () => {
it('should be false durings tests', () => {
it('should be false during tests', () => {
expect(app.isPackaged).to.equal(false);
});
});
@ -496,7 +496,7 @@ describe('app module', () => {
expect(window.id).to.equal(w.id);
});
it('should emit browser-window-blur event when window is blured', async () => {
it('should emit browser-window-blur event when window is blurred', async () => {
const emitted = emittedOnce(app, 'browser-window-blur');
w = new BrowserWindow({ show: false });
w.emit('blur');
@ -987,7 +987,7 @@ describe('app module', () => {
it('gets the folder for recent files', () => {
const recent = app.getPath('recent');
// We expect that one of our test machines have overriden this
// We expect that one of our test machines have overridden this
// to be something crazy, it'll always include the word "Recent"
// unless people have been registry-hacking like crazy
expect(recent).to.include('Recent');

Просмотреть файл

@ -2679,7 +2679,7 @@ describe('BrowserWindow module', () => {
for (const isolatedGlobal of isolated.globals) {
notIsolatedGlobals.delete(isolatedGlobal);
}
expect([...notIsolatedGlobals]).to.deep.equal([], 'non-isoalted renderer should have no additional globals');
expect([...notIsolatedGlobals]).to.deep.equal([], 'non-isolated renderer should have no additional globals');
});
it('loads the script before other scripts in window', async () => {

Просмотреть файл

@ -134,7 +134,7 @@ describe('netLog module', () => {
expect(fs.existsSync(dumpFile)).to.be.true('dump file exists');
});
ifit(process.platform !== 'linux')('should begin and end logging automtically when --log-net-log is passed, and behave correctly when .startLogging() and .stopLogging() is called', async () => {
ifit(process.platform !== 'linux')('should begin and end logging automatically when --log-net-log is passed, and behave correctly when .startLogging() and .stopLogging() is called', async () => {
const appProcess = ChildProcess.spawn(process.execPath,
[appPath], {
env: {

Просмотреть файл

@ -1013,7 +1013,7 @@ describe('session module', () => {
const w = new BrowserWindow({
show: false,
webPreferences: {
partition: 'very-temp-permision-handler',
partition: 'very-temp-permission-handler',
nodeIntegration: true,
contextIsolation: false
}

Просмотреть файл

@ -247,7 +247,7 @@ describe('webContents module', () => {
const result = await w.webContents.executeJavaScript(code);
expect(result).to.equal(expected);
});
it('resolves the returned promise with the result if the code returns an asyncronous promise', async () => {
it('resolves the returned promise with the result if the code returns an asynchronous promise', async () => {
const result = await w.webContents.executeJavaScript(asyncCode);
expect(result).to.equal(expected);
});
@ -883,7 +883,7 @@ describe('webContents module', () => {
describe('getOSProcessId()', () => {
afterEach(closeAllWindows);
it('returns a valid procress id', async () => {
it('returns a valid process id', async () => {
const w = new BrowserWindow({ show: false });
expect(w.webContents.getOSProcessId()).to.equal(0);

Просмотреть файл

@ -2150,7 +2150,7 @@ describe('navigator.hid', () => {
await requestDevices();
if (haveDevices) {
// We have devices to exclude, so check if exculsionFilters work
// We have devices to exclude, so check if exclusionFilters work
checkForExcludedDevice = true;
await w.webContents.executeJavaScript(`
navigator.hid.requestDevice({filters: [], exclusionFilters: ${JSON.stringify(exclusionFilters)}}).then(device => device.toString()).catch(err => err.toString());

Просмотреть файл

@ -52,7 +52,7 @@ class GitFake {
const b: string = args[2]!;
stdout = this.mergeBase(a, b);
} else if (args.length === 3 && args[0] === 'log' && args[1] === '--format=%H') {
// exepcted form: `git log --format=%H branchName
// expected form: `git log --format=%H branchName
const branch: string = args[2]!;
stdout = this.branches[branch].map((commit: Commit) => commit.sha1).join('\n');
} else if (args.length > 1 && args[0] === 'log' && args.includes('--format=%H,%s')) {
@ -107,10 +107,10 @@ describe('release notes', () => {
const oldTropFix = new Commit('8751f485c5a6c8c78990bfd55a4350700f81f8cd', 'fix: workaround for hang when preventDefault-ing nativeWindowOpen (#22749)');
// a PR that has unusual note formatting
const sublist = new Commit('61dc1c88fd34a3e8fff80c80ed79d0455970e610', 'fix: client area inset calculation when maximized for framless windows (#25052) (#25216)');
const sublist = new Commit('61dc1c88fd34a3e8fff80c80ed79d0455970e610', 'fix: client area inset calculation when maximized for frameless windows (#25052) (#25216)');
before(() => {
// location of relase-notes' octokit reply cache
// location of release-notes' octokit reply cache
const fixtureDir = path.resolve(__dirname, 'fixtures', 'release-notes');
process.env.NOTES_CACHE_PATH = path.resolve(fixtureDir, 'cache');
});

Просмотреть файл

@ -60,7 +60,7 @@ class GitFake {
describe('version-bumper', () => {
describe('makeVersion', () => {
it('makes a version with a period delimeter', () => {
it('makes a version with a period delimiter', () => {
const components = {
major: 2,
minor: 0,
@ -71,7 +71,7 @@ describe('version-bumper', () => {
expect(version).to.equal('2.0.0');
});
it('makes a version with a period delimeter and a partial pre', () => {
it('makes a version with a period delimiter and a partial pre', () => {
const components = {
major: 2,
minor: 0,
@ -83,7 +83,7 @@ describe('version-bumper', () => {
expect(version).to.equal('2.0.0.12345678');
});
it('makes a version with a period delimeter and a full pre', () => {
it('makes a version with a period delimiter and a full pre', () => {
const components = {
major: 2,
minor: 0,

Просмотреть файл

@ -1677,7 +1677,7 @@ describe('asar package', function () {
describe('graceful-fs module', function () {
const gfs = require('graceful-fs');
it('recognize asar archvies', function () {
it('recognize asar archives', function () {
const p = path.join(asarDir, 'a.asar', 'link1');
expect(gfs.readFileSync(p).toString().trim()).to.equal('file1');
});

Просмотреть файл

@ -358,7 +358,7 @@ describe('chromium feature', () => {
});
});
it('requesting persitent quota works', async () => {
it('requesting persistent quota works', async () => {
const grantedBytes = await new Promise(resolve => {
navigator.webkitPersistentStorage.requestQuota(1024 * 1024, resolve);
});
@ -459,7 +459,7 @@ describe('chromium feature', () => {
describe('window.history', () => {
describe('window.history.go(offset)', () => {
it('throws an exception when the argumnet cannot be converted to a string', () => {
it('throws an exception when the argument cannot be converted to a string', () => {
expect(() => {
window.history.go({ toString: null });
}).to.throw('Cannot convert object to primitive value');
@ -482,7 +482,7 @@ describe('chromium feature', () => {
const sentence = `long sentence which will take at least a few seconds to
utter so that it's possible to pause and resume before the end`;
const utter = new SpeechSynthesisUtterance(sentence);
// Create a dummy utterence so that speech synthesis state
// Create a dummy utterance so that speech synthesis state
// is initialized for later calls.
speechSynthesis.speak(new SpeechSynthesisUtterance());
speechSynthesis.cancel();

Просмотреть файл

@ -45,7 +45,7 @@ describe('node feature', () => {
expect(msg).to.equal('message');
});
it('works in forked process when options.env is specifed', async () => {
it('works in forked process when options.env is specified', async () => {
const child = ChildProcess.fork(path.join(fixtures, 'module', 'fork_ping.js'), [], {
path: process.env.PATH
});

Просмотреть файл

@ -24,7 +24,7 @@
// DO NOT MOVE, REMOVE OR EDIT THIS LINE
require('chai').use(require('chai-as-promised'))
// Rediret all output to browser.
// Redirect all output to browser.
const fakeConsole = {}
for (const k in console) {
if (console.hasOwnProperty(k) && k !== 'assert') {

Просмотреть файл

@ -136,7 +136,7 @@ app.whenReady().then(async function () {
const chosen = dialog.showMessageBox(window, {
type: 'warning',
buttons: ['Close', 'Keep Waiting'],
message: 'Window is not responsing',
message: 'Window is not responding',
detail: 'The window is not responding. Would you like to force close it or just keep waiting?'
});
if (chosen === 0) window.destroy();

Просмотреть файл

@ -60,9 +60,9 @@ app.whenReady().then(() => {
// and load the index.html of the app.
mainWindow.loadURL(`file://${__dirname}/index.html`)
mainWindow.loadURL('file://foo/bar', { userAgent: 'cool-agent', httpReferrer: 'greateRefferer' })
mainWindow.webContents.loadURL('file://foo/bar', { userAgent: 'cool-agent', httpReferrer: 'greateRefferer' })
mainWindow.webContents.loadURL('file://foo/bar', { userAgent: 'cool-agent', httpReferrer: 'greateRefferer', postData: [{ type: 'rawData', bytes: Buffer.from([123]) }] })
mainWindow.loadURL('file://foo/bar', { userAgent: 'cool-agent', httpReferrer: 'greatReferrer' })
mainWindow.webContents.loadURL('file://foo/bar', { userAgent: 'cool-agent', httpReferrer: 'greatReferrer' })
mainWindow.webContents.loadURL('file://foo/bar', { userAgent: 'cool-agent', httpReferrer: 'greatReferrer', postData: [{ type: 'rawData', bytes: Buffer.from([123]) }] })
mainWindow.webContents.openDevTools()
mainWindow.webContents.toggleDevTools()
@ -513,7 +513,7 @@ dialog.showOpenDialog(win3, {
const ret = globalShortcut.register('ctrl+x', () => {
console.log('ctrl+x is pressed')
})
if (!ret) { console.log('registerion fails') }
if (!ret) { console.log('registration fails') }
// Check whether a shortcut is registered.
console.log(globalShortcut.isRegistered('ctrl+x'))
@ -940,7 +940,7 @@ app.whenReady().then(() => {
appIcon.displayBalloon({
title: 'Hello World!',
content: 'This the the balloon content.',
content: 'This is the balloon content.',
iconType: 'error',
icon: 'path/to/icon',
respectQuietTime: true,

Просмотреть файл

@ -233,7 +233,7 @@ describe('<webview> tag', function () {
const types = JSON.parse(message);
expect(types).to.include({
require: 'function', // arguments passed to it should be availale
require: 'function', // arguments passed to it should be available
electron: 'undefined', // objects from the scope it is called from should not be available
window: 'object', // the window object should be available
localVar: 'undefined' // but local variables should not be exposed to the window
@ -634,7 +634,7 @@ describe('<webview> tag', function () {
});
describe('will-navigate event', () => {
it('emits when a url that leads to oustide of the page is clicked', async () => {
it('emits when a url that leads to outside of the page is clicked', async () => {
loadWebView(webview, {
src: `file://${fixtures}/pages/webview-will-navigate.html`
});