Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>Test for serialization and equivalence of frequency units</title> |
michael@0 | 5 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 6 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
michael@0 | 7 | </head> |
michael@0 | 8 | <body> |
michael@0 | 9 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a> |
michael@0 | 10 | <p id="display"></p> |
michael@0 | 11 | <div id="content" style="display: none"> |
michael@0 | 12 | |
michael@0 | 13 | </div> |
michael@0 | 14 | <pre id="test"> |
michael@0 | 15 | <script type="application/javascript"> |
michael@0 | 16 | |
michael@0 | 17 | /** Test for serialization and equivalence of frequency units **/ |
michael@0 | 18 | |
michael@0 | 19 | /** |
michael@0 | 20 | * We test that for each of the following: |
michael@0 | 21 | * + they reserialize to exactly what is given |
michael@0 | 22 | * + if a mapping is provided, they compute to the same result as the mapping |
michael@0 | 23 | */ |
michael@0 | 24 | var tests = { |
michael@0 | 25 | "7kHz": "7000Hz", |
michael@0 | 26 | "300Hz": "0.3khz" |
michael@0 | 27 | }; |
michael@0 | 28 | |
michael@0 | 29 | var p = document.getElementById("display"); |
michael@0 | 30 | |
michael@0 | 31 | for (var test in tests) { |
michael@0 | 32 | // We can't test this because we no longer support any properties |
michael@0 | 33 | // with frequency values. |
michael@0 | 34 | todo(false, "no tests to run, for now"); |
michael@0 | 35 | /* |
michael@0 | 36 | p.setAttribute("style", "pitch: " + test); |
michael@0 | 37 | is(p.style.getPropertyValue("pitch"), test, |
michael@0 | 38 | test + " serializes to exactly itself"); |
michael@0 | 39 | */ |
michael@0 | 40 | // We can't test any equivalence since we don't have any properties |
michael@0 | 41 | // with frequency values that we compute. |
michael@0 | 42 | /* |
michael@0 | 43 | var equiv = tests[test]; |
michael@0 | 44 | if (equiv) { |
michael@0 | 45 | var cm1 = getComputedStyle(p, "").pitch; |
michael@0 | 46 | p.style.pitch = equiv; |
michael@0 | 47 | var cm2 = getComputedStyle(p, "").pitch; |
michael@0 | 48 | is(cm1, cm2, test + " should compute to the same as " + equiv); |
michael@0 | 49 | } |
michael@0 | 50 | */ |
michael@0 | 51 | } |
michael@0 | 52 | |
michael@0 | 53 | </script> |
michael@0 | 54 | </pre> |
michael@0 | 55 | </body> |
michael@0 | 56 | </html> |