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

Side by Side Diff: LayoutTests/fast/dom/MutationObserver/observe-exceptions.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 <html> 2 <html>
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <script src="../../js/resources/js-test-pre.js"></script> 5 <script src="../../js/resources/js-test-pre.js"></script>
6 <title></title> 6 <title></title>
7 </head> 7 </head>
8 <body> 8 <body>
9 <p id=description></p> 9 <p id=description></p>
10 <div id="console"></div> 10 <div id="console"></div>
11 <script> 11 <script>
12 12
13 function runTest() { 13 function runTest() {
14 window.observer = new WebKitMutationObserver(function(mutations) { }); 14 window.observer = new MutationObserver(function(mutations) { });
15 shouldThrow('observer.observe()'); 15 shouldThrow('observer.observe()');
16 shouldThrow('observer.observe(null)'); 16 shouldThrow('observer.observe(null)');
17 shouldThrow('observer.observe(undefined)'); 17 shouldThrow('observer.observe(undefined)');
18 shouldThrow('observer.observe(document.body)'); 18 shouldThrow('observer.observe(document.body)');
19 shouldThrow('observer.observe(document.body, null)'); 19 shouldThrow('observer.observe(document.body, null)');
20 shouldThrow('observer.observe(document.body, undefined)'); 20 shouldThrow('observer.observe(document.body, undefined)');
21 shouldThrow('observer.observe(null, {attributes: true})'); 21 shouldThrow('observer.observe(null, {attributes: true})');
22 shouldThrow('observer.observe(undefined, {attributes: true})'); 22 shouldThrow('observer.observe(undefined, {attributes: true})');
23 shouldThrow('observer.observe(document.body, {subtree: true})'); 23 shouldThrow('observer.observe(document.body, {subtree: true})');
24 shouldThrow('observer.observe(document.body, {childList: true, attributeOldV alue: true})'); 24 shouldThrow('observer.observe(document.body, {childList: true, attributeOldV alue: true})');
25 shouldThrow('observer.observe(document.body, {attributes: true, characterDat aOldValue: true})'); 25 shouldThrow('observer.observe(document.body, {attributes: true, characterDat aOldValue: true})');
26 shouldThrow('observer.observe(document.body, {characterData: true, attribute Filter: ["id"]})'); 26 shouldThrow('observer.observe(document.body, {characterData: true, attribute Filter: ["id"]})');
27 } 27 }
28 28
29 description('Test that WebKitMutationObserver.observe throws exceptions appropri ately'); 29 description('Test that WebKitMutationObserver.observe throws exceptions appropri ately');
30 30
31 runTest(); 31 runTest();
32 </script> 32 </script>
33 <script src="../../js/resources/js-test-post.js"></script> 33 <script src="../../js/resources/js-test-post.js"></script>
34 </body> 34 </body>
35 </html> 35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698