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

Unified Diff: sky/tests/mutation-observer/takeRecords.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/takeRecords.sky
diff --git a/sky/tests/mutation-observer/takeRecords.sky b/sky/tests/mutation-observer/takeRecords.sky
deleted file mode 100644
index ba8a274aec169a947bd03eff27d0d59040552e39..0000000000000000000000000000000000000000
--- a/sky/tests/mutation-observer/takeRecords.sky
+++ /dev/null
@@ -1,53 +0,0 @@
-<html>
-<import src="../resources/chai.sky" />
-<import src="../resources/mocha.sky" />
-<script>
-describe('MutationObserver.takeRecords', function() {
- it('should allow taking records synchronously or getting a notification', function(done) {
- var mutations;
- var div;
- var subDiv;
- var observer;
-
- // Testing takeRecords.
- mutations = null;
- div = document.createElement('div');
- subDiv = div.appendChild(document.createElement('div'));
- subDiv.textContent = 'hello, world';
- observer = new MutationObserver(function(records) {
- mutations = records;
- });
-
- observer.observe(div, {attributes: true, characterData: true, subtree: true});
- subDiv.setAttribute('foo', 'bar');
- subDiv.firstChild.textContent = 'goodbye!';
- div.removeChild(subDiv);
-
- mutations = observer.takeRecords();
-
- // ...records are taken synchronously.
-
- assert.equal(mutations.length, 2);
- assert.equal(mutations[0].type, "attributes");
- assert.equal(mutations[0].target, subDiv);
- assert.equal(mutations[0].attributeName, "foo");
- assert.equal(mutations[1].type, "characterData");
- assert.equal(mutations[1].target, subDiv.firstChild);
-
- subDiv.setAttribute('foo', 'baz');
-
- setTimeout(function() {
- // ...takeRecord took records, but did not clear transient observers.
-
- assert.equal(mutations.length, 1);
- assert.equal(mutations[0].type, "attributes");
- assert.equal(mutations[0].target, subDiv);
- assert.equal(mutations[0].attributeName, "foo");
- observer.disconnect();
-
- done();
- }, 0);
- });
-});
-</script>
-</html>
« no previous file with comments | « sky/tests/mutation-observer/shadow-dom-expected.txt ('k') | sky/tests/mutation-observer/takeRecords-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698