[Pkg-mozext-commits] [firebug] 08/68: FBTest for issue 6283 (Console and DOM panel fail on interpreting @page) http://code.google.com/p/fbug/issues/detail?id=6283
David Prévot
taffit at moszumanska.debian.org
Mon Mar 31 22:45:49 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag fbtest-1.11.4
in repository firebug.
commit fa80663cde89311c5b887f51eb5d4e9c96207b43
Author: Sebastian Zartner <sebastianzartner at gmail.com>
Date: Thu Feb 21 22:54:31 2013 +0100
FBTest for issue 6283 (Console and DOM panel fail on interpreting @page)
http://code.google.com/p/fbug/issues/detail?id=6283
---
tests/content/dom/6283/issue6283.html | 40 +++++++++++++++++++++++
tests/content/dom/6283/issue6283.js | 61 +++++++++++++++++++++++++++++++++++
tests/content/firebug.html | 1 +
3 files changed, 102 insertions(+)
diff --git a/tests/content/dom/6283/issue6283.html b/tests/content/dom/6283/issue6283.html
new file mode 100644
index 0000000..cc39cbb
--- /dev/null
+++ b/tests/content/dom/6283/issue6283.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Issue 6283: Console and DOM panel fail on interpreting @page</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <link href="../../_common/testcase.css" type="text/css" rel="stylesheet"/>
+ <style type="text/css">
+ @page {
+ margin: 0.5cm;
+ }
+ </style>
+ </head>
+ <body>
+ <header>
+ <h1><a href="http://code.google.com/p/fbug/issues/detail?id=6283">Issue 6283</a>: Console and DOM panel fail on interpreting @page</h1>
+ </header>
+ <div>
+ <section id="description">
+ <h3>Steps to reproduce</h3>
+ <ol>
+ <li>Open Firebug</li>
+ <li>Switch to the <em>CSS</em> panel</li>
+ <li>Select <em>issue6283.html</em> from the Location Menu</li>
+ <li>
+ Right-click the Location Button and choose <em>Inspect in DOM panel</em> from the context menu<br/>
+ <span class="ok">⇒ Firebug should switch to the <em>DOM</em> panel and display the stylesheet</span>
+ </li>
+ <li>
+ Expand the <code>cssRules</code> property<br/>
+ </li>
+ </ol>
+ <h3>Expected result</h3>
+ <ul>
+ <li>There should be a <code>CSSPageRule</code> rule listed.</li>
+ </ul>
+ </section>
+ <footer>Sebastian Zartner, sebastianzartner at gmail.com</footer>
+ </div>
+ </body>
+</html>
diff --git a/tests/content/dom/6283/issue6283.js b/tests/content/dom/6283/issue6283.js
new file mode 100644
index 0000000..20a202c
--- /dev/null
+++ b/tests/content/dom/6283/issue6283.js
@@ -0,0 +1,61 @@
+function runTest()
+{
+ FBTest.sysout("issue6283.START");
+
+ FBTest.openNewTab(basePath + "dom/6283/issue6283.html", function(win)
+ {
+ FBTest.openFirebug();
+ var panel = FBTest.selectPanel("stylesheet");
+
+ if (FBTest.selectPanelLocationByName(panel, "issue6283.html"))
+ {
+ FBTest.executeContextMenuCommand(FW.Firebug.chrome.$("fbLocationList"),
+ "InspectIndomPanel", function()
+ {
+ // xxxHonza, xxxsz: hack that fixes this text on Mac. The panel can
+ // be selected asynchronously.
+ setTimeout(function() {
+ onInspect();
+ }, 1000);
+ });
+ }
+ else
+ {
+ FBTest.testDone("issue6283.DONE");
+ }
+ });
+}
+
+function onInspect()
+{
+ var panel = FBTest.getSelectedPanel();
+ if (FBTest.compare("dom", panel.name, "DOM panel must be selected now"))
+ {
+ var props = panel.panelNode.getElementsByClassName("memberLabel");
+ var prop;
+
+ for (var i=0; i<props.length; i++)
+ {
+ if (props[i].textContent == "cssRules")
+ {
+ prop = props[i];
+ break;
+ }
+ }
+
+ var config = {tagName: "tr", classes: "memberRow ordinalRow"};
+ FBTest.waitForDisplayedElement("dom", config, function(row)
+ {
+ var cssRulesLabel = panel.panelNode.
+ querySelectorAll(".memberRow.ordinalRow[level=\"1\"] .memberLabel").item(0);
+ var cssRuleValue = FW.FBL.getAncestorByClass(cssRulesLabel, "memberRow").
+ getElementsByClassName("memberValueCell").item(0);
+
+ FBTest.compare("CSSPageRule", cssRuleValue.textContent.trim(), "Rule must be displayed as CSSPageRule");
+
+ FBTest.testDone("issue6283.DONE");
+ });
+
+ FBTest.click(prop);
+ }
+}
diff --git a/tests/content/firebug.html b/tests/content/firebug.html
index db5b0fd..1e4a309 100644
--- a/tests/content/firebug.html
+++ b/tests/content/firebug.html
@@ -293,6 +293,7 @@ var testList = [
{group: "dom", uri: "dom/3597/issue3597.js", desc: "Issue 3597: Objects turned into string have their DOM panel representation messed up", testPage: "dom/3597/issue3597.html" },
{group: "dom", uri: "dom/4386/issue4386.js", desc: "DOM breakpoints can't be deleted or disabled/enabled from within the Breakpoints Side Panel", testPage: "dom/4386/issue4386.html" },
{group: "dom", uri: "dom/5247/issue5247.js", desc: "Add reps for different types of CSSRules", testPage: "dom/5247/issue5247.html" },
+ {group: "dom", uri: "dom/6283/issue6283.js", desc: "Console and DOM panel fail on interpreting @page", testPage: "dom/6283/issue6283.html" },
{group: "net", uri: "net/activation/activation.js", desc: "Verify Net panel content after activation on more tabs (Firebug opened within Firefox)." },
{group: "net", uri: "net/breakpoints/breakOnXHR.js", desc: "XHR Conditional Breakpoints", testPage: "net/breakpoints/breakOnXHR.html" },
{group: "net", uri: "net/breakpoints/breakOnXHRCB.js", desc: "XHR Conditional Breakpoints (Chromebug active)", testPage: "net/breakpoints/breakOnXHR.html" },
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git
More information about the Pkg-mozext-commits
mailing list