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

Side by Side Diff: LayoutTests/fast/dom/MutationObserver/callback-arguments.html

Issue 12317072: Merge 143386 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body> 2 <body>
3 <script src="../../js/resources/js-test-pre.js"></script> 3 <script src="../../js/resources/js-test-pre.js"></script>
4 <script> 4 <script>
5 window.jsTestIsAsync = true; 5 window.jsTestIsAsync = true;
6 description('Verifies that MutationObserver is passed to the callback as expecte d.'); 6 description('Verifies that MutationObserver is passed to the callback as expecte d.');
7 7
8 function mutationCallback(mutations, observer) { 8 function mutationCallback(mutations, observer) {
9 window.thisArgument = this; 9 window.thisArgument = this;
10 window.argument2 = observer; 10 window.argument2 = observer;
11 shouldBe('thisArgument', 'mutationObserver'); 11 shouldBe('thisArgument', 'mutationObserver');
12 shouldBe('argument2', 'mutationObserver'); 12 shouldBe('argument2', 'mutationObserver');
13 finishJSTest(); 13 finishJSTest();
14 } 14 }
15 var mutationObserver = new WebKitMutationObserver(mutationCallback); 15 var mutationObserver = new MutationObserver(mutationCallback);
16 var div = document.createElement('div'); 16 var div = document.createElement('div');
17 mutationObserver.observe(div, {attributes: true}); 17 mutationObserver.observe(div, {attributes: true});
18 div.setAttribute('foo', 'bar'); 18 div.setAttribute('foo', 'bar');
19 </script> 19 </script>
20 <script src="../../js/resources/js-test-post.js"></script> 20 <script src="../../js/resources/js-test-post.js"></script>
21 </body> 21 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698