From 455f0669e77cee9655188c7a09dd532a1f8b85eb Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Tue, 27 Nov 2018 11:18:18 -0800 Subject: [PATCH] fix: add missing shell_resources.pak to repack target (#15844) --- electron_paks.gni | 2 ++ spec/chromium-spec.js | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/electron_paks.gni b/electron_paks.gni index 0db5201fdc..843b965c91 100644 --- a/electron_paks.gni +++ b/electron_paks.gni @@ -56,6 +56,7 @@ template("electron_extra_paks") { "$root_gen_dir/components/components_resources.pak", "$root_gen_dir/content/browser/tracing/tracing_resources.pak", "$root_gen_dir/content/content_resources.pak", + "$root_gen_dir/content/shell/shell_resources.pak", "$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak", "$root_gen_dir/net/net_resources.pak", "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak", @@ -65,6 +66,7 @@ template("electron_extra_paks") { "//components/resources", "//content:resources", "//content/browser/tracing:resources", + "//content/shell:copy_shell_resources", "//electron:resources", "//mojo/public/js:resources", "//net:net_resources", diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index 3362b9f6b2..73b36a0f00 100644 --- a/spec/chromium-spec.js +++ b/spec/chromium-spec.js @@ -53,6 +53,29 @@ describe('chromium feature', () => { it('should set the locale', (done) => testLocale('fr', 'fr', done)) it('should not set an invalid locale', (done) => testLocale('asdfkl', currentLocale, done)) }) + + describe('--remote-debugging-port switch', () => { + it('should display the discovery page', (done) => { + const electronPath = remote.getGlobal('process').execPath + let output = '' + const appProcess = ChildProcess.spawn(electronPath, [`--remote-debugging-port=`]) + + appProcess.stderr.on('data', (data) => { + output += data + const m = /DevTools listening on ws:\/\/127.0.0.1:(\d+)\//.exec(output) + if (m) { + const port = m[1] + http.get(`http://127.0.0.1:${port}`, (res) => { + res.destroy() + appProcess.kill() + expect(res.statusCode).to.eql(200) + expect(parseInt(res.headers['content-length'])).to.be.greaterThan(0) + done() + }) + } + }) + }) + }) }) afterEach(() => closeWindow(w).then(() => { w = null }))