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

Side by Side Diff: sky/tests/mutation-observer/observer-wrapper-dropoff.sky

Issue 685623002: Move the tests from .html to .sky (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <script src="../../../resources/js-test.js"></script> 3 <script src="../../../resources/js-test.js"></script>
4 4
5 <script> 5 <script>
6 description('MutationObserver wrappers should survive GC for passing into the ca llback even if JS has lost references.'); 6 description('MutationObserver wrappers should survive GC for passing into the ca llback even if JS has lost references.');
7 7
8 jsTestIsAsync = true; 8 jsTestIsAsync = true;
9 9
10 function addObserver(node, fn) { 10 function addObserver(node, fn) {
11 var observer = new MutationObserver(fn); 11 var observer = new MutationObserver(fn);
12 observer.testProperty = true; 12 observer.testProperty = true;
13 observer.observe(node, {attributes:true}); 13 observer.observe(node, {attributes:true});
14 } 14 }
15 15
16 window.addEventListener("load", function() { 16 window.addEventListener("load", function() {
17 addObserver(document.body, function(records, observer) { 17 addObserver(document.body, function(records, observer) {
18 window.observer = observer; 18 window.observer = observer;
19 shouldBe('observer.testProperty', 'true'); 19 shouldBe('observer.testProperty', 'true');
20 finishJSTest(); 20 finishJSTest();
21 }); 21 });
22 22
23 gc(); 23 gc();
24 24
25 document.body.setAttribute('touch', 'the node'); 25 document.body.setAttribute('touch', 'the node');
26 }); 26 });
27 </script> 27 </script>
28 28
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698