Skip to content

Commit

Permalink
Merge pull request #10734 from rwjblue/fix-i8-trim
Browse files Browse the repository at this point in the history
[BUGFIX beta] `String.prototype.trim` does not exist on IE8.
  • Loading branch information
stefanpenner committed Mar 26, 2015
2 parents 46b1a3a + af0de7c commit 47aaf75
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/ember/tests/routing/basic_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import ActionManager from "ember-views/system/action_manager";
import EmberHandlebars from "ember-htmlbars/compat";

var compile = EmberHandlebars.compile;
var trim = Ember.$.trim;

var Router, App, router, registry, container, originalLoggerError;

Expand Down Expand Up @@ -3671,13 +3672,13 @@ QUnit.test("Tolerates stacked renders", function() {
}
});
bootApplication();
equal(Ember.$('#qunit-fixture').text().trim(), 'hi');
equal(trim(Ember.$('#qunit-fixture').text()), 'hi');
Ember.run(router, 'send', 'openLayer');
equal(Ember.$('#qunit-fixture').text().trim(), 'hilayer');
equal(trim(Ember.$('#qunit-fixture').text()), 'hilayer');
Ember.run(router, 'send', 'openLayer');
equal(Ember.$('#qunit-fixture').text().trim(), 'hilayer');
equal(trim(Ember.$('#qunit-fixture').text()), 'hilayer');
Ember.run(router, 'send', 'close');
equal(Ember.$('#qunit-fixture').text().trim(), 'hi');
equal(trim(Ember.$('#qunit-fixture').text()), 'hi');
});

QUnit.test("Renders child into parent with non-default template name", function() {
Expand Down Expand Up @@ -3732,11 +3733,11 @@ QUnit.test("Allows any route to disconnectOutlet another route's templates", fun
}
});
bootApplication();
equal(Ember.$('#qunit-fixture').text().trim(), 'hi');
equal(trim(Ember.$('#qunit-fixture').text()), 'hi');
Ember.run(router, 'send', 'openLayer');
equal(Ember.$('#qunit-fixture').text().trim(), 'hilayer');
equal(trim(Ember.$('#qunit-fixture').text()), 'hilayer');
Ember.run(router, 'send', 'close');
equal(Ember.$('#qunit-fixture').text().trim(), 'hi');
equal(trim(Ember.$('#qunit-fixture').text()), 'hi');
});

QUnit.test("Can render({into:...}) the render helper", function() {
Expand Down

0 comments on commit 47aaf75

Please sign in to comment.