Skip to content
Browse files

FBTest fixing css/5277, it passes on 1.10.4 but fails on 1.11 where a…

… patch related to CSS cropping must land yet
  • Loading branch information...
1 parent 0bad6a4 commit 94a16b3c4d29b0eedf2d5ffd216a4507e6687bb1 @janodvarko janodvarko committed Oct 9, 2012
Showing with 16 additions and 7 deletions.
  1. +1 −1 tests/content/css/5277/issue5277.html
  2. +15 −6 tests/content/css/5277/issue5277.js
View
2 tests/content/css/5277/issue5277.html
@@ -5,7 +5,7 @@
<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">
- @import "issue5277.css" screen and (min-width: 400px);
+ @import "issue5277.css" screen and (min-width: 500px);
#element1 {
width: 100px;
View
21 tests/content/css/5277/issue5277.js
@@ -10,7 +10,8 @@ function runTest()
// Resize browser window, so the media query doesn't apply
// and we can make a screenshot of the <div>
FBTest.setBrowerWindowSize(300 + border, win.outerHeight);
- var elementDisplaySmallWindow = FBTest.getImageDataFromNode(win.document.getElementById(id));
+ var elementDisplaySmallWindow = FBTest.getImageDataFromNode(
+ win.document.getElementById(id));
FBTest.openFirebug();
var panel = FBTest.selectPanel("stylesheet");
@@ -21,30 +22,38 @@ function runTest()
if (FBTest.compare(1, rows.length, "There must be one @import rule"))
{
var rule = rows.item(0);
- FBTest.compare("@import \"issue5277.css\" screen and (min-width: 400px);", rule.textContent, "The @import rule must contain the the media query");
+ FBTest.compare("@import \"issue5277.css\" screen and (min-width: 500px);",
+ rule.textContent, "The @import rule must contain the the media query");
// Resize browser window, so the media query applies
// and we can make a screenshot of the <div>
FBTest.setBrowerWindowSize(600 + border, win.outerHeight);
- var elementDisplayLargeWindow = FBTest.getImageDataFromNode(win.document.getElementById(id));
+ var elementDisplayLargeWindow = FBTest.getImageDataFromNode(
+ win.document.getElementById(id));
FBTest.synthesizeMouse(rule.getElementsByClassName("cssMediaQuery").item(0));
var editor = panel.panelNode.querySelector(".textEditorInner");
if (FBTest.ok(editor, "Editor must be available now"))
{
- FBTest.compare("screen and (min-width: 400px)", editor.value, "The editor must contain the media query");
+ FBTest.compare("screen and (min-width: 500px)", editor.value,
+ "The editor must contain the media query");
FBTest.sendString("screen and (min-width: 800px)", editor);
// Click outside the CSS selector to stop inline editing
FBTest.synthesizeMouse(panel.panelNode, 0, 0);
- FBTest.compare(elementDisplaySmallWindow, FBTest.getImageDataFromNode(win.document.getElementById(id)), "The div must be blue now");
+ FBTest.compare(elementDisplaySmallWindow,
+ FBTest.getImageDataFromNode(win.document.getElementById(id)),
+ "The div must be blue now");
// Resize browser window, so the media query applies again
FBTest.setBrowerWindowSize(900 + border, win.outerHeight);
- FBTest.compare(elementDisplayLargeWindow, FBTest.getImageDataFromNode(win.document.getElementById(id)), "The div must be green now");
+
+ FBTest.compare(elementDisplayLargeWindow,
+ FBTest.getImageDataFromNode(win.document.getElementById(id)),
+ "The div must be green now");
}
}
FBTest.testDone("issue5277.DONE");

0 comments on commit 94a16b3

Please sign in to comment.
Something went wrong with that request. Please try again.