Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
{entered,left}DocumentCallback -> {entered,left}ViewCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Oct 10, 2013
1 parent 3a994df commit 9618144
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/wrappers/Document.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@
// and not from the spec since the spec is out of date.
[
'createdCallback',
'enteredDocumentCallback',
'leftDocumentCallback',
'enteredViewCallback',
'leftViewCallback',
'attributeChangedCallback',
].forEach(function(name) {
var f = prototype[name];
Expand Down
18 changes: 9 additions & 9 deletions test/js/Document.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,24 +373,24 @@ htmlSuite('Document', function() {
assert.equal(self, a);
});

test('document.register enteredDocumentCallback, leftDocumentCallback',
test('document.register enteredViewCallback, leftViewCallback',
function() {
if (!document.register)
return;

var enteredDocumentCalls = 0;
var leftDocumentCalls = 0;
var enteredViewCalls = 0;
var leftViewCalls = 0;

function A() {}
A.prototype = {
__proto__: HTMLElement.prototype,
enteredDocumentCallback: function() {
enteredDocumentCalls++;
enteredViewCallback: function() {
enteredViewCalls++;
assert.instanceOf(this, A);
assert.equal(a, this);
},
leftDocumentCallback: function() {
leftDocumentCalls++;
leftViewCallback: function() {
leftViewCalls++;
assert.instanceOf(this, A);
assert.equal(a, this);
}
Expand All @@ -400,9 +400,9 @@ htmlSuite('Document', function() {

var a = new A;
document.body.appendChild(a);
assert.equal(enteredDocumentCalls, 1);
assert.equal(enteredViewCalls, 1);
document.body.removeChild(a);
assert.equal(leftDocumentCalls, 1);
assert.equal(leftViewCalls, 1);
});

test('document.register attributeChangedCallback', function() {
Expand Down

0 comments on commit 9618144

Please sign in to comment.