diff --git a/README.md b/README.md index 8b7d36046a76..ace7116c469a 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,12 @@ Guides and the API reference are located in the [docs](https://github.com/atom/electron/tree/master/docs) directory. It also contains documents describing how to build and contribute to Electron. +## Documentation Translations + +- [Korean](https://github.com/atom/electron/tree/master/docs-translations/ko) +- [Japanese](https://github.com/atom/electron/tree/master/docs-translations/jp) +- [Spanish](https://github.com/atom/electron/tree/master/docs-translations/es) + ## Community There is an [`electron` category on the Atom forums](http://discuss.atom.io/category/electron) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 63707f8dcc2d..59a50d5656ce 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -277,7 +277,10 @@ bool WebContents::IsPopupOrPanel(const content::WebContents* source) const { void WebContents::HandleKeyboardEvent( content::WebContents* source, const content::NativeWebKeyboardEvent& event) { - if (type_ == BROWSER_WINDOW) { + if (event.windowsKeyCode == ui::VKEY_ESCAPE && is_html_fullscreen()) { + // Escape exits tabbed fullscreen mode. + ExitFullscreenModeForTab(source); + } else if (type_ == BROWSER_WINDOW) { owner_window()->HandleKeyboardEvent(source, event); } else if (type_ == WEB_VIEW && guest_delegate_) { // Send the unhandled keyboard events back to the embedder. diff --git a/atom/browser/common_web_contents_delegate.h b/atom/browser/common_web_contents_delegate.h index e21cd24e9107..495b5501a0d1 100644 --- a/atom/browser/common_web_contents_delegate.h +++ b/atom/browser/common_web_contents_delegate.h @@ -48,6 +48,8 @@ class CommonWebContentsDelegate NativeWindow* owner_window() const { return owner_window_.get(); } + bool is_html_fullscreen() const { return html_fullscreen_; } + protected: // content::WebContentsDelegate: content::WebContents* OpenURLFromTab( diff --git a/atom/browser/lib/guest-view-manager.coffee b/atom/browser/lib/guest-view-manager.coffee index 971c15cb1b85..398cdb5d9495 100644 --- a/atom/browser/lib/guest-view-manager.coffee +++ b/atom/browser/lib/guest-view-manager.coffee @@ -30,6 +30,10 @@ guestInstances = {} embedderElementsMap = {} reverseEmbedderElementsMap = {} +# Moves the last element of array to the first one. +moveLastToFirst = (list) -> + list.unshift list.pop() + # Generate guestInstanceId. getNextInstanceId = (webContents) -> ++nextInstanceId @@ -46,7 +50,13 @@ createGuest = (embedder, params) -> destroyEvents = ['destroyed', 'crashed', 'did-navigate-to-different-page'] destroy = -> destroyGuest embedder, id if guestInstances[id]? - embedder.once event, destroy for event in destroyEvents + for event in destroyEvents + embedder.once event, destroy + # Users might also listen to the crashed event, so We must ensure the guest + # is destroyed before users' listener gets called. It is done by moving our + # listener to the first one in queue. + listeners = embedder._events[event] + moveLastToFirst listeners if Array.isArray listeners guest.once 'destroyed', -> embedder.removeListener event, destroy for event in destroyEvents diff --git a/atom/browser/ui/file_dialog_gtk.cc b/atom/browser/ui/file_dialog_gtk.cc index 6eab9ef89f7b..463ad987a8b0 100644 --- a/atom/browser/ui/file_dialog_gtk.cc +++ b/atom/browser/ui/file_dialog_gtk.cc @@ -19,6 +19,9 @@ namespace { // Makes sure that .jpg also shows .JPG. gboolean FileFilterCaseInsensitive(const GtkFileFilterInfo* file_info, std::string* file_extension) { + // Makes .* file extension matches all file types. + if (*file_extension == ".*") + return true; return EndsWith(file_info->filename, *file_extension, false); } diff --git a/atom/browser/ui/file_dialog_mac.mm b/atom/browser/ui/file_dialog_mac.mm index 96d230b1a1ea..1cbe46e3b55b 100644 --- a/atom/browser/ui/file_dialog_mac.mm +++ b/atom/browser/ui/file_dialog_mac.mm @@ -23,6 +23,12 @@ void SetAllowedFileTypes(NSSavePanel* dialog, const Filters& filters) { for (size_t i = 0; i < filters.size(); ++i) { const Filter& filter = filters[i]; for (size_t j = 0; j < filter.second.size(); ++j) { + // If we meet a '*' file extension, we allow all the file types and no + // need to set the specified file types. + if (filter.second[j] == "*") { + [dialog setAllowsOtherFileTypes:YES]; + return; + } base::ScopedCFTypeRef ext_cf( base::SysUTF8ToCFStringRef(filter.second[j])); [file_type_set addObject:base::mac::CFToNSCast(ext_cf.get())]; diff --git a/atom/browser/ui/message_box_win.cc b/atom/browser/ui/message_box_win.cc index 051f8f5eff6c..697a7ad410a2 100644 --- a/atom/browser/ui/message_box_win.cc +++ b/atom/browser/ui/message_box_win.cc @@ -78,9 +78,9 @@ int ShowMessageBoxUTF16(HWND parent, const base::string16& message, const base::string16& detail, const gfx::ImageSkia& icon) { - TASKDIALOG_FLAGS flags = TDF_SIZE_TO_CONTENT; // show all content. - if (cancel_id != 0) - flags |= TDF_ALLOW_DIALOG_CANCELLATION; // allow dialog to be cancelled. + TASKDIALOG_FLAGS flags = + TDF_SIZE_TO_CONTENT | // Show all content. + TDF_ALLOW_DIALOG_CANCELLATION; // Allow canceling the dialog. TASKDIALOGCONFIG config = { 0 }; config.cbSize = sizeof(config); diff --git a/atom/renderer/lib/override.coffee b/atom/renderer/lib/override.coffee index d8c6c0a86d79..a413178442f2 100644 --- a/atom/renderer/lib/override.coffee +++ b/atom/renderer/lib/override.coffee @@ -80,12 +80,15 @@ window.alert = (message, title='') -> buttons = ['OK'] message = message.toString() dialog.showMessageBox remote.getCurrentWindow(), {message, title, buttons} + # Alert should always return undefined. + return # And the confirm(). window.confirm = (message, title='') -> dialog = remote.require 'dialog' buttons = ['OK', 'Cancel'] - not dialog.showMessageBox remote.getCurrentWindow(), {message, title, buttons} + cancelId = 1 + not dialog.showMessageBox remote.getCurrentWindow(), {message, title, buttons, cancelId} # But we do not support prompt(). window.prompt = -> diff --git a/docs/README-es.md b/docs-translations/es/README-es.md similarity index 100% rename from docs/README-es.md rename to docs-translations/es/README-es.md diff --git a/docs/tutorial/application-distribution-es.md b/docs-translations/es/tutorial/application-distribution-es.md similarity index 100% rename from docs/tutorial/application-distribution-es.md rename to docs-translations/es/tutorial/application-distribution-es.md diff --git a/docs/tutorial/application-packaging-es.md b/docs-translations/es/tutorial/application-packaging-es.md similarity index 100% rename from docs/tutorial/application-packaging-es.md rename to docs-translations/es/tutorial/application-packaging-es.md diff --git a/docs/tutorial/debugging-main-process-es.md b/docs-translations/es/tutorial/debugging-main-process-es.md similarity index 100% rename from docs/tutorial/debugging-main-process-es.md rename to docs-translations/es/tutorial/debugging-main-process-es.md diff --git a/docs/tutorial/desktop-environment-integration-es.md b/docs-translations/es/tutorial/desktop-environment-integration-es.md similarity index 100% rename from docs/tutorial/desktop-environment-integration-es.md rename to docs-translations/es/tutorial/desktop-environment-integration-es.md diff --git a/docs/tutorial/devtools-extension-es.md b/docs-translations/es/tutorial/devtools-extension-es.md similarity index 100% rename from docs/tutorial/devtools-extension-es.md rename to docs-translations/es/tutorial/devtools-extension-es.md diff --git a/docs/tutorial/online-offline-events-es.md b/docs-translations/es/tutorial/online-offline-events-es.md similarity index 100% rename from docs/tutorial/online-offline-events-es.md rename to docs-translations/es/tutorial/online-offline-events-es.md diff --git a/docs/tutorial/quick-start-es.md b/docs-translations/es/tutorial/quick-start-es.md similarity index 100% rename from docs/tutorial/quick-start-es.md rename to docs-translations/es/tutorial/quick-start-es.md diff --git a/docs/tutorial/using-native-node-modules-es.md b/docs-translations/es/tutorial/using-native-node-modules-es.md similarity index 100% rename from docs/tutorial/using-native-node-modules-es.md rename to docs-translations/es/tutorial/using-native-node-modules-es.md diff --git a/docs/tutorial/using-pepper-flash-plugin-es.md b/docs-translations/es/tutorial/using-pepper-flash-plugin-es.md similarity index 100% rename from docs/tutorial/using-pepper-flash-plugin-es.md rename to docs-translations/es/tutorial/using-pepper-flash-plugin-es.md diff --git a/docs/tutorial/using-selenium-and-webdriver-es.md b/docs-translations/es/tutorial/using-selenium-and-webdriver-es.md similarity index 100% rename from docs/tutorial/using-selenium-and-webdriver-es.md rename to docs-translations/es/tutorial/using-selenium-and-webdriver-es.md diff --git a/docs/tutorial/quick-start-jp.md b/docs-translations/jp/quick-start-jp.md similarity index 100% rename from docs/tutorial/quick-start-jp.md rename to docs-translations/jp/quick-start-jp.md diff --git a/docs/README-ko.md b/docs-translations/ko/README-ko.md similarity index 100% rename from docs/README-ko.md rename to docs-translations/ko/README-ko.md diff --git a/docs/api/accelerator-ko.md b/docs-translations/ko/api/accelerator-ko.md similarity index 100% rename from docs/api/accelerator-ko.md rename to docs-translations/ko/api/accelerator-ko.md diff --git a/docs/api/auto-updater-ko.md b/docs-translations/ko/api/auto-updater-ko.md similarity index 100% rename from docs/api/auto-updater-ko.md rename to docs-translations/ko/api/auto-updater-ko.md diff --git a/docs/api/chrome-command-line-switches-ko.md b/docs-translations/ko/api/chrome-command-line-switches-ko.md similarity index 100% rename from docs/api/chrome-command-line-switches-ko.md rename to docs-translations/ko/api/chrome-command-line-switches-ko.md diff --git a/docs/api/clipboard-ko.md b/docs-translations/ko/api/clipboard-ko.md similarity index 100% rename from docs/api/clipboard-ko.md rename to docs-translations/ko/api/clipboard-ko.md diff --git a/docs/api/content-tracing-ko.md b/docs-translations/ko/api/content-tracing-ko.md similarity index 100% rename from docs/api/content-tracing-ko.md rename to docs-translations/ko/api/content-tracing-ko.md diff --git a/docs/api/crash-reporter-ko.md b/docs-translations/ko/api/crash-reporter-ko.md similarity index 100% rename from docs/api/crash-reporter-ko.md rename to docs-translations/ko/api/crash-reporter-ko.md diff --git a/docs/api/dialog-ko.md b/docs-translations/ko/api/dialog-ko.md similarity index 100% rename from docs/api/dialog-ko.md rename to docs-translations/ko/api/dialog-ko.md diff --git a/docs/api/file-object-ko.md b/docs-translations/ko/api/file-object-ko.md similarity index 100% rename from docs/api/file-object-ko.md rename to docs-translations/ko/api/file-object-ko.md diff --git a/docs/api/frameless-window-ko.md b/docs-translations/ko/api/frameless-window-ko.md similarity index 100% rename from docs/api/frameless-window-ko.md rename to docs-translations/ko/api/frameless-window-ko.md diff --git a/docs/api/global-shortcut-ko.md b/docs-translations/ko/api/global-shortcut-ko.md similarity index 100% rename from docs/api/global-shortcut-ko.md rename to docs-translations/ko/api/global-shortcut-ko.md diff --git a/docs/api/ipc-main-process-ko.md b/docs-translations/ko/api/ipc-main-process-ko.md similarity index 100% rename from docs/api/ipc-main-process-ko.md rename to docs-translations/ko/api/ipc-main-process-ko.md diff --git a/docs/api/ipc-renderer-ko.md b/docs-translations/ko/api/ipc-renderer-ko.md similarity index 100% rename from docs/api/ipc-renderer-ko.md rename to docs-translations/ko/api/ipc-renderer-ko.md diff --git a/docs/api/menu-item-ko.md b/docs-translations/ko/api/menu-item-ko.md similarity index 100% rename from docs/api/menu-item-ko.md rename to docs-translations/ko/api/menu-item-ko.md diff --git a/docs/api/native-image-ko.md b/docs-translations/ko/api/native-image-ko.md similarity index 100% rename from docs/api/native-image-ko.md rename to docs-translations/ko/api/native-image-ko.md diff --git a/docs/api/power-monitor-ko.md b/docs-translations/ko/api/power-monitor-ko.md similarity index 100% rename from docs/api/power-monitor-ko.md rename to docs-translations/ko/api/power-monitor-ko.md diff --git a/docs/api/power-save-blocker-ko.md b/docs-translations/ko/api/power-save-blocker-ko.md similarity index 100% rename from docs/api/power-save-blocker-ko.md rename to docs-translations/ko/api/power-save-blocker-ko.md diff --git a/docs/api/process-ko.md b/docs-translations/ko/api/process-ko.md similarity index 100% rename from docs/api/process-ko.md rename to docs-translations/ko/api/process-ko.md diff --git a/docs/api/protocol-ko.md b/docs-translations/ko/api/protocol-ko.md similarity index 100% rename from docs/api/protocol-ko.md rename to docs-translations/ko/api/protocol-ko.md diff --git a/docs/api/remote-ko.md b/docs-translations/ko/api/remote-ko.md similarity index 100% rename from docs/api/remote-ko.md rename to docs-translations/ko/api/remote-ko.md diff --git a/docs/api/screen-ko.md b/docs-translations/ko/api/screen-ko.md similarity index 100% rename from docs/api/screen-ko.md rename to docs-translations/ko/api/screen-ko.md diff --git a/docs/api/shell-ko.md b/docs-translations/ko/api/shell-ko.md similarity index 100% rename from docs/api/shell-ko.md rename to docs-translations/ko/api/shell-ko.md diff --git a/docs/api/synopsis-ko.md b/docs-translations/ko/api/synopsis-ko.md similarity index 100% rename from docs/api/synopsis-ko.md rename to docs-translations/ko/api/synopsis-ko.md diff --git a/docs/api/tray-ko.md b/docs-translations/ko/api/tray-ko.md similarity index 100% rename from docs/api/tray-ko.md rename to docs-translations/ko/api/tray-ko.md diff --git a/docs/api/web-frame-ko.md b/docs-translations/ko/api/web-frame-ko.md similarity index 100% rename from docs/api/web-frame-ko.md rename to docs-translations/ko/api/web-frame-ko.md diff --git a/docs/api/web-view-tag-ko.md b/docs-translations/ko/api/web-view-tag-ko.md similarity index 100% rename from docs/api/web-view-tag-ko.md rename to docs-translations/ko/api/web-view-tag-ko.md diff --git a/docs/api/window-open-ko.md b/docs-translations/ko/api/window-open-ko.md similarity index 100% rename from docs/api/window-open-ko.md rename to docs-translations/ko/api/window-open-ko.md diff --git a/docs/development/atom-shell-vs-node-webkit-ko.md b/docs-translations/ko/development/atom-shell-vs-node-webkit-ko.md similarity index 100% rename from docs/development/atom-shell-vs-node-webkit-ko.md rename to docs-translations/ko/development/atom-shell-vs-node-webkit-ko.md diff --git a/docs/development/build-instructions-linux-ko.md b/docs-translations/ko/development/build-instructions-linux-ko.md similarity index 100% rename from docs/development/build-instructions-linux-ko.md rename to docs-translations/ko/development/build-instructions-linux-ko.md diff --git a/docs/development/build-instructions-mac-ko.md b/docs-translations/ko/development/build-instructions-mac-ko.md similarity index 100% rename from docs/development/build-instructions-mac-ko.md rename to docs-translations/ko/development/build-instructions-mac-ko.md diff --git a/docs/development/build-instructions-windows-ko.md b/docs-translations/ko/development/build-instructions-windows-ko.md similarity index 100% rename from docs/development/build-instructions-windows-ko.md rename to docs-translations/ko/development/build-instructions-windows-ko.md diff --git a/docs/development/build-system-overview-ko.md b/docs-translations/ko/development/build-system-overview-ko.md similarity index 100% rename from docs/development/build-system-overview-ko.md rename to docs-translations/ko/development/build-system-overview-ko.md diff --git a/docs/development/coding-style-ko.md b/docs-translations/ko/development/coding-style-ko.md similarity index 100% rename from docs/development/coding-style-ko.md rename to docs-translations/ko/development/coding-style-ko.md diff --git a/docs/development/setting-up-symbol-server-ko.md b/docs-translations/ko/development/setting-up-symbol-server-ko.md similarity index 100% rename from docs/development/setting-up-symbol-server-ko.md rename to docs-translations/ko/development/setting-up-symbol-server-ko.md diff --git a/docs/development/source-code-directory-structure-ko.md b/docs-translations/ko/development/source-code-directory-structure-ko.md similarity index 100% rename from docs/development/source-code-directory-structure-ko.md rename to docs-translations/ko/development/source-code-directory-structure-ko.md diff --git a/docs/tutorial/application-distribution-ko.md b/docs-translations/ko/tutorial/application-distribution-ko.md similarity index 100% rename from docs/tutorial/application-distribution-ko.md rename to docs-translations/ko/tutorial/application-distribution-ko.md diff --git a/docs/tutorial/application-packaging-ko.md b/docs-translations/ko/tutorial/application-packaging-ko.md similarity index 100% rename from docs/tutorial/application-packaging-ko.md rename to docs-translations/ko/tutorial/application-packaging-ko.md diff --git a/docs/tutorial/debugging-main-process-ko.md b/docs-translations/ko/tutorial/debugging-main-process-ko.md similarity index 100% rename from docs/tutorial/debugging-main-process-ko.md rename to docs-translations/ko/tutorial/debugging-main-process-ko.md diff --git a/docs/tutorial/desktop-environment-integration-ko.md b/docs-translations/ko/tutorial/desktop-environment-integration-ko.md similarity index 100% rename from docs/tutorial/desktop-environment-integration-ko.md rename to docs-translations/ko/tutorial/desktop-environment-integration-ko.md diff --git a/docs/tutorial/devtools-extension-ko.md b/docs-translations/ko/tutorial/devtools-extension-ko.md similarity index 100% rename from docs/tutorial/devtools-extension-ko.md rename to docs-translations/ko/tutorial/devtools-extension-ko.md diff --git a/docs/tutorial/online-offline-events-ko.md b/docs-translations/ko/tutorial/online-offline-events-ko.md similarity index 100% rename from docs/tutorial/online-offline-events-ko.md rename to docs-translations/ko/tutorial/online-offline-events-ko.md diff --git a/docs/tutorial/quick-start-ko.md b/docs-translations/ko/tutorial/quick-start-ko.md similarity index 100% rename from docs/tutorial/quick-start-ko.md rename to docs-translations/ko/tutorial/quick-start-ko.md diff --git a/docs/tutorial/using-native-node-modules-ko.md b/docs-translations/ko/tutorial/using-native-node-modules-ko.md similarity index 100% rename from docs/tutorial/using-native-node-modules-ko.md rename to docs-translations/ko/tutorial/using-native-node-modules-ko.md diff --git a/docs/tutorial/using-pepper-flash-plugin-ko.md b/docs-translations/ko/tutorial/using-pepper-flash-plugin-ko.md similarity index 100% rename from docs/tutorial/using-pepper-flash-plugin-ko.md rename to docs-translations/ko/tutorial/using-pepper-flash-plugin-ko.md diff --git a/docs/tutorial/using-selenium-and-webdriver-ko.md b/docs-translations/ko/tutorial/using-selenium-and-webdriver-ko.md similarity index 100% rename from docs/tutorial/using-selenium-and-webdriver-ko.md rename to docs-translations/ko/tutorial/using-selenium-and-webdriver-ko.md diff --git a/docs/api/dialog.md b/docs/api/dialog.md index d9336c0c8a3a..084e6bae0c4a 100644 --- a/docs/api/dialog.md +++ b/docs/api/dialog.md @@ -11,7 +11,9 @@ var dialog = require('dialog'); console.log(dialog.showOpenDialog({ properties: [ 'openFile', 'openDirectory', 'multiSelections' ]})); ``` -**Note for OS X**: If you want to present dialogs as sheets, the only thing you have to do is provide a `BrowserWindow` reference in the `browserWindow` parameter. +**Note for OS X**: If you want to present dialogs as sheets, the only thing you +have to do is provide a `BrowserWindow` reference in the `browserWindow` +parameter. ## dialog.showOpenDialog([browserWindow], [options], [callback]) @@ -36,17 +38,22 @@ selected, an example is: filters: [ { name: 'Images', extensions: ['jpg', 'png', 'gif'] }, { name: 'Movies', extensions: ['mkv', 'avi', 'mp4'] }, - { name: 'Custom File Type', extensions: ['as'] } + { name: 'Custom File Type', extensions: ['as'] }, + { name: 'All Files', extensions: ['*'] } ] } ``` +The `extensions` array should contain extensions without wildcards or dots (e.g. +`'png'` is good, `'.png'` and `'*.png'` are bad). To show all files, use the +`'*'` wildcard (no other wildcard is supported). If a `callback` is passed, the API call would be asynchronous and the result would be passed via `callback(filenames)` **Note:** On Windows and Linux, an open dialog can not be both a file selector and a directory selector, so if you set `properties` to -`['openFile', 'openDirectory']` on these platforms, a directory selector will be shown. +`['openFile', 'openDirectory']` on these platforms, a directory selector will be +shown. ## dialog.showSaveDialog([browserWindow], [options], [callback]) @@ -70,7 +77,9 @@ will be passed via `callback(filename)` * `browserWindow` BrowserWindow * `options` Object - * `type` String - Can be `"none"`, `"info"`, `"error"`, `"question"` or `"warning"`. On Windows, "question" displays the same icon as "info", unless if you set an icon using the "icon" option + * `type` String - Can be `"none"`, `"info"`, `"error"`, `"question"` or + `"warning"`. On Windows, "question" displays the same icon as "info", unless + if you set an icon using the "icon" option * `buttons` Array - Array of texts for buttons * `title` String - Title of the message box, some platforms will not show it * `message` String - Content of the message box diff --git a/docs/development/coding-style.md b/docs/development/coding-style.md index df7f42e4a74e..7b72174c6be1 100644 --- a/docs/development/coding-style.md +++ b/docs/development/coding-style.md @@ -8,6 +8,13 @@ script `script/cpplint.py` to check whether all files confirm. The python's version we are using now is Python 2.7. +The C++ code uses a lot of Chromium's abstractions and types, so it's +recommended to get acquainted with them. A good place to start is +Chromium's [Important Abstractions and Data Structures] +(https://www.chromium.org/developers/coding-style/important-abstractions-and-data-structures) +document. The document mentions some special types, scoped types (that +automatically release their memory when going out of scope), logging mechanisms etc. + ## CoffeeScript For CoffeeScript, we follow GitHub's [Style diff --git a/docs/tutorial/using-selenium-and-webdriver.md b/docs/tutorial/using-selenium-and-webdriver.md index 13934c01b086..f3b7310dfbe5 100644 --- a/docs/tutorial/using-selenium-and-webdriver.md +++ b/docs/tutorial/using-selenium-and-webdriver.md @@ -70,6 +70,53 @@ driver.wait(function() { driver.quit(); ``` +## Setting up with WebdriverIO + +[WebdriverIO](http://webdriver.io/) provides a Node package for testing with web driver. + +### 1. Start chrome driver + +First you need to download the `chromedriver` binary, and run it: + +```bash +$ chromedriver --url-base=/wd/hub --port=9515 +Starting ChromeDriver (v2.10.291558) on port 9515 +Only local connections are allowed. +``` + +Remember the port number `9515`, which will be used later + +### 2. Install WebdriverIO + +```bash +$ npm install webdriverio +``` + +### 3. Connect to chrome driver +```javascript +var webdriverio = require('webdriverio'); +var options = { + host: "localhost", // Use localhost as chrome driver server + port: 9515, // "9515" is the port opened by chrome driver. + desiredCapabilities: { + browserName: 'chrome', + chromeOptions: {binary: '/Path-to-Your-App.app/Electron'} // Path to your Electron binary. + } +}; + +var client = webdriverio.remote(options); + +client + .init() + .url('http://google.com') + .setValue('#q', 'webdriverio') + .click('#btnG') + .getTitle().then(function(title) { + console.log('Title was: ' + title); + }) + .end(); +``` + ## Workflow To test your application without rebuilding Electron, simply [place](https://github.com/atom/electron/blob/master/docs/tutorial/application-distribution.md) your app source into Electron's resource directory. diff --git a/package.json b/package.json index 2986a380c4ea..2ccaa24d3c0e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "electron", "devDependencies": { - "asar": "0.5.0", + "asar": "0.7.x", "coffee-script": "^1.9.2", "coffeelint": "^1.9.4", "request": "*", diff --git a/spec/api-ipc-spec.coffee b/spec/api-ipc-spec.coffee index 7c6148b559b0..142f06c00ff3 100644 --- a/spec/api-ipc-spec.coffee +++ b/spec/api-ipc-spec.coffee @@ -5,6 +5,13 @@ remote = require 'remote' BrowserWindow = remote.require 'browser-window' +comparePaths = (path1, path2) -> + if process.platform is 'win32' + # Paths in Windows are case insensitive. + path1 = path1.toLowerCase() + path2 = path2.toLowerCase() + assert.equal path1, path2 + describe 'ipc module', -> fixtures = path.join __dirname, 'fixtures' @@ -19,8 +26,8 @@ describe 'ipc module', -> assert.equal a.id, 1127 it 'should search module from the user app', -> - assert.equal path.normalize(remote.process.mainModule.filename), path.resolve(__dirname, 'static', 'main.js') - assert.equal path.normalize(remote.process.mainModule.paths[0]), path.resolve(__dirname, 'static', 'node_modules') + comparePaths path.normalize(remote.process.mainModule.filename), path.resolve(__dirname, 'static', 'main.js') + comparePaths path.normalize(remote.process.mainModule.paths[0]), path.resolve(__dirname, 'static', 'node_modules') describe 'remote.createFunctionWithReturnValue', -> it 'should be called in browser synchronously', -> diff --git a/vendor/brightray b/vendor/brightray index 939a7b814282..5b2a73c68a98 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit 939a7b814282a6433b8d7e3c9cfc74451360c07f +Subproject commit 5b2a73c68a986780e67eb2e738327d35c7c1c21e diff --git a/vendor/node b/vendor/node index 205b013ac86e..b9b6dd9f3fc0 160000 --- a/vendor/node +++ b/vendor/node @@ -1 +1 @@ -Subproject commit 205b013ac86e5500678a791cd54f305580fa4f4b +Subproject commit b9b6dd9f3fc095e66a3b89d3efd50f7c576da2c8