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

Unified Diff: sky/tests/mutation-observer/cross-document.html

Issue 685623002: Move the tests from .html to .sky (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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/cross-document.html
diff --git a/sky/tests/mutation-observer/cross-document.html b/sky/tests/mutation-observer/cross-document.html
deleted file mode 100644
index 56ec130d2d63b3b6064d856730381d1acff6af2d..0000000000000000000000000000000000000000
--- a/sky/tests/mutation-observer/cross-document.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<html>
-<link rel="import" href="../resources/chai.html" />
-<link rel="import" href="../resources/mocha.html" />
-<script>
-describe('MutationObserver cross document moves', function() {
- it('should handle basic observation', function(done) {
- var mutations;
- var div = document.createElement('div');
- var observer = new MutationObserver(function(records) {
- mutations = records;
- });
-
- observer.observe(div, {attributes: true});
- var newDoc = document.implementation.createDocument('', '', null);
- newDoc.appendChild(div);
- div.id = 'foo';
- setTimeout(function() {
- assert.equal(mutations.length, 1);
- assert.equal(mutations[0].type, 'attributes');
- assert.equal(mutations[0].target, div);
- assert.equal(mutations[0].attributeName, 'id');
- observer.disconnect();
- done();
- }, 0);
- });
- it('should handle subtree observation', function(done) {
- var mutations;
- var div = document.createElement('div');
- var subDiv = div.appendChild(document.createElement('div'));
- var observer = new MutationObserver(function(records) {
- mutations = records;
- });
-
- observer.observe(div, {attributes: true, subtree: true});
- var newDoc = document.implementation.createDocument();
- newDoc.appendChild(div);
- subDiv.id = 'foo';
- setTimeout(function() {
- assert.equal(mutations.length, 1);
- assert.equal(mutations[0].type, 'attributes');
- assert.equal(mutations[0].target, subDiv);
- assert.equal(mutations[0].attributeName, 'id');
- observer.disconnect();
- done();
- }, 0);
- });
-});
-</script>
-</html>
« no previous file with comments | « sky/tests/mutation-observer/create-during-delivery.sky ('k') | sky/tests/mutation-observer/cross-document.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698