From 57812616b9a8fd282e94da740bae1e10a0a47668 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 18 Mar 2015 12:55:44 +0800 Subject: [PATCH] win: Fix tests and compilation errors --- atom/common/platform_util_win.cc | 4 +-- .../printing/print_view_manager_base.cc | 2 +- script/lib/config.py | 2 +- spec/chromium-spec.coffee | 34 +++++-------------- spec/package.json | 1 - vendor/brightray | 2 +- 6 files changed, 13 insertions(+), 32 deletions(-) diff --git a/atom/common/platform_util_win.cc b/atom/common/platform_util_win.cc index 167190a6ca93..19ecf45d9429 100644 --- a/atom/common/platform_util_win.cc +++ b/atom/common/platform_util_win.cc @@ -29,8 +29,8 @@ namespace { // is empty. This function tells if it is. bool ValidateShellCommandForScheme(const std::string& scheme) { base::win::RegKey key; - std::wstring registry_path = base::ASCIIToWide(scheme) + - L"\\shell\\open\\command"; + base::string16 registry_path = base::ASCIIToUTF16(scheme) + + L"\\shell\\open\\command"; key.Open(HKEY_CLASSES_ROOT, registry_path.c_str(), KEY_READ); if (!key.Valid()) return false; diff --git a/chromium_src/chrome/browser/printing/print_view_manager_base.cc b/chromium_src/chrome/browser/printing/print_view_manager_base.cc index af55132bd6b6..3aec7a14d546 100644 --- a/chromium_src/chrome/browser/printing/print_view_manager_base.cc +++ b/chromium_src/chrome/browser/printing/print_view_manager_base.cc @@ -155,7 +155,7 @@ void PrintViewManagerBase::OnDidPrintPage( reinterpret_cast(shared_buf.memory()), params.data_size); - document->DebugDumpData(bytes, FILE_PATH_LITERAL(".pdf")); + document->DebugDumpData(bytes.get(), FILE_PATH_LITERAL(".pdf")); } #endif // !OS_WIN } diff --git a/script/lib/config.py b/script/lib/config.py index 8b27d6761ec1..01f849d6ca68 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -4,7 +4,7 @@ import platform import sys BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' -LIBCHROMIUMCONTENT_COMMIT = '5e41ab5d654a5250014f2d751a2e118c540bdff2' +LIBCHROMIUMCONTENT_COMMIT = '78ddaee2158886da53d0801db572be38230fd814' ARCH = { 'cygwin': '32bit', diff --git a/spec/chromium-spec.coffee b/spec/chromium-spec.coffee index baf6f801404e..d39183576b40 100644 --- a/spec/chromium-spec.coffee +++ b/spec/chromium-spec.coffee @@ -2,7 +2,6 @@ assert = require 'assert' http = require 'http' https = require 'https' path = require 'path' -pem = require 'pem' describe 'chromium feature', -> fixtures = path.resolve __dirname, 'fixtures' @@ -11,33 +10,16 @@ describe 'chromium feature', -> it 'does not crash', -> process.atomBinding('v8_util').takeHeapSnapshot() - describe 'sending request of https protocol urls', -> + describe 'sending request of http protocol urls', -> it 'does not crash', (done) -> @timeout 5000 - options = { - days: 1, - selfSigned: true - } - pem.createCertificate options, (err, keys) -> - server = https.createServer {key: keys.serviceKey, cert: keys.certificate}, (req, res) -> - res.end('hello!') - server.close() - done() - server.listen 4300, '127.0.0.1', -> - {port} = server.address() - $.get "https://127.0.0.1:#{port}", (res) -> - assert.equal res, "hello!" - - describe 'sending request of http protocol urls', -> - it 'does not crash', (done) -> - @timeout 5000 - server = http.createServer (req, res) -> - res.end() - server.close() - done() - server.listen 0, '127.0.0.1', -> - {port} = server.address() - $.get "http://127.0.0.1:#{port}" + server = http.createServer (req, res) -> + res.end() + server.close() + done() + server.listen 0, '127.0.0.1', -> + {port} = server.address() + $.get "http://127.0.0.1:#{port}" describe 'navigator.webkitGetUserMedia', -> it 'calls its callbacks', (done) -> diff --git a/spec/package.json b/spec/package.json index 0f1c25c05594..aacacc2c0deb 100644 --- a/spec/package.json +++ b/spec/package.json @@ -7,7 +7,6 @@ "formidable": "1.0.16", "graceful-fs": "3.0.5", "mocha": "2.1.0", - "pem": "^1.7.1", "q": "0.9.7", "runas": "2.x", "temp": "0.8.1", diff --git a/vendor/brightray b/vendor/brightray index 9c748589f549..eb3564c4f7a7 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit 9c748589f549567dd65b10113c30733de6e2fb0c +Subproject commit eb3564c4f7a7867bfa151bdfd1b5c83efe55d75d