Bug 1494162 - Part 19: Backed out changeset 6297b63aa220. r=me
authorGabriel Luong <gabriel.luong@gmail.com>
Fri, 28 Sep 2018 16:14:32 -0400
changeset 494566 409be898a58d93400ea8c6cad5d4385b64dc628a
parent 494565 4a69fe45e0de9deb8127e950d164cf664b2e8475
child 494567 c3cc3c9ad8c95d2bf593ed5b380d25d3c0bf5357
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1494162
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1494162 - Part 19: Backed out changeset 6297b63aa220. r=me
devtools/shared/tests/mochitest/test_css-logic-getCssPath.html
--- a/devtools/shared/tests/mochitest/test_css-logic-getCssPath.html
+++ b/devtools/shared/tests/mochitest/test_css-logic-getCssPath.html
@@ -7,17 +7,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <meta charset="utf-8">
   <title>Test for Bug 1323700</title>
 
   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
   <script type="application/javascript">
 
 let { require } = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {});
-const getCssPath = require("resource://gre/modules/css-selector.js");
+const CssLogic = require("devtools/shared/inspector/css-logic");
 
 var _tests = [];
 function addTest(test) {
   _tests.push(test);
 }
 
 function runNextTest() {
   if (_tests.length == 0) {
@@ -30,31 +30,31 @@ function runNextTest() {
 window.onload = function() {
   SimpleTest.waitForExplicitFinish();
   runNextTest();
 }
 
 addTest(function getCssPathForUnattachedElement() {
   var unattached = document.createElement("div");
   unattached.id = "unattached";
-  is(getCssPath(unattached), "", "Unattached node returns empty string");
+  is(CssLogic.getCssPath(unattached), "", "Unattached node returns empty string");
 
   var unattachedChild = document.createElement("div");
   unattached.appendChild(unattachedChild);
-  is(getCssPath(unattachedChild), "", "Unattached child returns empty string");
+  is(CssLogic.getCssPath(unattachedChild), "", "Unattached child returns empty string");
 
   var unattachedBody = document.createElement("body");
-  is(getCssPath(unattachedBody), "", "Unattached body returns empty string");
+  is(CssLogic.getCssPath(unattachedBody), "", "Unattached body returns empty string");
 
   runNextTest();
 });
 
 addTest(function cssPathHasOneStepForEachAncestor() {
   for (let el of [...document.querySelectorAll('*')]) {
-    let splitPath = getCssPath(el).split(" ");
+    let splitPath = CssLogic.getCssPath(el).split(" ");
 
     let expectedNbOfParts = 0;
     var parent = el.parentNode;
     while (parent) {
       expectedNbOfParts ++;
       parent = parent.parentNode;
     }
 
@@ -79,17 +79,17 @@ addTest(function getCssPath() {
     path: "html body span.c1.c2.c3"
   }, {
     selector: "#i",
     path: "html body span#i.c1.c2"
   }];
 
   for (let {selector, path} of data) {
     let node = document.querySelector(selector);
-    is (getCssPath(node), path, `Full css path is correct for ${selector}`);
+    is (CssLogic.getCssPath(node), path, `Full css path is correct for ${selector}`);
   }
 
   runNextTest();
 });
   </script>
 </head>
 <body>
   <div>