Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add _common directory for tests

  • Loading branch information...
commit d5df392c7fc42de8f768bc35e0967dd4e98790b1 1 parent 1b0320d
Jan Odvarko janodvarko authored
74 tests/content/_common/tabView.css
View
@@ -0,0 +1,74 @@
+/* See license.txt for terms of usage */
+
+.tabView {
+ width: 100%;
+ height: 100%;
+ left: 0;
+ top: 0;
+ background-color: #FFFFFF;
+ color: #000000;
+ font-size: 11px;
+}
+
+.tabViewCol {
+ border-top: 1px solid #EEEEEE;
+ background: url(chrome://firebug/skin/group.gif) repeat-x #FFFFFF;
+ vertical-align:top;
+ height:100%;
+}
+
+.tabViewBody {
+ margin: 10px 0 4px 10px;
+ /*margin: 10px 0px 0px 0px;*/
+ height:100%;
+}
+
+.tabBar {
+ position: relative;
+ padding-left: 14px;
+}
+
+.tab {
+ position: relative;
+ top: -3px;
+ margin-top: 10px;
+ padding: 4px 6px;
+ border: 1px solid transparent;
+ border-bottom: none;
+ font-weight: bold;
+ color: #565656;
+}
+
+.tab:hover {
+ cursor: pointer;
+}
+
+.tab[selected="true"] {
+ cursor: default !important;
+ border-color: #D7D7D7;
+ -moz-border-radius: 4px 4px 0 0;
+ background-color: #FFFFFF;
+}
+
+.tabBody {
+ display: none;
+ margin: 0;
+ border: 1px solid #D7D7D7;
+ background-color: #FFFFFF;
+ font-family: Monaco, monospace;
+ overflow: hidden;
+}
+
+.previewContent {
+ margin: 8px;
+ height:100%;
+}
+
+.tabBody[selected="true"] {
+ display: block;
+}
+
+.collapsed,
+[collapsed="true"] {
+ display: none;
+}
91 tests/content/_common/testConsole.css
View
@@ -0,0 +1,91 @@
+/* See license.txt for terms of usage */
+
+body {
+ background-color: #FFFFFF;
+ height: 100%;
+}
+
+/************************************************************************************************/
+
+#consoleToolbar toolbarbutton {
+ margin:1px;
+ -moz-box-orient: vertical;
+}
+
+#consoleToolbar toolbarbutton .toolbarbutton-icon {
+ padding:5px;
+}
+
+/************************************************************************************************/
+/* Toolbar buttons */
+
+#runAll {
+ list-style-image: url("chrome://fbtest/skin/runAll.png");
+ -moz-image-region: rect(0px 16px 16px 0px);
+}
+
+#stopTest {
+ list-style-image: url("chrome://firebug/skin/trace/clear.png");
+}
+
+#haltOnFailedTest {
+ list-style-image: url("chrome://fbtest/skin/downloadButtons-aero.png");
+ -moz-image-region: rect(0px 48px 16px 32px);
+}
+
+#refreshList {
+ list-style-image: url("chrome://browser/skin/Toolbar-small.png");
+ -moz-image-region: rect(0px 64px 16px 48px);
+}
+
+#noTestTimeout {
+ list-style-image: url(chrome://fbtest/skin/Throbber-small.png);
+}
+
+#restartFirefox {
+ list-style-image: url("chrome://fbtest/skin/restart.png");
+}
+
+/************************************************************************************************/
+/* Test List URL Bar */
+
+/* Use IDs as the selector so, the height attribute is applied. Class selector doesn't work */
+#testListUrlBar textbox,
+#testCaseUrlBar textbox,
+#testDriverUrlBar textbox {
+ height: 20px;
+ border: 1px solid gray;
+}
+
+.testUrlBar > toolbarbutton {
+ list-style-image: url(chrome://browser/skin/Search-glass.png);
+ -moz-image-region: rect(0px, 16px, 16px, 0px);
+}
+
+.testUrlBar > toolbarbutton:hover {
+ -moz-image-region: rect(0px 32px 16px 16px);
+}
+
+/************************************************************************************************/
+/* Statusbar */
+
+#passingTests {
+ color: green;
+ padding-top: 3px;
+}
+
+#failingTests {
+ color: red;
+ padding-top: 3px;
+}
+
+#todoTests {
+ color: gray;
+ padding-top: 3px;
+}
+
+#progressMessage {
+ color: black;
+ padding-top: 3px;
+ text-align: right;
+}
226 tests/content/_common/testList.css
View
@@ -0,0 +1,226 @@
+/* See license.txt for terms of usage */
+
+h1 {
+ margin-bottom: 0;
+}
+
+#driverURI,
+#testcaseURI {
+ color: gray;
+}
+
+.noTestCasePage {
+ padding-left: 10px;
+ color:gray;
+}
+
+h3 {
+ border-bottom: solid 1px lightgray;
+ margin-bottom: 10px;
+ color:black;
+}
+
+/************************************************************************************************/
+
+#testList {
+ overflow: auto;
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ left: 0;
+ top: 0;
+ background-color: #FFFFFF;
+ color: #000000;
+}
+
+/************************************************************************************************/
+
+.testListTable {
+ width: 100%;
+ border-top: 1px solid #EFEFEF;
+ height: 100%;
+ font-size: 11px;
+}
+
+.testListRow {
+ background: white;
+}
+
+.testListRow:hover {
+ background: #EFEFEF;
+}
+
+.testListCol {
+ padding: 0;
+ vertical-align: top;
+ border-bottom: 1px solid #EFEFEF;
+ white-space: nowrap;
+}
+
+.testName {
+ width: 17px;
+ background-repeat: no-repeat;
+ background-position: 3px 3px;
+ padding-left: 17px;
+}
+
+.testListCol.testName {
+ border-left: 1px solid #EFEFEF;
+}
+
+.testListRow.results .testName {
+ background-image: url(chrome://firebug/skin/win/twistyClosed.png);
+}
+
+.testListRow.opened .testName {
+ background-image: url(chrome://firebug/skin/win/twistyOpen.png);
+}
+
+.testListRow.error .testLink {
+ color: red !important;
+}
+
+.testListRow.todo .testLink {
+ color: gray !important;
+}
+
+.testUri {
+ overflow: hidden;
+ min-width: 70px;
+ padding: 1px 0 2px 0px !important;
+}
+
+.testDesc {
+ width: 100%;
+ color: Gray;
+ margin-right: 7px;
+ text-align: left;
+ padding: 1px 0 2px 4px !important;
+}
+
+.testDesc SPAN {
+ margin-right: 7px;
+}
+
+.testLink {
+ color: #0000ff;
+ cursor:pointer;
+}
+
+.testLink:hover {
+ text-decoration:underline;
+}
+
+/************************************************************************************************/
+
+.testListCol.testIcon {
+ min-width: 60px;
+ color: gray;
+ padding-top: 1px;
+}
+
+.testListCol .statusIcon {
+ margin-right: 4px;
+ margin-left: 4px;
+ width: 37px;
+ height: 16px;
+ vertical-align: middle;
+ background: transparent no-repeat 0 0;
+}
+
+.testListRow.running .statusIcon {
+ background-image: url(chrome://firebug/skin/loading_16.gif);
+ background-position: 10px 0px;
+}
+
+/************************************************************************************************/
+
+.testBodyCol {
+ padding-left: 18px;
+}
+
+/************************************************************************************************/
+
+.groupTable {
+ width: 100%;
+ overflow: hidden;
+ font-family: Lucida Grande, Tahoma, sans-serif;
+ font-size: 11px;
+}
+
+.testGroupCol {
+}
+
+.testGroupRow {
+ background: white;
+ height:17px;
+}
+
+.opened > .testGroupCol > .testGroupName {
+ background-image: url(chrome://firebug/skin/win/twistyOpen.png);
+}
+
+.testGroupName {
+ background-image: url(chrome://firebug/skin/win/twistyClosed.png);
+ background-repeat: no-repeat;
+ background-position: 2px 1px;
+ padding-left: 18px;
+ font-weight: bold;
+ cursor:pointer;
+}
+
+.testGroupCount {
+ color: gray;
+ padding-left: 3px;
+}
+
+.groupBodyCol {
+ padding-left: 18px;
+}
+
+.groupAction {
+ white-space:nowrap;
+ padding-left: 15px;
+ padding-right: 5px;
+}
+
+/************************************************************************************************/
+
+/* Colorize group if there is a failing tests inside */
+.testGroupRow.error {
+ color: red;
+}
+
+/************************************************************************************************/
+
+/* Hide:
+ * 1) passing tests
+ * 2) results of passing tests (if opened)
+ * 3) passing groups
+ */
+.groupTable.hidePassingTests .testListRow,
+.groupTable.hidePassingTests .testListRow.opened + TR,
+.groupTable.hidePassingTests .testGroupRow {
+ display: none;
+}
+
+.groupTable.hidePassingTests .testListRow.error,
+.groupTable.hidePassingTests .testListRow.error.opened + TR,
+.groupTable.hidePassingTests .testGroupRow.error {
+ display: block;
+}
+
+/* Hide also borders */
+.groupTable.hidePassingTests .testListRow .testListCol,
+.groupTable.hidePassingTests .testListTable {
+ border-bottom: 0;
+ border-top: 0;
+}
+
+.groupTable.hidePassingTests .testListRow.error .testListCol {
+ border-bottom: 1px solid #EFEFEF;
+}
+
+.groupTable.hidePassingTests .groupBodyRow.error testListTable {
+ border-top: 1px solid #EFEFEF;
+}
77 tests/content/_common/testListUtils.js
View
@@ -0,0 +1,77 @@
+/* See license.txt for terms of usage */
+
+// **********************************************************************************************//
+// Constants
+
+/**
+ * Convert list of test (JS array) into a nice HTML markup.
+ * xxxHonza: I'd like to use a domplate module (requirejs) + a nice template
+ * that renders the JS array with tests.
+ */
+window.addEventListener("load", function showPage()
+{
+ // If the file is loaded into the Firebug test console don't
+ // generate the web UI.
+ if (document.getElementById("testList"))
+ return;
+
+ var d = document.getElementById("driverURI");
+ if (d)
+ d.innerHTML = driverBaseURI;
+
+ var t = document.getElementById("testcaseURI");
+ if (t)
+ t.innerHTML = serverURI;
+
+ var cases = document.getElementById("tests");
+ var currentGroup = null;
+ for(var i = 0; i < testList.length; i++)
+ {
+ var testCase = testList[i];
+ var ul;
+
+ if (testCase.group != currentGroup)
+ {
+ currentGroup = testCase.group;
+ var h3 = document.createElement("h3");
+
+ // Capitalize the first letter.
+ h3.innerHTML = currentGroup.charAt(0).toUpperCase() +
+ currentGroup.substr(1).toLowerCase();
+
+ var anchor = document.createElement("a");
+ anchor.setAttribute("name", currentGroup);
+ cases.appendChild(anchor);
+ cases.appendChild(h3);
+
+ ul = document.createElement("ul");
+ cases.appendChild(ul);
+ }
+
+ var entry = document.createElement("li");
+ var uri = testCase.testPage ? testCase.testPage : testCase.uri;
+ entry.innerHTML += "<a href=" + driverBaseURI + uri + ">" +
+ testCase.desc + "</a>";
+
+ if (!testCase.testPage)
+ entry.innerHTML += "<span class='noTestCasePage'>(driver only)</span>";
+
+ ul.appendChild(entry);
+ }
+}, true);
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+function getDriverBaseURI()
+{
+ var loc = window.location.toString();
+
+ // Remove anchor
+ var index = loc.indexOf("#");
+ if (index >= 0)
+ loc = loc.substring(0, index);
+
+ var parts = loc.split("/");
+ parts.pop(); // remove file name
+ return parts.join("/") + "/";
+}
217 tests/content/_common/testResult.css
View
@@ -0,0 +1,217 @@
+/* See license.txt for terms of usage */
+
+.testResultTable {
+ width: 100%;
+ border-left: 1px solid #EFEFEF;
+}
+
+.testResultRow {
+ background: white;
+ height:17px;
+}
+
+.testResultRow:hover {
+ background: #EFEFEF;
+}
+
+.testResultCol {
+ padding: 0;
+ vertical-align: top;
+ border-bottom: 1px solid #EFEFEF;
+ white-space: nowrap;
+}
+
+.testResultLabel {
+ overflow: hidden;
+ min-width: 70px;
+ padding: 1px 0 2px 18px !important;
+ font-size: 11px;
+}
+
+.opened > .testResultCol > .testResultMessage {
+ background-image: url(chrome://firebug/skin/win/twistyOpen.png);
+}
+
+.testResultMessage {
+ background-image: url(chrome://firebug/skin/win/twistyClosed.png);
+ background-repeat: no-repeat;
+ background-position: 2px 2px;
+ padding-left: 18px;
+ position: absolute;
+ background-color: white;
+}
+
+.testError .testResultMessage,
+.testError .CompareTab,
+.testError.testResultSummaryLabel {
+ color: red;
+ font-weight: normal;
+}
+
+.testResultFileName {
+ color: Gray;
+ margin-right: 7px;
+ text-align: right;
+}
+
+/************************************************************************************************/
+
+/* Moving mouse over the result-message shows entire text */
+.testResultMessage:hover {
+ cursor: pointer;
+ color: blue;
+ text-decoration: underline;
+}
+
+.testResultFullMessage {
+ display: none;
+ -moz-user-select: none;
+ max-width: 100%;
+ background: #EFEFEF;
+ padding-left: 18px;
+ position: absolute;
+ background-image: url(chrome://firebug/skin/win/twistyClosed.png);
+ background-repeat: no-repeat;
+ background-position: 2px 2px;
+}
+
+.testResultCol:hover > .testResultFullMessage {
+ display: block;
+}
+
+/************************************************************************************************/
+
+/* Support for filtering usin showPass and showFail preferences
+.testTable .testResultRow,
+.testTable .testResultRow {
+ display: none;
+}
+
+.testTable .testResultRow.testResultSummaryRow {
+ display: table-row !important;
+}
+
+.testTable.showPass .testResultRow.testOK {
+ display: table-row !important;
+}
+
+.testTable.showFail .testResultRow.testError {
+ display: table-row !important;
+}
+*/
+
+/************************************************************************************************/
+
+/* Summary row styles */
+.testResultSummaryRow {
+ border: none;
+ background: #BBBBBB !important;
+ font-weight: bold;
+}
+
+.testResultSummaryRow > .testResultCol {
+ border-top: 1px solid #999999;
+ border-bottom: 2px solid;
+ -moz-border-bottom-colors: #EFEFEF #999999;
+ padding-top: 1px;
+ padding-bottom: 2px;
+}
+
+.testResultSummaryLabel {
+ padding-left: 18px;
+}
+
+.summaryPass.testResultSummaryLabel {
+ color: Green;
+}
+
+/************************************************************************************************/
+
+/* Custom styles for tabView bodies */
+.tabStackBody,
+.tabCompareBody {
+ padding: 5px 0 5px 10px;
+}
+
+.testResultStackInfoBody {
+ font-size: 11px;
+}
+
+/************************************************************************************************/
+
+/* Styles for Compare tab */
+.testResultCompareInfoBody {
+ width: 100%;
+ font-size: 11px;
+}
+
+.testResultCompareTitle > TD {
+ margin-bottom: 4px;
+ border-bottom: 1px solid #D7D7D7;
+ padding-top: 8px;
+ padding-bottom: 2px;
+ font-family: Lucida Grande, Tahoma, sans-serif;
+ font-weight: bold;
+ color: #565656;
+}
+
+.testResultCompareTitle > TD:first-child {
+ width: 100%;
+}
+
+.testResultCompareSwitch {
+ font-weight: normal !important;
+ color: #565656 !important;
+ white-space: nowrap;
+ padding-right: 7px;
+}
+
+.testResultCompareSwitch:hover {
+ cursor: pointer;
+ color: blue !important;
+ text-decoration: underline !important;
+}
+
+.testResultExpected,
+.testResultActual,
+.testResultDiff {
+ padding: 5px;
+ font-size: 11px !important;
+ font-family: Monaco, Monospace;
+ color: Gray;
+}
+
+.testResultFrame {
+ border: 1px solid rgb(215, 215, 215);
+ width: 100%;
+}
+
+/************************************************************************************************/
+
+/* Styles for parse error message */
+.xmlInfoErrorMsg {
+ color: red;
+ padding-bottom: 15px;
+}
+
+.xmlInfoErrorSource {
+ color: gray;
+}
+
+/************************************************************************************************/
+
+.stackFrameLink {
+ color:blue;
+}
+
+.stackFrameLink:hover {
+ cursor:pointer;
+ text-decoration:underline;
+}
+
+/************************************************************************************************/
+
+/* Support for FBTraceConsole */
+.DBG_FBTEST {
+ color: rgb(255, 165, 0);
+}
142 tests/content/_common/testcase.css
View
@@ -0,0 +1,142 @@
+@font-face {
+ font-family: 'TitilliumMaps';
+ src: url('http://getfirebug.com/fonts/TitilliumMaps26L001.eot');
+ src: local(''), url('http://getfirebug.com/fonts/TitilliumMaps26L001.woff') format('woff'), url('http://getfirebug.com/fonts/TitilliumMaps26L001.ttf') format('truetype');
+ font-weight: bold;
+}
+
+* {
+ position: relative;
+}
+
+html, body {
+ width: 100%;
+ min-height: -moz-calc(100% - 30px);
+ margin: 0;
+ padding-bottom: 30px;
+}
+
+body {
+ background: #FFFFFF -moz-linear-gradient(center top , #EAF1FB, #FFFFFF 450px) no-repeat;
+ font-family: "Trebuchet MS", Helvetica, sans-serif;
+ font-size: 0.9em;
+}
+
+body > div, h1 {
+ margin: auto;
+ width: 800px;
+}
+
+body > div {
+ top: 40px;
+ border-radius: 8px;
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
+ background-color: rgba(255, 255, 255, 0.6);
+ padding: 15px;
+}
+
+section#content {
+ background-image: -moz-linear-gradient(bottom, #E6E6E6, #F0F0F0);
+ border-radius: 8px;
+ margin-bottom: 10px;
+ padding: 10px;
+}
+
+section#output {
+ display: none;
+ background-image: -moz-linear-gradient(bottom, #F5F5F5, #FFFFFF);
+ margin: 10px 0;
+ padding: 10px;
+}
+
+pre {
+ margin: 0;
+}
+
+footer {
+ margin-top: 10px;
+ text-align: right;
+ font-size: 75%;
+ font-style: italic;
+}
+
+h1, h2 {
+ font-family: /* TitilliumMaps, */ "Trebuchet MS", Helvetica, sans-serif;
+ font-size: 130%;
+ font-weight: bold;
+}
+
+h1 {
+ top: 20px;
+}
+
+h2 {
+ margin: 0.5em 0;
+ border-bottom: 2px solid #9ACBE4;
+}
+
+h3 {
+ margin: 0.3em 0 0.2em 0;
+ font-size: 105%;
+}
+
+p, ol, ul {
+ margin: 0.2em 0;
+}
+
+p {
+ padding-left: 20px;
+}
+
+section#description p {
+ font-style: italic;
+}
+
+section#description ul {
+ list-style-type: square;
+ list-style-image: url(data:image/gif;base64,R0lGODlhBQAIAPcAAGOMnGOMnP///2OMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnGOMnP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAIALAAAAAAFAAgABwgSAAEIHEiwoEGC/xImFMCwocOAADs=);
+}
+
+section#description li.ok, section#description li span.ok {
+ color: #00B400;
+}
+
+section#description li.error, section#description li span.error {
+ color: #DC0000;
+}
+
+code {
+ white-space: pre;
+ color: #008C00;
+}
+
+code.key {
+ color: #0000DC;
+}
+
+input, button {
+ border: 1px solid #AAAAAA;
+ border-radius: 5px;
+ padding: 3px 5px;
+}
+
+input[type="button"], button {
+ background-image: -moz-linear-gradient(bottom, #A0A0A0, #C8C8C8);
+ box-shadow: 0 -2px 2px -1px rgba(0, 0, 0, 0.5) inset, 0 2px 2px -1px #FFFFFF inset;
+ text-shadow: 1px 1px rgba(255, 255, 255, 0.3);
+}
+
+input[type="button"][disabled="true"], button[disabled="true"] {
+ background-image: -moz-linear-gradient(bottom, #C8C8C8, #F0F0F0);
+}
+
+input[type="button"]:not([disabled="true"]):hover,
+button:not([disabled="true"]):hover {
+ background-image: -moz-linear-gradient(bottom, #B4B4B4, #DCDCDC);
+}
+
+input[type="button"]:not([disabled="true"]):active,
+button:not([disabled="true"]):active {
+ background-image: -moz-linear-gradient(top, #8C8C8C, #A0A0A0);
+ box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.5) inset, 0 -2px 2px -1px #FFFFFF inset;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.