Skip to content

Commit c8b388a

Browse files
committed
goog.base is not compatible in es5 strict mode.
A replacement is available in the form of a base method added to constructors by goog.inherit. This change is a no-op, but will allow dependents of these classes to move to ES5 Strict Mode. On behalf of Google engineers.
1 parent ef01b33 commit c8b388a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: javascript/webdriver/testing/asserts.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ webdriver.testing.Assertion.prototype.isFalse = function() {
376376
* @extends {webdriver.testing.Assertion}
377377
*/
378378
webdriver.testing.NegatedAssertion = function(value) {
379-
goog.base(this, value);
379+
webdriver.testing.NegatedAssertion.base(this, 'constructor', value);
380380
this.value = value;
381381
};
382382
goog.inherits(
@@ -387,11 +387,10 @@ goog.inherits(
387387
webdriver.testing.NegatedAssertion.prototype.apply = function(
388388
matcher, opt_message) {
389389
matcher = new goog.labs.testing.IsNotMatcher(matcher);
390-
return goog.base(this, 'apply', matcher, opt_message);
390+
return webdriver.testing.NegatedAssertion.base(this, 'apply', matcher,
391+
opt_message);
391392
};
392393

393-
394-
395394
/**
396395
* Creates a new assertion.
397396
* @param {*} value The value to perform an assertion on.

Diff for: javascript/webdriver/webdriver.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -2433,7 +2433,8 @@ goog.inherits(webdriver.AlertPromise, webdriver.Alert);
24332433
* @extends {bot.Error}
24342434
*/
24352435
webdriver.UnhandledAlertError = function(message, text, alert) {
2436-
goog.base(this, bot.ErrorCode.UNEXPECTED_ALERT_OPEN, message);
2436+
webdriver.UnhandledAlertError.base(
2437+
this, 'constructor', bot.ErrorCode.UNEXPECTED_ALERT_OPEN, message);
24372438

24382439
/** @private {string} */
24392440
this.text_ = text;

0 commit comments

Comments
 (0)