Skip to content

Commit

Permalink
Manual port of: FBTest for issue 4893
Browse files Browse the repository at this point in the history
  • Loading branch information
janodvarko committed Apr 12, 2013
1 parent cf4d060 commit bcf9b68
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/content/css/4893/issue4893.css
@@ -0,0 +1 @@
body{font-family:Arial,sans-serif;background:#EEE;color:#333;margin:0;padding:0;}
27 changes: 27 additions & 0 deletions tests/content/css/4893/issue4893.html
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<title>Issue 4893: CSS panel doesn't display contents of CSS file after reload</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link href="issue4893.css" rel="stylesheet" type="text/css">
<link href="../../_common/testcase.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<header>
<h1><a href="http://code.google.com/p/fbug/issues/detail?id=4893">Issue 4893</a>:
CSS panel doesn't display contents of CSS file after reload</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>Refresh the page by pressing F5.</li>
<li>Check out CSS panel content. It should display CSS rule for <i>body</i>.</li>
</ol>
</section>
<footer>Jan Odvarko, odvarko@gmail.com</footer>
</div>
</body>
</html>
36 changes: 36 additions & 0 deletions tests/content/css/4893/issue4893.js
@@ -0,0 +1,36 @@
function runTest()
{
FBTest.sysout("issue4893.START");
FBTest.openNewTab(basePath + "css/4893/issue4893.html", function(win)
{
FBTest.openFirebug();
FBTest.selectPanel("stylesheet");

// Catch the first page load and Style panel update.
waitForCssRules(function()
{
// Reload the page.
FBTest.reload(function()
{
// Catch the second style update
waitForCssRules(function()
{
FBTest.testDone("issue4893.DONE");
});
});
});
});
}

function waitForCssRules(callback)
{
var config = {tagName: "div", classes: "cssEditableRule"};
FBTest.waitForDisplayedElement("stylesheet", config, function(row)
{
var panel = FBTest.selectSidePanel("stylesheet");
var nodes = panel.panelNode.querySelectorAll(".cssEditableRule");
FBTest.compare(1, nodes.length, "There must be one style");

callback();
});
}
1 change: 1 addition & 0 deletions tests/content/firebug.html
Expand Up @@ -239,6 +239,7 @@
{group: "css", uri: "css/5644/issue5644.js", desc: "Editing a disabled property makes another", testPage: "css/5644/issue5644.html"},
{group: "css", uri: "css/6281/issue6281.js", desc: "Placeholder rules are no longer displayed in HTML Style tab.", testPage: "css/6281/issue6281.html"},
{group: "css", uri: "css/6282/issue6282.js", desc: "CSS panel fails on interpreting @page", testPage: "css/6282/issue6282.html"},
{group: "css", uri: "css/4893/issue4893.js", desc: " CSS panel doesn't display contents of CSS file after reload", testPage: "css/4893/issue4893.html"},
{group: "css/computed", uri: "css/computed/3207/issue3207.js", desc: "CSS properties in the \"Computed\" tab are not updated correctly", testPage: "css/computed/3207/issue3207.html"},
{group: "css/computed", uri: "css/computed/4132/issue4132.js", desc: "Only show applied styles in Computed side panel", testPage: "css/computed/4132/issue4132.html"},
{group: "css/computed", uri: "css/computed/5449/issue5449.js", desc: "Show infotips in Computed side panel", testPage: "css/computed/5449/issue5449.html"},
Expand Down

0 comments on commit bcf9b68

Please sign in to comment.