layout/forms/test/test_bug869314.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/forms/test/test_bug869314.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,54 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=869314
     1.8 +-->
     1.9 +<head>
    1.10 +  <meta charset="utf-8">
    1.11 +  <title>Test for Bug 869314</title>
    1.12 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.13 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.14 +
    1.15 +  <style type="text/css">
    1.16 +    .selectbox {
    1.17 +      background-color: #00FF00;
    1.18 +    }
    1.19 +  </style>
    1.20 +
    1.21 +</head>
    1.22 +<body>
    1.23 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=869314">Mozilla Bug 869314</a>
    1.24 +<p id="display"></p>
    1.25 +<div id="content">
    1.26 +
    1.27 +  <select id="selectbox1" name="non-native selectbox" class="selectbox">
    1.28 +    <option value="item">test item</option>
    1.29 +  </select>
    1.30 +
    1.31 +  <select id="selectbox2" name="native selectbox">
    1.32 +    <option value="item">test item</option>
    1.33 +  </select>
    1.34 +
    1.35 +  <script type="application/javascript">
    1.36 +  var Cc = SpecialPowers.Cc;
    1.37 +  var Ci = SpecialPowers.Ci;
    1.38 +  var sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
    1.39 +  var osName = sysInfo.getProperty("name");
    1.40 +  if (osName == "Darwin") { // Mac OS X.
    1.41 +    // This test is for Mac only. See bug for more info.
    1.42 +    ok(document.getElementById("selectbox1").clientWidth >
    1.43 +       document.getElementById("selectbox2").clientWidth,
    1.44 +       "Non-native styled combobox does not have enough space for a " +
    1.45 +       "dropmarker!");
    1.46 +  } else {
    1.47 +    // We need to call at least one test function to make the test harness
    1.48 +    // happy.
    1.49 +    ok(true, "Test wasn't ignored but should have been.");
    1.50 +  }
    1.51 +  </script>
    1.52 +
    1.53 +</div>
    1.54 +<pre id="test">
    1.55 +</pre>
    1.56 +</body>
    1.57 +</html>

mercurial