1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/devtools/webconsole/test/browser_webconsole_reflow.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,35 @@ 1.4 +/* vim:set ts=2 sw=2 sts=2 et: */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +function test() 1.10 +{ 1.11 + addTab("data:text/html;charset=utf-8,Web Console test for reflow activity"); 1.12 + 1.13 + browser.addEventListener("load", function onLoad() { 1.14 + browser.removeEventListener("load", onLoad, true); 1.15 + openConsole(gBrowser.selectedTab, function(hud) { 1.16 + 1.17 + function onReflowListenersReady(aType, aPacket) { 1.18 + browser.contentDocument.body.style.display = "none"; 1.19 + browser.contentDocument.body.clientTop; 1.20 + } 1.21 + 1.22 + Services.prefs.setBoolPref("devtools.webconsole.filter.csslog", true); 1.23 + hud.ui._updateReflowActivityListener(onReflowListenersReady); 1.24 + Services.prefs.clearUserPref("devtools.webconsole.filter.csslog"); 1.25 + 1.26 + waitForMessages({ 1.27 + webconsole: hud, 1.28 + messages: [{ 1.29 + text: /reflow: /, 1.30 + category: CATEGORY_CSS, 1.31 + severity: SEVERITY_LOG, 1.32 + }], 1.33 + }).then(() => { 1.34 + finishTest(); 1.35 + }); 1.36 + }); 1.37 + }, true); 1.38 +}