michael@0: /* vim:set ts=2 sw=2 sts=2 et: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: function test() michael@0: { michael@0: addTab("data:text/html;charset=utf-8,Web Console test for reflow activity"); michael@0: michael@0: browser.addEventListener("load", function onLoad() { michael@0: browser.removeEventListener("load", onLoad, true); michael@0: openConsole(gBrowser.selectedTab, function(hud) { michael@0: michael@0: function onReflowListenersReady(aType, aPacket) { michael@0: browser.contentDocument.body.style.display = "none"; michael@0: browser.contentDocument.body.clientTop; michael@0: } michael@0: michael@0: Services.prefs.setBoolPref("devtools.webconsole.filter.csslog", true); michael@0: hud.ui._updateReflowActivityListener(onReflowListenersReady); michael@0: Services.prefs.clearUserPref("devtools.webconsole.filter.csslog"); michael@0: michael@0: waitForMessages({ michael@0: webconsole: hud, michael@0: messages: [{ michael@0: text: /reflow: /, michael@0: category: CATEGORY_CSS, michael@0: severity: SEVERITY_LOG, michael@0: }], michael@0: }).then(() => { michael@0: finishTest(); michael@0: }); michael@0: }); michael@0: }, true); michael@0: }