Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / MutationObserver / observe-exceptions.html
blob6019ad6f8097fed855d219dca900e72e837098fb
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../../../resources/js-test.js"></script>
6 <title></title>
7 </head>
8 <body>
9 <p id=description></p>
10 <div id="console"></div>
11 <script>
13 function runTest() {
14 window.observer = new MutationObserver(function(mutations) { });
15 shouldThrow('observer.observe()');
16 shouldThrow('observer.observe(null)');
17 shouldThrow('observer.observe(undefined)');
18 shouldThrow('observer.observe(document.body)');
19 shouldThrow('observer.observe(document.body, null)');
20 shouldThrow('observer.observe(document.body, undefined)');
21 shouldThrow('observer.observe(null, {attributes: true})');
22 shouldThrow('observer.observe(undefined, {attributes: true})');
23 shouldThrow('observer.observe(document.body, {subtree: true})');
25 shouldThrow('observer.observe(document.body, {attributes: false, attributeOldValue: true})');
26 shouldThrow('observer.observe(document.body, {attributes: false, attributeFilter: ["id"]})');
27 shouldThrow('observer.observe(document.body, {attributes: false, attributeOldValue: false})');
29 shouldThrow('observer.observe(document.body, {characterData: false, characterDataOldValue: true})');
30 shouldThrow('observer.observe(document.body, {characterData: false, characterDataOldValue: false})');
33 description('Test that WebKitMutationObserver.observe throws exceptions appropriately');
35 runTest();
36 </script>
37 </body>
38 </html>