3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
10 "window.testDiv = document.createElement('div');\n" +
11 "window.deliveryCount = 0;\n" +
12 "var observer = new WebKitMutationObserver(function(records) {\n" +
13 " window.deliveryCount++;\n" +
15 "observer.observe(window.testDiv, { attributes: true });";
18 "function mutateAndPause() {\n" +
19 " window.testDiv.setAttribute('foo', 'baz');\n" +
22 "setTimeout(mutateAndPause, 0);";
24 InspectorTest.startDebuggerTest(step1);
28 InspectorTest.evaluateInConsole(setup, function() {
29 InspectorTest.addResult("DIV and observer setup.");
30 InspectorTest.evaluateInConsoleAndDump("deliveryCount", step2);
36 InspectorTest.evaluateInConsole("window.testDiv.setAttribute('foo', 'bar')", function() {
37 InspectorTest.addResult("setAttribute should have triggered delivery.");
38 InspectorTest.evaluateInConsoleAndDump("deliveryCount", step3);
44 InspectorTest.evaluateInConsole(mutateAndPause, InspectorTest.addResult.bind(InspectorTest, "mutateAndPause invoked."));
45 InspectorTest.waitUntilPaused(step4);
49 InspectorTest.addResult("Delivery should not have taken place.");
50 InspectorTest.evaluateInConsoleAndDump("deliveryCount", function() {
51 InspectorTest.resumeExecution(step5);
56 InspectorTest.addResult("Second delivery should now have happened.");
57 InspectorTest.evaluateInConsoleAndDump("deliveryCount", InspectorTest.completeDebuggerTest);
64 <body onload="runTest()">
66 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>