Skip to content

Commit

Permalink
test: move some BrowserWindow specs to the main process (#19182)
Browse files Browse the repository at this point in the history
* test: move some BrowserWindow specs to the main process

* uncomment cross-site test

* move more tests

* re-enable, refactor and move visibilitychange specs

* move new-window event tests and re-enable them on mac

* move max/minimize event tests

* move modal tests

* move beginFrameSubscription tests

* move savePage test

* move BrowserWindow options argument is optional test

* move restore, unmaximize, fullscreen tests

* move parent window tests

* don't wait for show event on windows (#8664)

* add debugging logs to fullscreen tests

* more debugging on windows

* explicitly destroy browserviews to prevent crash during gc

* only await show on darwin

* more event timing fixes

* disable max/minimize event tests on linux, since they're broken on CI
  • Loading branch information
nornagon authored and codebytere committed Jul 16, 2019
1 parent 7249b25 commit 27599a8
Show file tree
Hide file tree
Showing 7 changed files with 1,474 additions and 1,677 deletions.
6 changes: 5 additions & 1 deletion docs/api/browser-window.md
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,10 @@ Returns [`Rectangle`](structures/rectangle.md) - Contains the window bounds of t

Disable or enable the window.

#### `win.isEnabled()`

Returns Boolean - whether the window is enabled.

#### `win.setSize(width, height[, animate])`

* `width` Integer
Expand Down Expand Up @@ -1625,7 +1629,7 @@ On macOS it does not remove the focus from the window.

#### `win.setParentWindow(parent)`

* `parent` BrowserWindow
* `parent` BrowserWindow | null

Sets `parent` as current window's parent window, passing `null` will turn
current window into a top-level window.
Expand Down
6 changes: 2 additions & 4 deletions shell/browser/api/atom_api_system_preferences_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,12 @@ AVMediaType ParseMediaType(const std::string& media_type) {

if (user_info) {
copied_callback.Run(
base::SysNSStringToUTF8(notification.name),
*user_info,
base::SysNSStringToUTF8(notification.name), *user_info,
object);
} else {
copied_callback.Run(
base::SysNSStringToUTF8(notification.name),
base::DictionaryValue(),
object);
base::DictionaryValue(), object);
}
}];
return request_id;
Expand Down

0 comments on commit 27599a8

Please sign in to comment.