Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manual port of: FBTest for issue 4893
- Loading branch information
1 parent
cf4d060
commit bcf9b68
Showing
4 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
body{font-family:Arial,sans-serif;background:#EEE;color:#333;margin:0;padding:0;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters