Bug 984711 part 8: Remove pref-setting mochitest wrapper for min-[size]:auto mochitest. (no review; tweaking existing test)

This commit is contained in:
Daniel Holbert 2014-07-22 08:24:35 -07:00
parent be7a975c00
commit 1fac6f39ef
3 changed files with 9 additions and 55 deletions

View File

@ -1,9 +1,17 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=763689
-->
<head>
<meta charset="utf-8">
<title>Test behavior of 'min-height:auto' and 'min-width:auto' (Bug 763689)</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=763689">Mozilla Bug 763689</a>
<body>
<div id="display">
<div id="non-flex-item">abc</div>
<div style="display: flex">
@ -52,11 +60,6 @@
* min-content height as needed in layout.)
*/
// Use "is()", "ok()", and "todo_is()" from parent document.
var is = parent.is;
var ok = parent.ok;
var todo_is = parent.todo_is;
// Given an element ID, this function sets the corresponding
// element's inline-style min-width and min-height explicitly to "auto".
function setElemMinSizesToAuto(aElemId) {
@ -119,9 +122,6 @@ function checkAllTheMinSizes() {
// Main test function
function main() {
ok(SpecialPowers.getBoolPref("layout.css.flexbox.enabled"),
"expecting to be run with flexbox support enabled");
// First: check that min-sizes are what we expect, with min-size properties
// at their initial value.
checkAllTheMinSizes();
@ -134,8 +134,6 @@ function main() {
// ...and try again (should have the same result):
checkAllTheMinSizes();
parent.finish();
}
main();

View File

@ -128,8 +128,7 @@ skip-if = toolkit == 'android' #bug 536603
[test_flexbox_flex_shorthand.html]
[test_flexbox_layout.html]
support-files = flexbox_layout_testcases.js
[test_flexbox_min_size_auto.html]
support-files = file_flexbox_min_size_auto.html
# [test_flexbox_min_size_auto.html] # (will uncomment in next patch)
[test_flexbox_order.html]
[test_flexbox_order_table.html]
[test_font_face_parser.html]

View File

@ -1,43 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=763689
-->
<head>
<meta charset="utf-8">
<title>Test behavior of 'min-height:auto' and 'min-width:auto' (Bug 763689)</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=763689">Mozilla Bug 763689</a>
<div id="display">
<iframe id="iframe"></iframe>
</div>
<pre id="test">
<script type="application/javascript">
"use strict";
/** Test 'min-height:auto' and 'min-width:auto' (Bug 763689) **/
/*
* This mochitest runs in an iframe so that we can selectively turn on the
* flexbox about:config pref before its document is instantiated.
*
* See the iframe's source ("file_flexbox_min_size_auto.html") for the actual
* test code and for more documentation.
*/
SimpleTest.waitForExplicitFinish();
SpecialPowers.setBoolPref("layout.css.flexbox.enabled", true);
document.getElementById("iframe").src = "file_flexbox_min_size_auto.html";
function finish() {
SpecialPowers.clearUserPref("layout.css.flexbox.enabled");
SimpleTest.finish();
}
</script>
</pre>
</body>
</html>