1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 window.addEventListener('DOMContentLoaded', function() {
6 var body = document.body;
7 var div = body.appendChild(document.createElement('div'));
8 var input1 = body.appendChild(document.createElement('input'));
9 var input2 = body.appendChild(document.createElement('input'));
12 input1.addEventListener('blur', function() {
13 div.setAttribute('baz', 'bat');
17 var mutationsDelivered = false;
19 var observer = new MutationObserver(function() {
20 mutationsDelivered = true;
22 chrome.test.succeed();
24 observer.observe(document, { subtree: true, attributes: true });
26 // The getAll callback should be counted as a V8RecursionScope and cause
27 // the delivery of MutationRecords to be delayed until it has exited.
28 chrome.windows.getAll(function() {
29 div.setAttribute('foo', 'bar');
31 if (mutationsDelivered)