Skip to content

Commit

Permalink
Mised toLowerCase for iOS.js (+2 squashed commits)
Browse files Browse the repository at this point in the history
Squashed commits:
[fba9410] Making sure toLowerCase() is still used for chrome.js
[0cbfa68] We don't need toLowerCas() for app argument, as it is used for passing CFBundleIdentifier, fixes #2131
  • Loading branch information
Vitalii Grygoruk committed Apr 1, 2014
1 parent a928cab commit b70dc24
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/devices/android/chrome.js
Expand Up @@ -24,7 +24,7 @@ ChromeAndroid.prototype.init = function () {
ChromeAndroid.prototype.configure = function (args, caps, cb) {
logger.info("Looks like we want chrome on android");
this._deviceConfigure(args, caps);
var app = this.appString();
var app = this.appString().toLowerCase();
if (app === "chromium") {
this.args.androidPackage = "org.chromium.chrome.testshell";
this.args.androidActivity = "org.chromium.chrome.testshell.Main";
Expand Down
2 changes: 1 addition & 1 deletion lib/devices/device.js
Expand Up @@ -36,7 +36,7 @@ Device.prototype.setArgFromCap = function (arg, cap) {
};

Device.prototype.appString = function () {
return this.args.app ? this.args.app.toString().toLowerCase() : '';
return this.args.app ? this.args.app.toString() : '';
};

Device.prototype.configureApp = function (cb) {
Expand Down
4 changes: 2 additions & 2 deletions lib/devices/ios/ios.js
Expand Up @@ -136,12 +136,12 @@ IOS.prototype.configureApp = function (cb) {
this._deviceConfigureApp(function (err) {
var app = this.appString();
if (err) {
if (app === "iwebview") {
if (app.toLowerCase() === "iwebview") {
this.capabilities.iwebview = true;
this.args.app = path.resolve(__dirname,
"../../../build/WebViewApp/WebViewApp.app");
return this.configureLocalApp(cb);
} else if (app === "settings") {
} else if (app.toLowerCase() === "settings") {
return this.configurePreferences(cb);
} else if (this.appIsPackageOrBundle(app)) {
// we have a bundle ID
Expand Down

0 comments on commit b70dc24

Please sign in to comment.