aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng
diff options
context:
space:
mode:
Diffstat (limited to 'test/ng')
-rwxr-xr-xtest/ng/compileSpec.js8
-rw-r--r--test/ng/directive/formSpec.js2
-rw-r--r--test/ng/directive/ngIncludeSpec.js8
3 files changed, 9 insertions, 9 deletions
diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js
index 853290a6..1b98cd58 100755
--- a/test/ng/compileSpec.js
+++ b/test/ng/compileSpec.js
@@ -170,26 +170,26 @@ describe('$compile', function() {
// First with only elements at the top level
element = jqLite('<div><div></div></div>');
$compile(element.contents())($rootScope);
- element.html('');
+ element.empty();
expect(calcCacheSize()).toEqual(0);
// Next with non-empty text nodes at the top level
// (in this case the compiler will wrap them in a <span>)
element = jqLite('<div>xxx</div>');
$compile(element.contents())($rootScope);
- element.html('');
+ element.empty();
expect(calcCacheSize()).toEqual(0);
// Next with comment nodes at the top level
element = jqLite('<div><!-- comment --></div>');
$compile(element.contents())($rootScope);
- element.html('');
+ element.empty();
expect(calcCacheSize()).toEqual(0);
// Finally with empty text nodes at the top level
element = jqLite('<div> \n<div></div> </div>');
$compile(element.contents())($rootScope);
- element.html('');
+ element.empty();
expect(calcCacheSize()).toEqual(0);
});
diff --git a/test/ng/directive/formSpec.js b/test/ng/directive/formSpec.js
index 77beb2fd..dde6f0a0 100644
--- a/test/ng/directive/formSpec.js
+++ b/test/ng/directive/formSpec.js
@@ -216,7 +216,7 @@ describe('form', function() {
// yes, I know, scope methods should not do direct DOM manipulation, but I wanted to keep
// this test small. Imagine that the destroy action will cause a model change (e.g.
// $location change) that will cause some directive to destroy the dom (e.g. ngView+$route)
- doc.html('');
+ doc.empty();
destroyed = true;
}
diff --git a/test/ng/directive/ngIncludeSpec.js b/test/ng/directive/ngIncludeSpec.js
index 9e0a47b0..79e7f312 100644
--- a/test/ng/directive/ngIncludeSpec.js
+++ b/test/ng/directive/ngIncludeSpec.js
@@ -47,7 +47,7 @@ describe('ngInclude', function() {
$rootScope.url = 'myUrl';
$rootScope.$digest();
expect(body.text()).toEqual('misko');
- body.html('');
+ body.empty();
}));
@@ -60,7 +60,7 @@ describe('ngInclude', function() {
$rootScope.url = 'myUrl';
$rootScope.$digest();
expect(element.text()).toEqual('Alibaba');
- jqLite(document.body).html('');
+ jqLite(document.body).empty();
}));
@@ -74,7 +74,7 @@ describe('ngInclude', function() {
expect(function() { $rootScope.$digest(); }).toThrowMinErr(
'$sce', 'insecurl',
/Blocked loading resource from url not allowed by \$sceDelegate policy. URL: http:\/\/example.com\/myUrl.*/);
- jqLite(document.body).html('');
+ jqLite(document.body).empty();
}));
@@ -88,7 +88,7 @@ describe('ngInclude', function() {
expect(function() { $rootScope.$digest(); }).toThrowMinErr(
'$sce', 'insecurl',
/Blocked loading resource from url not allowed by \$sceDelegate policy. URL: http:\/\/example.com\/myUrl.*/);
- jqLite(document.body).html('');
+ jqLite(document.body).empty();
}));