8
0
Просмотр исходного кода

Renamed getAttrIterator to getAttrs.

Piotr Jasiun 10 лет назад
Родитель
Сommit
bf47076805

+ 1 - 1
packages/ckeditor5-utils/src/document/delta/splitdelta.js

@@ -46,7 +46,7 @@ CKEDITOR.define( [
 			throw new CKEditorError( 'transaction-split-root: Root element can not be split.' );
 			throw new CKEditorError( 'transaction-split-root: Root element can not be split.' );
 		}
 		}
 
 
-		const copy = new Element( splitElement.name, splitElement.getAttrIterator() );
+		const copy = new Element( splitElement.name, splitElement.getAttrs() );
 		const insert = new InsertOperation( Position.createAfter( splitElement ), copy, this.doc.version );
 		const insert = new InsertOperation( Position.createAfter( splitElement ), copy, this.doc.version );
 
 
 		this.doc.applyOperation( insert );
 		this.doc.applyOperation( insert );

+ 2 - 2
packages/ckeditor5-utils/src/document/node.js

@@ -234,11 +234,11 @@ CKEDITOR.define( [ 'document/attribute', 'utils', 'ckeditorerror' ], ( Attribute
 		/**
 		/**
 		 * Returns attribute iterator. It can be use to create a new element with the same attributes:
 		 * Returns attribute iterator. It can be use to create a new element with the same attributes:
 		 *
 		 *
-		 *		const copy = new Element( element.name, element.getAttrIterator() );
+		 *		const copy = new Element( element.name, element.getAttrs() );
 		 *
 		 *
 		 * @returns {Iterable.<document.Attribute>} Attribute iterator.
 		 * @returns {Iterable.<document.Attribute>} Attribute iterator.
 		 */
 		 */
-		getAttrIterator() {
+		getAttrs() {
 			return this._attrs[ Symbol.iterator ]();
 			return this._attrs[ Symbol.iterator ]();
 		}
 		}
 	}
 	}

+ 2 - 2
packages/ckeditor5-utils/tests/document/character.js

@@ -38,7 +38,7 @@ describe( 'Character', () => {
 			expect( character ).to.be.an.instanceof( Node );
 			expect( character ).to.be.an.instanceof( Node );
 			expect( character ).to.have.property( 'character' ).that.equals( 'f' );
 			expect( character ).to.have.property( 'character' ).that.equals( 'f' );
 			expect( character ).to.have.property( 'parent' ).that.equals( parent );
 			expect( character ).to.have.property( 'parent' ).that.equals( parent );
-			expect( getIteratorCount( character.getAttrIterator() ) ).to.equal( 0 );
+			expect( getIteratorCount( character.getAttrs() ) ).to.equal( 0 );
 		} );
 		} );
 
 
 		it( 'should create character with attributes', () => {
 		it( 'should create character with attributes', () => {
@@ -49,7 +49,7 @@ describe( 'Character', () => {
 			expect( character ).to.be.an.instanceof( Node );
 			expect( character ).to.be.an.instanceof( Node );
 			expect( character ).to.have.property( 'character' ).that.equals( 'f' );
 			expect( character ).to.have.property( 'character' ).that.equals( 'f' );
 			expect( character ).to.have.property( 'parent' ).that.equals( parent );
 			expect( character ).to.have.property( 'parent' ).that.equals( parent );
-			expect( getIteratorCount( character.getAttrIterator() ) ).to.equal( 1 );
+			expect( getIteratorCount( character.getAttrs() ) ).to.equal( 1 );
 			expect( character.getAttr( attr.key ) ).to.equal( attr.value );
 			expect( character.getAttr( attr.key ) ).to.equal( attr.value );
 		} );
 		} );
 	} );
 	} );

+ 1 - 1
packages/ckeditor5-utils/tests/document/deltas/mergedelta.js

@@ -48,7 +48,7 @@ describe( 'Transaction', () => {
 			expect( root.getChildCount() ).to.equal( 1 );
 			expect( root.getChildCount() ).to.equal( 1 );
 			expect( root.getChild( 0 ).name ).to.equal( 'p' );
 			expect( root.getChild( 0 ).name ).to.equal( 'p' );
 			expect( root.getChild( 0 ).getChildCount() ).to.equal( 6 );
 			expect( root.getChild( 0 ).getChildCount() ).to.equal( 6 );
-			expect( getIteratorCount( root.getChild( 0 ).getAttrIterator() ) ).to.equal( 1 );
+			expect( getIteratorCount( root.getChild( 0 ).getAttrs() ) ).to.equal( 1 );
 			expect( root.getChild( 0 ).getAttr( 'key1' ) ).to.equal( 'value1' );
 			expect( root.getChild( 0 ).getAttr( 'key1' ) ).to.equal( 'value1' );
 			expect( root.getChild( 0 ).getChild( 0 ).character ).to.equal( 'f' );
 			expect( root.getChild( 0 ).getChild( 0 ).character ).to.equal( 'f' );
 			expect( root.getChild( 0 ).getChild( 1 ).character ).to.equal( 'o' );
 			expect( root.getChild( 0 ).getChild( 1 ).character ).to.equal( 'o' );

+ 4 - 4
packages/ckeditor5-utils/tests/document/deltas/splitdelta.js

@@ -48,7 +48,7 @@ describe( 'Transaction', () => {
 
 
 			expect( root.getChild( 0 ).name ).to.equal( 'p' );
 			expect( root.getChild( 0 ).name ).to.equal( 'p' );
 			expect( root.getChild( 0 ).getChildCount() ).to.equal( 3 );
 			expect( root.getChild( 0 ).getChildCount() ).to.equal( 3 );
-			expect( getIteratorCount( root.getChild( 0 ).getAttrIterator() ) ).to.equal( 1 );
+			expect( getIteratorCount( root.getChild( 0 ).getAttrs() ) ).to.equal( 1 );
 			expect( root.getChild( 0 ).getAttr( 'key' ) ).to.equal( 'value' );
 			expect( root.getChild( 0 ).getAttr( 'key' ) ).to.equal( 'value' );
 			expect( root.getChild( 0 ).getChild( 0 ).character ).to.equal( 'f' );
 			expect( root.getChild( 0 ).getChild( 0 ).character ).to.equal( 'f' );
 			expect( root.getChild( 0 ).getChild( 1 ).character ).to.equal( 'o' );
 			expect( root.getChild( 0 ).getChild( 1 ).character ).to.equal( 'o' );
@@ -56,7 +56,7 @@ describe( 'Transaction', () => {
 
 
 			expect( root.getChild( 1 ).name ).to.equal( 'p' );
 			expect( root.getChild( 1 ).name ).to.equal( 'p' );
 			expect( root.getChild( 1 ).getChildCount() ).to.equal( 3 );
 			expect( root.getChild( 1 ).getChildCount() ).to.equal( 3 );
-			expect( getIteratorCount( root.getChild( 1 ).getAttrIterator() ) ).to.equal( 1 );
+			expect( getIteratorCount( root.getChild( 1 ).getAttrs() ) ).to.equal( 1 );
 			expect( root.getChild( 1 ).getAttr( 'key' ) ).to.equal( 'value' );
 			expect( root.getChild( 1 ).getAttr( 'key' ) ).to.equal( 'value' );
 			expect( root.getChild( 1 ).getChild( 0 ).character ).to.equal( 'b' );
 			expect( root.getChild( 1 ).getChild( 0 ).character ).to.equal( 'b' );
 			expect( root.getChild( 1 ).getChild( 1 ).character ).to.equal( 'a' );
 			expect( root.getChild( 1 ).getChild( 1 ).character ).to.equal( 'a' );
@@ -70,7 +70,7 @@ describe( 'Transaction', () => {
 
 
 			expect( root.getChild( 0 ).name ).to.equal( 'p' );
 			expect( root.getChild( 0 ).name ).to.equal( 'p' );
 			expect( root.getChild( 0 ).getChildCount() ).to.equal( 6 );
 			expect( root.getChild( 0 ).getChildCount() ).to.equal( 6 );
-			expect( getIteratorCount( root.getChild( 0 ).getAttrIterator() ) ).to.equal( 1 );
+			expect( getIteratorCount( root.getChild( 0 ).getAttrs() ) ).to.equal( 1 );
 			expect( root.getChild( 0 ).getAttr( 'key' ) ).to.equal( 'value' );
 			expect( root.getChild( 0 ).getAttr( 'key' ) ).to.equal( 'value' );
 			expect( root.getChild( 0 ).getChild( 0 ).character ).to.equal( 'f' );
 			expect( root.getChild( 0 ).getChild( 0 ).character ).to.equal( 'f' );
 			expect( root.getChild( 0 ).getChild( 1 ).character ).to.equal( 'o' );
 			expect( root.getChild( 0 ).getChild( 1 ).character ).to.equal( 'o' );
@@ -81,7 +81,7 @@ describe( 'Transaction', () => {
 
 
 			expect( root.getChild( 1 ).name ).to.equal( 'p' );
 			expect( root.getChild( 1 ).name ).to.equal( 'p' );
 			expect( root.getChild( 1 ).getChildCount() ).to.equal( 0 );
 			expect( root.getChild( 1 ).getChildCount() ).to.equal( 0 );
-			expect( getIteratorCount( root.getChild( 1 ).getAttrIterator() ) ).to.equal( 1 );
+			expect( getIteratorCount( root.getChild( 1 ).getAttrs() ) ).to.equal( 1 );
 			expect( root.getChild( 1 ).getAttr( 'key' ) ).to.equal( 'value' );
 			expect( root.getChild( 1 ).getAttr( 'key' ) ).to.equal( 'value' );
 		} );
 		} );
 
 

+ 2 - 2
packages/ckeditor5-utils/tests/document/element.js

@@ -38,7 +38,7 @@ describe( 'Element', () => {
 			expect( element ).to.be.an.instanceof( Node );
 			expect( element ).to.be.an.instanceof( Node );
 			expect( element ).to.have.property( 'name' ).that.equals( 'elem' );
 			expect( element ).to.have.property( 'name' ).that.equals( 'elem' );
 			expect( element ).to.have.property( 'parent' ).that.equals( parent );
 			expect( element ).to.have.property( 'parent' ).that.equals( parent );
-			expect( getIteratorCount( element.getAttrIterator() ) ).to.equal( 0 );
+			expect( getIteratorCount( element.getAttrs() ) ).to.equal( 0 );
 		} );
 		} );
 
 
 		it( 'should create element with attributes', () => {
 		it( 'should create element with attributes', () => {
@@ -50,7 +50,7 @@ describe( 'Element', () => {
 			expect( element ).to.be.an.instanceof( Node );
 			expect( element ).to.be.an.instanceof( Node );
 			expect( element ).to.have.property( 'name' ).that.equals( 'elem' );
 			expect( element ).to.have.property( 'name' ).that.equals( 'elem' );
 			expect( element ).to.have.property( 'parent' ).that.equals( parent );
 			expect( element ).to.have.property( 'parent' ).that.equals( parent );
-			expect( getIteratorCount( element.getAttrIterator() ) ).to.equal( 1 );
+			expect( getIteratorCount( element.getAttrs() ) ).to.equal( 1 );
 			expect( element.getAttr( attr.key ) ).to.equal( attr.value );
 			expect( element.getAttr( attr.key ) ).to.equal( attr.value );
 		} );
 		} );
 
 

+ 8 - 8
packages/ckeditor5-utils/tests/document/node.js

@@ -107,8 +107,8 @@ describe( 'Node', () => {
 
 
 			foo.removeAttr( 'attr' );
 			foo.removeAttr( 'attr' );
 
 
-			expect( getIteratorCount( foo.getAttrIterator() ) ).to.equal( 0 );
-			expect( getIteratorCount( bar.getAttrIterator() ) ).to.equal( 1 );
+			expect( getIteratorCount( foo.getAttrs() ) ).to.equal( 0 );
+			expect( getIteratorCount( bar.getAttrs() ) ).to.equal( 1 );
 		} );
 		} );
 	} );
 	} );
 
 
@@ -136,7 +136,7 @@ describe( 'Node', () => {
 
 
 			element.setAttr( attr );
 			element.setAttr( attr );
 
 
-			expect( getIteratorCount( element.getAttrIterator() ) ).to.equal( 1 );
+			expect( getIteratorCount( element.getAttrs() ) ).to.equal( 1 );
 			expect( element.getAttr( attr.key ) ).to.equal( attr.value );
 			expect( element.getAttr( attr.key ) ).to.equal( attr.value );
 		} );
 		} );
 
 
@@ -147,7 +147,7 @@ describe( 'Node', () => {
 
 
 			element.setAttr( newAttr );
 			element.setAttr( newAttr );
 
 
-			expect( getIteratorCount( element.getAttrIterator() ) ).to.equal( 1 );
+			expect( getIteratorCount( element.getAttrs() ) ).to.equal( 1 );
 			expect( element.getAttr( newAttr.key ) ).to.equal( newAttr.value );
 			expect( element.getAttr( newAttr.key ) ).to.equal( newAttr.value );
 		} );
 		} );
 	} );
 	} );
@@ -161,7 +161,7 @@ describe( 'Node', () => {
 
 
 			element.removeAttr( attrB.key );
 			element.removeAttr( attrB.key );
 
 
-			expect( getIteratorCount( element.getAttrIterator() ) ).to.equal( 2 );
+			expect( getIteratorCount( element.getAttrs() ) ).to.equal( 2 );
 			expect( element.getAttr( attrA.key ) ).to.equal( attrA.value );
 			expect( element.getAttr( attrA.key ) ).to.equal( attrA.value );
 			expect( element.getAttr( attrC.key ) ).to.equal( attrC.value );
 			expect( element.getAttr( attrC.key ) ).to.equal( attrC.value );
 			expect( element.getAttr( attrB.key ) ).to.be.null;
 			expect( element.getAttr( attrB.key ) ).to.be.null;
@@ -210,7 +210,7 @@ describe( 'Node', () => {
 		} );
 		} );
 	} );
 	} );
 
 
-	describe( 'getAttrIterator', () => {
+	describe( 'getAttrs', () => {
 		it( 'should allows to get attribute count', () => {
 		it( 'should allows to get attribute count', () => {
 			let element = new Element( 'foo', [
 			let element = new Element( 'foo', [
 				new Attribute( 1, true ),
 				new Attribute( 1, true ),
@@ -218,12 +218,12 @@ describe( 'Node', () => {
 				new Attribute( 3, true )
 				new Attribute( 3, true )
 			] );
 			] );
 
 
-			expect( getIteratorCount( element.getAttrIterator() ) ).to.equal( 3 );
+			expect( getIteratorCount( element.getAttrs() ) ).to.equal( 3 );
 		} );
 		} );
 
 
 		it( 'should allows to copy attributes', () => {
 		it( 'should allows to copy attributes', () => {
 			let element = new Element( 'foo', [ new Attribute( 'x', true ) ] );
 			let element = new Element( 'foo', [ new Attribute( 'x', true ) ] );
-			let copy = new Element( 'bar', element.getAttrIterator() );
+			let copy = new Element( 'bar', element.getAttrs() );
 
 
 			expect( copy.getAttr( 'x' ) ).to.be.true;
 			expect( copy.getAttr( 'x' ) ).to.be.true;
 		} );
 		} );

+ 16 - 16
packages/ckeditor5-utils/tests/document/operation/changeoperation.js

@@ -63,7 +63,7 @@ describe( 'ChangeOperation', () => {
 		expect( root.getChildCount() ).to.equal( 3 );
 		expect( root.getChildCount() ).to.equal( 3 );
 		expect( root.getChild( 0 ).hasAttr( newAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( newAttr ) ).to.be.true;
 		expect( root.getChild( 1 ).hasAttr( newAttr ) ).to.be.true;
 		expect( root.getChild( 1 ).hasAttr( newAttr ) ).to.be.true;
-		expect( getIteratorCount( root.getChild( 2 ).getAttrIterator() ) ).to.equal( 0 );
+		expect( getIteratorCount( root.getChild( 2 ).getAttrs() ) ).to.equal( 0 );
 	} );
 	} );
 
 
 	it( 'should add attribute to the existing attributes', () => {
 	it( 'should add attribute to the existing attributes', () => {
@@ -84,7 +84,7 @@ describe( 'ChangeOperation', () => {
 
 
 		expect( doc.version ).to.equal( 1 );
 		expect( doc.version ).to.equal( 1 );
 		expect( root.getChildCount() ).to.equal( 1 );
 		expect( root.getChildCount() ).to.equal( 1 );
-		expect( getIteratorCount( root.getChild( 0 ).getAttrIterator() ) ).to.equal( 3 );
+		expect( getIteratorCount( root.getChild( 0 ).getAttrs() ) ).to.equal( 3 );
 		expect( root.getChild( 0 ).hasAttr( newAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( newAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( fooAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( fooAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( barAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( barAttr ) ).to.be.true;
@@ -107,11 +107,11 @@ describe( 'ChangeOperation', () => {
 
 
 		expect( doc.version ).to.equal( 1 );
 		expect( doc.version ).to.equal( 1 );
 		expect( root.getChildCount() ).to.equal( 3 );
 		expect( root.getChildCount() ).to.equal( 3 );
-		expect( getIteratorCount( root.getChild( 0 ).getAttrIterator() ) ).to.equal( 1 );
+		expect( getIteratorCount( root.getChild( 0 ).getAttrs() ) ).to.equal( 1 );
 		expect( root.getChild( 0 ).hasAttr( newAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( newAttr ) ).to.be.true;
-		expect( getIteratorCount( root.getChild( 1 ).getAttrIterator() ) ).to.equal( 1 );
+		expect( getIteratorCount( root.getChild( 1 ).getAttrs() ) ).to.equal( 1 );
 		expect( root.getChild( 1 ).hasAttr( newAttr ) ).to.be.true;
 		expect( root.getChild( 1 ).hasAttr( newAttr ) ).to.be.true;
-		expect( getIteratorCount( root.getChild( 2 ).getAttrIterator() ) ).to.equal( 1 );
+		expect( getIteratorCount( root.getChild( 2 ).getAttrs() ) ).to.equal( 1 );
 		expect( root.getChild( 2 ).hasAttr( oldAttr ) ).to.be.true;
 		expect( root.getChild( 2 ).hasAttr( oldAttr ) ).to.be.true;
 	} );
 	} );
 
 
@@ -134,7 +134,7 @@ describe( 'ChangeOperation', () => {
 
 
 		expect( doc.version ).to.equal( 1 );
 		expect( doc.version ).to.equal( 1 );
 		expect( root.getChildCount() ).to.equal( 1 );
 		expect( root.getChildCount() ).to.equal( 1 );
-		expect( getIteratorCount( root.getChild( 0 ).getAttrIterator() ) ).to.equal( 3 );
+		expect( getIteratorCount( root.getChild( 0 ).getAttrs() ) ).to.equal( 3 );
 		expect( root.getChild( 0 ).hasAttr( fooAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( fooAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( x2Attr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( x2Attr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( barAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( barAttr ) ).to.be.true;
@@ -158,7 +158,7 @@ describe( 'ChangeOperation', () => {
 
 
 		expect( doc.version ).to.equal( 1 );
 		expect( doc.version ).to.equal( 1 );
 		expect( root.getChildCount() ).to.equal( 1 );
 		expect( root.getChildCount() ).to.equal( 1 );
-		expect( getIteratorCount( root.getChild( 0 ).getAttrIterator() ) ).to.equal( 2 );
+		expect( getIteratorCount( root.getChild( 0 ).getAttrs() ) ).to.equal( 2 );
 		expect( root.getChild( 0 ).hasAttr( fooAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( fooAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( barAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( barAttr ) ).to.be.true;
 	} );
 	} );
@@ -196,9 +196,9 @@ describe( 'ChangeOperation', () => {
 
 
 		expect( doc.version ).to.equal( 2 );
 		expect( doc.version ).to.equal( 2 );
 		expect( root.getChildCount() ).to.equal( 3 );
 		expect( root.getChildCount() ).to.equal( 3 );
-		expect( getIteratorCount( root.getChild( 0 ).getAttrIterator() ) ).to.equal( 0 );
-		expect( getIteratorCount( root.getChild( 1 ).getAttrIterator() ) ).to.equal( 0 );
-		expect( getIteratorCount( root.getChild( 2 ).getAttrIterator() ) ).to.equal( 0 );
+		expect( getIteratorCount( root.getChild( 0 ).getAttrs() ) ).to.equal( 0 );
+		expect( getIteratorCount( root.getChild( 1 ).getAttrs() ) ).to.equal( 0 );
+		expect( getIteratorCount( root.getChild( 2 ).getAttrs() ) ).to.equal( 0 );
 	} );
 	} );
 
 
 	it( 'should undo changing attribute by applying reverse operation', () => {
 	it( 'should undo changing attribute by applying reverse operation', () => {
@@ -222,11 +222,11 @@ describe( 'ChangeOperation', () => {
 
 
 		expect( doc.version ).to.equal( 2 );
 		expect( doc.version ).to.equal( 2 );
 		expect( root.getChildCount() ).to.equal( 3 );
 		expect( root.getChildCount() ).to.equal( 3 );
-		expect( getIteratorCount( root.getChild( 0 ).getAttrIterator() ) ).to.equal( 1 );
+		expect( getIteratorCount( root.getChild( 0 ).getAttrs() ) ).to.equal( 1 );
 		expect( root.getChild( 0 ).hasAttr( oldAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( oldAttr ) ).to.be.true;
-		expect( getIteratorCount( root.getChild( 1 ).getAttrIterator() ) ).to.equal( 1 );
+		expect( getIteratorCount( root.getChild( 1 ).getAttrs() ) ).to.equal( 1 );
 		expect( root.getChild( 1 ).hasAttr( oldAttr ) ).to.be.true;
 		expect( root.getChild( 1 ).hasAttr( oldAttr ) ).to.be.true;
-		expect( getIteratorCount( root.getChild( 2 ).getAttrIterator() ) ).to.equal( 1 );
+		expect( getIteratorCount( root.getChild( 2 ).getAttrs() ) ).to.equal( 1 );
 		expect( root.getChild( 2 ).hasAttr( oldAttr ) ).to.be.true;
 		expect( root.getChild( 2 ).hasAttr( oldAttr ) ).to.be.true;
 	} );
 	} );
 
 
@@ -250,11 +250,11 @@ describe( 'ChangeOperation', () => {
 
 
 		expect( doc.version ).to.equal( 2 );
 		expect( doc.version ).to.equal( 2 );
 		expect( root.getChildCount() ).to.equal( 3 );
 		expect( root.getChildCount() ).to.equal( 3 );
-		expect( getIteratorCount( root.getChild( 0 ).getAttrIterator() ) ).to.equal( 1 );
+		expect( getIteratorCount( root.getChild( 0 ).getAttrs() ) ).to.equal( 1 );
 		expect( root.getChild( 0 ).hasAttr( fooAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( fooAttr ) ).to.be.true;
-		expect( getIteratorCount( root.getChild( 1 ).getAttrIterator() ) ).to.equal( 1 );
+		expect( getIteratorCount( root.getChild( 1 ).getAttrs() ) ).to.equal( 1 );
 		expect( root.getChild( 1 ).hasAttr( fooAttr ) ).to.be.true;
 		expect( root.getChild( 1 ).hasAttr( fooAttr ) ).to.be.true;
-		expect( getIteratorCount( root.getChild( 2 ).getAttrIterator() ) ).to.equal( 1 );
+		expect( getIteratorCount( root.getChild( 2 ).getAttrs() ) ).to.equal( 1 );
 		expect( root.getChild( 2 ).hasAttr( fooAttr ) ).to.be.true;
 		expect( root.getChild( 2 ).hasAttr( fooAttr ) ).to.be.true;
 	} );
 	} );
 
 

+ 1 - 1
packages/ckeditor5-utils/tests/document/rootelement.js

@@ -35,7 +35,7 @@ describe( 'Element', () => {
 
 
 			expect( root ).to.be.an.instanceof( Element );
 			expect( root ).to.be.an.instanceof( Element );
 			expect( root ).to.have.property( 'document' ).that.equals( doc );
 			expect( root ).to.have.property( 'document' ).that.equals( doc );
-			expect( getIteratorCount( root.getAttrIterator() ) ).to.equal( 0 );
+			expect( getIteratorCount( root.getAttrs() ) ).to.equal( 0 );
 			expect( root.getChildCount() ).to.equal( 0 );
 			expect( root.getChildCount() ).to.equal( 0 );
 		} );
 		} );
 	} );
 	} );