Skip to content

Commit

Permalink
restore whole sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
kmh287 committed Mar 1, 2017
1 parent 2053634 commit eab7dc2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions extensions/amp-bind/0.1/test/test-bind-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ describes.realWin('amp-bind', {

// BindValidator method stubs.
let canBindStub;
let isResultValidStub;

beforeEach(() => {
installTimerService(env.win);
Expand All @@ -41,7 +40,7 @@ describes.realWin('amp-bind', {
// Stub validator methods to return true for ease of testing.
canBindStub = env.sandbox.stub(
BindValidator.prototype, 'canBind').returns(true);
isResultValidStub = env.sandbox.stub(
env.sandbox.stub(
BindValidator.prototype, 'isResultValid').returns(true);

// Make sure we have a chunk instance for testing.
Expand Down Expand Up @@ -163,8 +162,8 @@ describes.realWin('amp-bind', {

//TODO(kmh287): Move to integration test
it('should NOT bind blacklisted attributes', () => {
canBindStub.restore();
isResultValidStub.restore();
// Restore real implementations of canBind and isResultValid
sandbox.restore();
const doc = env.win.document;
const template = doc.createElement('template');
let textElement;
Expand All @@ -186,8 +185,8 @@ describes.realWin('amp-bind', {

//TODO(kmh287): Move to integration test
it('should NOT allow unsecure attribute values', () => {
canBindStub.restore();
isResultValidStub.restore();
// Restore real implementations of canBind and isResultValid
sandbox.restore();
const doc = env.win.document;
const template = doc.createElement('template');
let aElement;
Expand Down

0 comments on commit eab7dc2

Please sign in to comment.