Skip to content

Commit f904d16

Browse files
committed
Sync javascript changes
1 parent d0ee67e commit f904d16

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

javascript/atoms/events.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,13 @@ bot.events.MouseEventFactory_.prototype.create = function(target, opt_args) {
351351
detail = args.wheelDelta;
352352
}
353353

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

359362
// Trying to modify the properties throws an error,
360363
// so we define getters to return the correct values.

javascript/safari-driver/externs/common.js

-5
Original file line numberDiff line numberDiff line change
@@ -20,33 +20,28 @@
2020

2121
/** @type {!Object} */
2222
var console = {};
23-
2423
/**
2524
* @param {string} msg
2625
* @param {...} var_args
2726
*/
2827
console.group = function(msg, var_args) {};
2928

3029
console.groupEnd = function() {};
31-
3230
/**
3331
* @param {string} msg
3432
* @param {...} var_args
3533
*/
3634
console.error = function(msg, var_args) {};
37-
3835
/**
3936
* @param {string} msg
4037
* @param {...} var_args
4138
*/
4239
console.warn = function(msg, var_args) {};
43-
4440
/**
4541
* @param {string} msg
4642
* @param {...} var_args
4743
*/
4844
console.info = function(msg, var_args) {};
49-
5045
/**
5146
* @param {string} msg
5247
* @param {...} var_args

javascript/safari-driver/prebuilt/SafariDriver.safariextz

100755100644
File mode changed.

javascript/selenium-atoms/events.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ goog.require('goog.dom.TagName');
3333
goog.require('goog.style');
3434
goog.require('goog.userAgent');
3535
goog.require('goog.userAgent.product');
36+
goog.require('goog.userAgent.product.isVersion');
3637

3738

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

131-
if (goog.userAgent.IE || goog.userAgent.product.CHROME) {
132+
if (goog.userAgent.IE || goog.userAgent.product.CHROME ||
133+
(goog.userAgent.product.FIREFOX &&
134+
goog.userAgent.product.isVersion(27))) {
132135
var bounds = goog.style.getBounds(element);
133136
coords.x += bounds.left;
134137
coords.y += bounds.top;

0 commit comments

Comments
 (0)