Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: sky/tests/mutation-observer/document-fragment-insertion.sky

Issue 920343002: Delete Sky tests that we're not going to run with Dart (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sky/tests/mutation-observer/document-fragment-insertion.sky
diff --git a/sky/tests/mutation-observer/document-fragment-insertion.sky b/sky/tests/mutation-observer/document-fragment-insertion.sky
deleted file mode 100644
index ddaff1c1104dc28832c13c80251cc358f01ca1f0..0000000000000000000000000000000000000000
--- a/sky/tests/mutation-observer/document-fragment-insertion.sky
+++ /dev/null
@@ -1,69 +0,0 @@
-<html>
-<import src="../resources/mocha.sky" />
-<import src="../resources/chai.sky" />
-<script>
-describe('DocumentFragments should remove all children of the fragment before moving children, ', function() {
- var mutations;
- var observer;
-
- beforeEach(function() {
- mutations = null;
- observer = new MutationObserver(function(records) {
- mutations = records;
- });
- });
-
- function createObservedFragment() {
- var fragment = document.createDocumentFragment();
- fragment.appendChild(document.createElement('b'));
- fragment.appendChild(document.createElement('i'));
- observer.observe(fragment, {childList: true});
- return fragment;
- }
-
- it('using appendChild', function(done) {
- var div = document.createElement('div');
- observer.observe(div, {childList: true});
- div.appendChild(createObservedFragment());
- setTimeout(function() {
- assert.equal(mutations.length, 2);
- assert.equal(mutations[0].addedNodes.length, 0);
- assert.equal(mutations[0].removedNodes.length, 2);
- assert.equal(mutations[1].addedNodes.length, 2);
- assert.equal(mutations[1].removedNodes.length, 0);
- done();
- }, 0);
- });
-
- it('using insertBefore', function(done) {
- var div = document.createElement('div');
- div.appendChild(document.createElement('span'));
- observer.observe(div, {childList: true});
- div.insertBefore(createObservedFragment(), div.firstChild);
- setTimeout(function() {
- assert.equal(mutations.length, 2);
- assert.equal(mutations[0].addedNodes.length, 0);
- assert.equal(mutations[0].removedNodes.length, 2);
- assert.equal(mutations[1].addedNodes.length, 2);
- assert.equal(mutations[1].removedNodes.length, 0);
- done();
- }, 0);
- });
-
- it('using replaceChild', function(done) {
- var div = document.createElement('div');
- div.appendChild(document.createElement('span'));
- observer.observe(div, {childList: true});
- div.replaceChild(createObservedFragment(), div.firstChild);
- setTimeout(function() {
- assert.equal(mutations.length, 2);
- assert.equal(mutations[0].addedNodes.length, 0);
- assert.equal(mutations[0].removedNodes.length, 2);
- assert.equal(mutations[1].addedNodes.length, 2);
- assert.equal(mutations[1].removedNodes.length, 1);
- done();
- }, 0);
- });
-});
-</script>
-</html>

Powered by Google App Engine
This is Rietveld 408576698