From 2211712d274673bfa7451f8ff0d14d190d5f68bd Mon Sep 17 00:00:00 2001 From: Nicolas Chevobbe Date: Fri, 7 Jul 2017 13:51:24 +0200 Subject: [PATCH] Bug 1308566 - Remove reps mochitests. r=bgrins Remove tests since they were all migrated to jest in Github and will only lives there now. MozReview-Commit-ID: 7N8Wuq6sD2I --HG-- extra : rebase_source : 3f3dba033ed48302094c62ec5f092f7bbf89fa26 --- .../client/shared/components/reps/moz.build | 2 - .../reps/test/mochitest/.eslintrc.js | 6 - .../components/reps/test/mochitest/chrome.ini | 33 - .../components/reps/test/mochitest/head.js | 71 - .../reps/test/mochitest/test_reps_array.html | 294 ---- .../test/mochitest/test_reps_attribute.html | 75 - .../mochitest/test_reps_comment-node.html | 82 - .../test/mochitest/test_reps_date-time.html | 106 -- .../test/mochitest/test_reps_document.html | 77 - .../mochitest/test_reps_element-node.html | 467 ------ .../reps/test/mochitest/test_reps_error.html | 454 ------ .../reps/test/mochitest/test_reps_event.html | 490 ------ .../test/mochitest/test_reps_failure.html | 61 - .../test/mochitest/test_reps_function.html | 417 ------ .../test/mochitest/test_reps_grip-array.html | 1324 ----------------- .../test/mochitest/test_reps_grip-map.html | 859 ----------- .../reps/test/mochitest/test_reps_grip.html | 1288 ---------------- .../test/mochitest/test_reps_infinity.html | 72 - .../test/mochitest/test_reps_long-string.html | 131 -- .../reps/test/mochitest/test_reps_nan.html | 49 - .../reps/test/mochitest/test_reps_null.html | 46 - .../reps/test/mochitest/test_reps_number.html | 97 -- .../mochitest/test_reps_object-with-text.html | 67 - .../mochitest/test_reps_object-with-url.html | 74 - .../reps/test/mochitest/test_reps_object.html | 338 ----- .../test/mochitest/test_reps_promise.html | 527 ------- .../reps/test/mochitest/test_reps_regexp.html | 65 - .../reps/test/mochitest/test_reps_string.html | 110 -- .../test/mochitest/test_reps_stylesheet.html | 68 - .../reps/test/mochitest/test_reps_symbol.html | 75 - .../test/mochitest/test_reps_text-node.html | 248 --- .../test/mochitest/test_reps_undefined.html | 49 - .../reps/test/mochitest/test_reps_window.html | 116 -- 33 files changed, 8238 deletions(-) delete mode 100644 devtools/client/shared/components/reps/test/mochitest/.eslintrc.js delete mode 100644 devtools/client/shared/components/reps/test/mochitest/chrome.ini delete mode 100644 devtools/client/shared/components/reps/test/mochitest/head.js delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_array.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_attribute.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_comment-node.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_date-time.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_document.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_element-node.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_error.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_event.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_failure.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_function.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_grip-array.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_grip-map.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_grip.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_infinity.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_long-string.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_nan.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_null.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_number.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_object-with-text.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_object-with-url.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_object.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_promise.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_regexp.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_string.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_stylesheet.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_symbol.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_text-node.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_undefined.html delete mode 100644 devtools/client/shared/components/reps/test/mochitest/test_reps_window.html diff --git a/devtools/client/shared/components/reps/moz.build b/devtools/client/shared/components/reps/moz.build index 69fb6af4d319..08b7950f5691 100644 --- a/devtools/client/shared/components/reps/moz.build +++ b/devtools/client/shared/components/reps/moz.build @@ -8,5 +8,3 @@ DevToolsModules( 'reps.css', 'reps.js', ) - -MOCHITEST_CHROME_MANIFESTS += ['test/mochitest/chrome.ini'] diff --git a/devtools/client/shared/components/reps/test/mochitest/.eslintrc.js b/devtools/client/shared/components/reps/test/mochitest/.eslintrc.js deleted file mode 100644 index decd31bfa6bb..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/.eslintrc.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = { - // Extend from the shared list of defined globals for mochitests. - "extends": "../../../../../../.eslintrc.mochitests.js" -}; diff --git a/devtools/client/shared/components/reps/test/mochitest/chrome.ini b/devtools/client/shared/components/reps/test/mochitest/chrome.ini deleted file mode 100644 index 0d48f3e34402..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/chrome.ini +++ /dev/null @@ -1,33 +0,0 @@ -[DEFAULT] -support-files = - head.js - -[test_reps_array.html] -[test_reps_attribute.html] -[test_reps_comment-node.html] -[test_reps_date-time.html] -[test_reps_document.html] -[test_reps_element-node.html] -[test_reps_error.html] -[test_reps_event.html] -[test_reps_failure.html] -[test_reps_function.html] -[test_reps_grip.html] -[test_reps_grip-array.html] -[test_reps_grip-map.html] -[test_reps_infinity.html] -[test_reps_long-string.html] -[test_reps_nan.html] -[test_reps_null.html] -[test_reps_number.html] -[test_reps_object.html] -[test_reps_object-with-text.html] -[test_reps_object-with-url.html] -[test_reps_promise.html] -[test_reps_regexp.html] -[test_reps_string.html] -[test_reps_stylesheet.html] -[test_reps_symbol.html] -[test_reps_text-node.html] -[test_reps_undefined.html] -[test_reps_window.html] diff --git a/devtools/client/shared/components/reps/test/mochitest/head.js b/devtools/client/shared/components/reps/test/mochitest/head.js deleted file mode 100644 index e2e567260430..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/head.js +++ /dev/null @@ -1,71 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -/* Entirely disable no-unused-vars, because the second line here - doesn't seem to work with eslint 3.15.0 -- it doesn't suppress - other no-unused-vars errors. */ -/* eslint-disable no-unused-vars */ -/* eslint no-unused-vars: ["error", {"vars": "local"}] */ - -/* globals is */ - -/* Not really a module. */ -/* eslint-disable strict */ -"use strict"; - -var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components; - -var { require } = Cu.import("resource://devtools/shared/Loader.jsm", {}); -var { Assert } = require("resource://testing-common/Assert.jsm"); -var { gDevTools } = require("devtools/client/framework/devtools"); -var { BrowserLoader } = Cu.import("resource://devtools/client/shared/browser-loader.js", {}); -var flags = require("devtools/shared/flags"); -var { Task } = require("devtools/shared/task"); -var DevToolsUtils = require("devtools/shared/DevToolsUtils"); - -flags.testing = true; -var { require: browserRequire } = BrowserLoader({ - baseURI: "resource://devtools/client/shared/", - window -}); - -let ReactDOM = browserRequire("devtools/client/shared/vendor/react-dom"); -let React = browserRequire("devtools/client/shared/vendor/react"); -var TestUtils = React.addons.TestUtils; - -function renderComponent(component, props) { - const el = React.createElement(component, props, {}); - // By default, renderIntoDocument() won't work for stateless components, but - // it will work if the stateless component is wrapped in a stateful one. - // See https://github.com/facebook/react/issues/4839 - const wrappedEl = React.DOM.span({}, [el]); - const renderedComponent = TestUtils.renderIntoDocument(wrappedEl); - return ReactDOM.findDOMNode(renderedComponent).children[0]; -} - -function shallowRenderComponent(component, props) { - const el = React.createElement(component, props); - const renderer = TestUtils.createRenderer(); - renderer.render(el, {}); - return renderer.getRenderOutput(); -} - -/** - * Test that a rep renders correctly across different modes. - */ -function testRepRenderModes(modeTests, testName, componentUnderTest, gripStub, - props = {}) { - modeTests.forEach(({mode, expectedOutput, message, title}) => { - const modeString = typeof mode === "undefined" ? "no mode" : mode.toString(); - if (!message) { - message = `${testName}: ${modeString} renders correctly.`; - } - - const rendered = renderComponent( - componentUnderTest.rep, - Object.assign({}, { object: gripStub, mode, title }, props) - ); - is(rendered.textContent, expectedOutput, message); - }); -} diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_array.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_array.html deleted file mode 100644 index 48bd69969b1c..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_array.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - - Rep test - ArrayRep - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_attribute.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_attribute.html deleted file mode 100644 index e85d7fabc219..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_attribute.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - Rep test - Attribute - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_comment-node.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_comment-node.html deleted file mode 100644 index 2cf1b22b7fbf..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_comment-node.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - Rep test - comment-node - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_date-time.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_date-time.html deleted file mode 100644 index ccec5f83185a..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_date-time.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - Rep test - DateTime - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_document.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_document.html deleted file mode 100644 index 619ca79ecda0..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_document.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - Rep test - Document - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_element-node.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_element-node.html deleted file mode 100644 index 872718fbad58..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_element-node.html +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - - Rep test - Element node - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_error.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_error.html deleted file mode 100644 index daabcc719d67..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_error.html +++ /dev/null @@ -1,454 +0,0 @@ - - - - - - - Rep test - Error - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_event.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_event.html deleted file mode 100644 index c79515e37985..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_event.html +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - - Rep test - Event - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_failure.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_failure.html deleted file mode 100644 index 0a730ae2a18b..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_failure.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - Rep test - Failure - - - - -
-
-
-
- - \ No newline at end of file diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_function.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_function.html deleted file mode 100644 index 1f85be6fba2f..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_function.html +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - - Rep test - Func - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_grip-array.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_grip-array.html deleted file mode 100644 index d4458ab75bc6..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_grip-array.html +++ /dev/null @@ -1,1324 +0,0 @@ - - - - - - - Rep test - GripArray - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_grip-map.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_grip-map.html deleted file mode 100644 index f9c11d3130ba..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_grip-map.html +++ /dev/null @@ -1,859 +0,0 @@ - - - - - - - Rep test - GripMap - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_grip.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_grip.html deleted file mode 100644 index d01e01adf0bd..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_grip.html +++ /dev/null @@ -1,1288 +0,0 @@ - - - - - - - Rep test - grip - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_infinity.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_infinity.html deleted file mode 100644 index 4612b3136707..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_infinity.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - Rep test - Infinity - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_long-string.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_long-string.html deleted file mode 100644 index f1acc61e4993..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_long-string.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - Rep test - LongString - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_nan.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_nan.html deleted file mode 100644 index e961647d7a27..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_nan.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - Rep test - NaN - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_null.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_null.html deleted file mode 100644 index ad447fe5e19d..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_null.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - Rep test - Null - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_number.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_number.html deleted file mode 100644 index 5e03c095a7e3..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_number.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - Rep test - Number - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_object-with-text.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_object-with-text.html deleted file mode 100644 index 0901011b6134..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_object-with-text.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - Rep test - ObjectWithText - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_object-with-url.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_object-with-url.html deleted file mode 100644 index 7febc2fadd10..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_object-with-url.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - Rep test - ObjectWithURL - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_object.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_object.html deleted file mode 100644 index f6bae35132ff..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_object.html +++ /dev/null @@ -1,338 +0,0 @@ - - - - - - - Rep test - Obj - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_promise.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_promise.html deleted file mode 100644 index 9f12a29c1a1c..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_promise.html +++ /dev/null @@ -1,527 +0,0 @@ - - - - - - - Rep test - Promise - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_regexp.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_regexp.html deleted file mode 100644 index be76c4a76866..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_regexp.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - Rep test - RegExp - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_string.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_string.html deleted file mode 100644 index 49a9cb9b85f6..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_string.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - Rep test - String - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_stylesheet.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_stylesheet.html deleted file mode 100644 index 4f4557617f13..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_stylesheet.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - Rep test - Stylesheet - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_symbol.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_symbol.html deleted file mode 100644 index 27b757834ce0..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_symbol.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - Rep test - String - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_text-node.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_text-node.html deleted file mode 100644 index 03ea44c0a524..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_text-node.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - - Rep test - text-node - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_undefined.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_undefined.html deleted file mode 100644 index 350c31a6557d..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_undefined.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - Rep test - undefined - - - - -
-
-
-
- - diff --git a/devtools/client/shared/components/reps/test/mochitest/test_reps_window.html b/devtools/client/shared/components/reps/test/mochitest/test_reps_window.html deleted file mode 100644 index 3c7ba5e68cf4..000000000000 --- a/devtools/client/shared/components/reps/test/mochitest/test_reps_window.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - Rep tests - window - - - - -
-
-
-
- -