Skip to content

Commit

Permalink
Sync javascript changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jleyba committed Dec 19, 2013
1 parent d0ee67e commit f904d16
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
9 changes: 6 additions & 3 deletions javascript/atoms/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,13 @@ bot.events.MouseEventFactory_.prototype.create = function(target, opt_args) {
detail = args.wheelDelta;
}

// For screenX and screenY, we set those to clientX and clientY values.
// While not strictly correct, applications under test depend on
// accurate relative positioning which is satisfied.
event.initMouseEvent(this.type_, this.bubbles_, this.cancelable_, view,
detail, /*screenX*/ 0, /*screenY*/ 0, args.clientX, args.clientY,
args.ctrlKey, args.altKey, args.shiftKey, args.metaKey, args.button,
args.relatedTarget);
detail, /*screenX*/ args.clientX, /*screenY*/ args.clientY,
args.clientX, args.clientY, args.ctrlKey, args.altKey,
args.shiftKey, args.metaKey, args.button, args.relatedTarget);

// Trying to modify the properties throws an error,
// so we define getters to return the correct values.
Expand Down
5 changes: 0 additions & 5 deletions javascript/safari-driver/externs/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,28 @@

/** @type {!Object} */
var console = {};

/**
* @param {string} msg
* @param {...} var_args
*/
console.group = function(msg, var_args) {};

console.groupEnd = function() {};

/**
* @param {string} msg
* @param {...} var_args
*/
console.error = function(msg, var_args) {};

/**
* @param {string} msg
* @param {...} var_args
*/
console.warn = function(msg, var_args) {};

/**
* @param {string} msg
* @param {...} var_args
*/
console.info = function(msg, var_args) {};

/**
* @param {string} msg
* @param {...} var_args
Expand Down
Empty file modified javascript/safari-driver/prebuilt/SafariDriver.safariextz
100755 → 100644
Empty file.
5 changes: 4 additions & 1 deletion javascript/selenium-atoms/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ goog.require('goog.dom.TagName');
goog.require('goog.style');
goog.require('goog.userAgent');
goog.require('goog.userAgent.product');
goog.require('goog.userAgent.product.isVersion');


core.events.controlKeyDown_ = false;
Expand Down Expand Up @@ -128,7 +129,9 @@ core.events.fireAt = function(locator, eventName, opt_coordString) {
var element = core.locators.findElement(locator);
var coords = core.events.parseCoordinates_(opt_coordString || '0,0');

if (goog.userAgent.IE || goog.userAgent.product.CHROME) {
if (goog.userAgent.IE || goog.userAgent.product.CHROME ||
(goog.userAgent.product.FIREFOX &&
goog.userAgent.product.isVersion(27))) {
var bounds = goog.style.getBounds(element);
coords.x += bounds.left;
coords.y += bounds.top;
Expand Down

0 comments on commit f904d16

Please sign in to comment.