Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / debugger / mutation-observer-suspend-while-paused.html
blob1cb5d91d97430ace7cc765f51988ec482a239929
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/console-test.js"></script>
5 <script src="../../../http/tests/inspector/debugger-test.js"></script>
6 <script>
8 var test = function()
10 var setup =
11 "window.testDiv = document.createElement('div');\n" +
12 "window.deliveryCount = 0;\n" +
13 "var observer = new WebKitMutationObserver(function(records) {\n" +
14 " window.deliveryCount++;\n" +
15 "});\n" +
16 "observer.observe(window.testDiv, { attributes: true });";
18 var mutateAndPause =
19 "function mutateAndPause() {\n" +
20 " window.testDiv.setAttribute('foo', 'baz');\n" +
21 " debugger;\n" +
22 "};\n" +
23 "setTimeout(mutateAndPause, 0);";
25 InspectorTest.startDebuggerTest(step1);
27 function step1()
29 InspectorTest.evaluateInPage(setup, function() {
30 InspectorTest.addResult("DIV and observer setup.");
31 InspectorTest.evaluateInConsoleAndDump("deliveryCount", step2);
32 });
35 function step2()
37 InspectorTest.evaluateInPage("window.testDiv.setAttribute('foo', 'bar')", function() {
38 InspectorTest.addResult("setAttribute should have triggered delivery.");
39 InspectorTest.evaluateInConsoleAndDump("deliveryCount", step3);
40 });
43 function step3()
45 InspectorTest.evaluateInPage(mutateAndPause, InspectorTest.addResult.bind(InspectorTest, "mutateAndPause invoked."));
46 InspectorTest.waitUntilPaused(step4);
49 function step4() {
50 InspectorTest.addResult("Delivery should not have taken place.");
51 InspectorTest.evaluateInConsoleAndDump("deliveryCount", function() {
52 InspectorTest.resumeExecution(step5);
53 });
56 function step5() {
57 InspectorTest.addResult("Second delivery should now have happened.");
58 InspectorTest.evaluateInConsoleAndDump("deliveryCount", InspectorTest.completeDebuggerTest);
62 </script>
63 </head>
65 <body onload="runTest()">
66 <p>
67 Tests that DOM Mutation Observers do not attempt to deliver mutation records while the debugger is paused.<a href="https://bugs.webkit.org/show_bug.cgi?id=105810">Bug 105810</a>
68 </p>
70 </body>
71 </html>