Compare commits

...

4 Commits

Author SHA1 Message Date
Electron Bot
8a2ba597bb Bump v8.0.0-nightly.20191003 2019-10-03 08:32:50 -07:00
Shelley Vohr
e543fe702c fix: recentDocuments menu role on macOS (#20398) 2019-10-03 14:25:14 +09:00
Jeremy Apthorp
2470ef2e91 ci: enable crashReporter tests on mac (#19582) 2019-10-02 17:53:51 -07:00
Jeremy Apthorp
fe956f87ec ci: save pdb files for testing builds (#20407) 2019-10-02 14:52:55 -07:00
8 changed files with 64 additions and 101 deletions

View File

@@ -149,9 +149,6 @@ env-mac-large: &env-mac-large
env-mac-large-release: &env-mac-large-release
NUMBER_OF_NINJA_PROCESSES: 8
env-disable-crash-reporter-tests: &env-disable-crash-reporter-tests
DISABLE_CRASH_REPORTER_TESTS: true
env-ninja-status: &env-ninja-status
NINJA_STATUS: "[%r processes, %f/%t @ %o/s : %es] "
@@ -1690,7 +1687,6 @@ jobs:
environment:
<<: *env-mac-large
<<: *env-stack-dumping
<<: *env-disable-crash-reporter-tests
<<: *steps-tests
osx-release-tests:
@@ -1699,7 +1695,6 @@ jobs:
<<: *env-mac-large
<<: *env-stack-dumping
<<: *env-send-slack-notifications
<<: *env-disable-crash-reporter-tests
<<: *steps-tests
osx-verify-ffmpeg:

View File

@@ -1 +1 @@
8.0.0-nightly.20191002
8.0.0-nightly.20191003

View File

@@ -103,6 +103,11 @@ build_script:
if ($env:GN_CONFIG -eq 'release') {
python electron\script\zip-symbols.py
appveyor PushArtifact out/Default/symbols.zip
} else {
# It's useful to have pdb files when debugging testing builds that are
# built on CI.
7z a pdb.zip out\Default\*.pdb
appveyor PushArtifact pdb.zip
}
- python electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.win.%TARGET_ARCH%.manifest
test_script:

View File

@@ -1,6 +1,6 @@
{
"name": "electron",
"version": "8.0.0-nightly.20191002",
"version": "8.0.0-nightly.20191003",
"repository": "https://github.com/electron/electron",
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
"devDependencies": {

View File

@@ -50,8 +50,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 8,0,0,20191002
PRODUCTVERSION 8,0,0,20191002
FILEVERSION 8,0,0,20191003
PRODUCTVERSION 8,0,0,20191003
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L

View File

@@ -126,11 +126,13 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
if (!menu_)
return;
// Locate & retain the recent documents menu item
if (!recentDocumentsMenuItem_) {
// Locate & retain the recent documents menu item
recentDocumentsMenuItem_.reset(
[[[[[NSApp mainMenu] itemWithTitle:@"Electron"] submenu]
itemWithTitle:@"Open Recent"] retain]);
base::string16 title = base::ASCIIToUTF16("Open Recent");
NSString* openTitle = l10n_util::FixUpWindowsStyleLabel(title);
recentDocumentsMenuItem_.reset([[[[[NSApp mainMenu]
itemWithTitle:@"Electron"] submenu] itemWithTitle:openTitle] retain]);
}
model_ = model;
@@ -193,8 +195,17 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
// Replaces the item's submenu instance with the singleton recent documents
// menu. Previously replaced menu items will be recovered.
- (void)replaceSubmenuShowingRecentDocuments:(NSMenuItem*)item {
NSMenu* recentDocumentsMenu =
[[[recentDocumentsMenuItem_ submenu] retain] autorelease];
NSMenu* recentDocumentsMenu = [recentDocumentsMenuItem_ submenu];
if (!recentDocumentsMenu) {
base::string16 title = base::ASCIIToUTF16("Clear Menu");
NSString* clearTitle = l10n_util::FixUpWindowsStyleLabel(title);
recentDocumentsMenu = [[[NSMenu alloc] initWithTitle:@""] autorelease];
[recentDocumentsMenu
addItem:[[[NSMenuItem alloc]
initWithTitle:clearTitle
action:@selector(clearRecentDocuments:)
keyEquivalent:@""] autorelease]];
}
// Remove menu items in recent documents back to swap menu
[self moveMenuItems:recentDocumentsMenu to:recentDocumentsMenuSwap_];
@@ -211,6 +222,9 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
// Replace submenu
[item setSubmenu:recentDocumentsMenu];
DCHECK_EQ([item action], @selector(submenuAction:));
DCHECK_EQ([item target], recentDocumentsMenu);
// Remember the new menu item that carries the recent documents menu
recentDocumentsMenuItem_.reset([item retain]);
}

View File

@@ -8,6 +8,7 @@ const path = require('path')
const temp = require('temp').track()
const url = require('url')
const { closeWindow } = require('./window-helpers')
const { ifit, ifdescribe } = require('./spec-helpers')
const { remote } = require('electron')
const { app, BrowserWindow, crashReporter } = remote
@@ -15,15 +16,11 @@ const { app, BrowserWindow, crashReporter } = remote
const { expect } = chai
chai.use(dirtyChai)
describe('crashReporter module', () => {
if (process.mas || process.env.DISABLE_CRASH_REPORTER_TESTS) return
// TODO(alexeykuzmin): [Ch66] Fails. Fix it and enable back.
if (process.platform === 'linux') return
// TODO(alexeykuzmin): [Ch66] Fails on linux. Fix it and enable back.
ifdescribe(!process.mas && process.platform !== 'linux')('crashReporter module', () => {
let originalTempDirectory = null
let tempDirectory = null
const specTimeout = 180000
const specTimeout = 10000
before(() => {
tempDirectory = temp.mkdirSync('electronCrashReporterSpec-')
@@ -68,19 +65,21 @@ describe('crashReporter module', () => {
})
})
it('should send minidump when node processes crash', function (done) {
ifit(!browserWindowOpts.webPreferences.sandbox)('should send minidump when node processes crash', function (done) {
this.timeout(specTimeout)
stopServer = startServer({
callback (port) {
const crashesDir = path.join(app.getPath('temp'), `${app.name} Crashes`)
const version = app.getVersion()
const crashPath = path.join(fixtures, 'module', 'crash.js')
childProcess.fork(crashPath, [port, version, crashesDir], { silent: true })
w.loadFile(path.join(fixtures, 'api', 'crash_child.html'), { query: { port, crashesDir, crashPath, version } })
},
processType: 'node',
done: done
done: done,
preAssert: fields => {
expect(String(fields.newExtra)).to.equal('newExtra')
expect(fields.removeExtra).to.be.undefined()
}
})
})
@@ -150,44 +149,6 @@ describe('crashReporter module', () => {
})
})
it('should send minidump with updated extra parameters when node processes crash', function (done) {
if (process.platform === 'linux') {
// FIXME(alexeykuzmin): Skip the test.
// this.skip()
return
}
// TODO(alexeykuzmin): Skip the test instead of marking it as passed.
if (process.platform === 'win32') return done()
this.timeout(specTimeout)
stopServer = startServer({
callback (port) {
const crashesDir = path.join(app.getPath('temp'), `${process.platform === 'win32' ? 'Zombies' : app.getName()} Crashes`)
const version = app.getVersion()
const crashPath = path.join(fixtures, 'module', 'crash.js')
if (process.platform === 'win32') {
const crashServiceProcess = childProcess.spawn(process.execPath, [
`--reporter-url=http://127.0.0.1:${port}`,
'--application-name=Zombies',
`--crashes-directory=${crashesDir}`
], {
env: {
ELECTRON_INTERNAL_CRASH_SERVICE: 1
},
detached: true
})
remote.process.crashServicePid = crashServiceProcess.pid
}
childProcess.fork(crashPath, [port, version, crashesDir], { silent: true })
},
processType: 'browser',
done: done,
preAssert: fields => {
expect(String(fields.newExtra)).to.equal('newExtra')
expect(String(fields.removeExtra)).to.equal(undefined)
}
})
})
it('should send minidump with updated extra parameters', function (done) {
this.timeout(specTimeout)
@@ -305,12 +266,6 @@ describe('crashReporter module', () => {
expect(() => require('electron').crashReporter.getUploadToServer()).to.throw()
})
it('returns true when uploadToServer is set to true', function () {
if (process.platform === 'linux') {
// FIXME(alexeykuzmin): Skip the test.
// this.skip()
return
}
crashReporter.start({
companyName: 'Umbrella Corporation',
submitURL: 'http://127.0.0.1/crashes',
@@ -319,12 +274,6 @@ describe('crashReporter module', () => {
expect(crashReporter.getUploadToServer()).to.be.true()
})
it('returns false when uploadToServer is set to false', function () {
if (process.platform === 'linux') {
// FIXME(alexeykuzmin): Skip the test.
// this.skip()
return
}
crashReporter.start({
companyName: 'Umbrella Corporation',
submitURL: 'http://127.0.0.1/crashes',
@@ -340,12 +289,6 @@ describe('crashReporter module', () => {
expect(() => require('electron').crashReporter.setUploadToServer('arg')).to.throw()
})
it('sets uploadToServer false when called with false', function () {
if (process.platform === 'linux') {
// FIXME(alexeykuzmin): Skip the test.
// this.skip()
return
}
crashReporter.start({
companyName: 'Umbrella Corporation',
submitURL: 'http://127.0.0.1/crashes',
@@ -355,12 +298,6 @@ describe('crashReporter module', () => {
expect(crashReporter.getUploadToServer()).to.be.false()
})
it('sets uploadToServer true when called with true', function () {
if (process.platform === 'linux') {
// FIXME(alexeykuzmin): Skip the test.
// this.skip()
return
}
crashReporter.start({
companyName: 'Umbrella Corporation',
submitURL: 'http://127.0.0.1/crashes',
@@ -382,12 +319,6 @@ describe('crashReporter module', () => {
expect(parameters).to.be.an('object')
})
it('adds a parameter to current parameters', function () {
if (process.platform === 'linux') {
// FIXME(alexeykuzmin): Skip the test.
// this.skip()
return
}
crashReporter.start({
companyName: 'Umbrella Corporation',
submitURL: 'http://127.0.0.1/crashes'
@@ -397,12 +328,6 @@ describe('crashReporter module', () => {
expect(crashReporter.getParameters()).to.have.a.property('hello')
})
it('removes a parameter from current parameters', function () {
if (process.platform === 'linux') {
// FIXME(alexeykuzmin): Skip the test.
// this.skip()
return
}
crashReporter.start({
companyName: 'Umbrella Corporation',
submitURL: 'http://127.0.0.1/crashes'

24
spec/fixtures/api/crash_child.html vendored Normal file
View File

@@ -0,0 +1,24 @@
<html>
<body>
<script type="text/javascript" charset="utf-8">
const query = new URLSearchParams(location.search)
const port = query.get('port')
const version = query.get('version')
const crashesDir = query.get('crashesDir')
const crashPath = query.get('crashPath')
const { crashReporter } = require('electron');
crashReporter.start({
productName: 'Zombies',
companyName: 'Umbrella Corporation',
submitURL: 'http://127.0.0.1:' + port
})
require('child_process').fork(crashPath, [port, version, crashesDir])
</script>
</body>
</html>