Bug 1456590 Part 2: Update test expectations to check that names from implicit named areas are not assigned to lines. draft
authorBrad Werth <bwerth@mozilla.com>
Wed, 02 May 2018 16:38:02 -0700
changeset 790883 5032920ad5705227c0d445632e1ad28fb4d5684c
parent 790882 52984f8970a548cdb19f279fc0ac26cd21cfc3f3
push id108620
push userbwerth@mozilla.com
push dateWed, 02 May 2018 23:38:59 +0000
bugs1456590
milestone61.0a1
Bug 1456590 Part 2: Update test expectations to check that names from implicit named areas are not assigned to lines. MozReview-Commit-ID: Bn3zGWkYSup
dom/grid/test/chrome/test_grid_implicit.html
--- a/dom/grid/test/chrome/test_grid_implicit.html
+++ b/dom/grid/test/chrome/test_grid_implicit.html
@@ -99,22 +99,23 @@ function runTests() {
       "Grid row line 1 has the name 'got-this-name-implicitly'."
     );
 
     // test that row line 3 gets its explicit name
     isnot(grid.rows.lines[2].names.indexOf("middle"), -1,
       "Grid row line 3 has the name 'middle'."
     );
 
-    // test the names of the implicit column lines that were created for area 'areaD'
-    isnot(grid.cols.lines[4].names.indexOf("areaD-start"), -1,
-      "Grid column line 5 has the name 'areaD-start'."
+    // test that implicit column line names are not assigned for
+    // implicit area 'areaD'
+    is(grid.cols.lines[4].names.indexOf("areaD-start"), -1,
+      "Grid column line 5 doesn't have the name 'areaD-start'."
     );
-    isnot(grid.cols.lines[5].names.indexOf("areaD-end"), -1,
-      "Grid column line 6 has the name 'areaD-end'."
+    is(grid.cols.lines[5].names.indexOf("areaD-end"), -1,
+      "Grid column line 6 doesn't have the name 'areaD-end'."
     );
   }
 
   // test column and row track counts
   is(grid.cols.tracks.length, 5,
     "Grid.cols.tracks property has length that respects implicit expansion."
   );
   is(grid.rows.tracks.length, 3,
@@ -194,31 +195,32 @@ function runTests() {
   is(grid.cols.lines.length, 2,
     "Grid.cols.lines property doesn't expand due to an explicit line declaration."
   );
   is(grid.rows.lines.length, 2,
     "Grid.rows.lines property doesn't expand due to an explicit line declaration."
   );
 
   if (grid.cols.lines.length == 2 && grid.rows.lines.length == 2) {
-    // check that areaC gets both the explicit line names and the implicit line names
-    isnot(grid.cols.lines[0].names.indexOf("areaC-start"), -1,
-      "Grid row line 1 has the name 'areaC-start'."
+    // check that areaC gets only the explicit line names and
+    // doesn't get the implicit line names
+    is(grid.cols.lines[0].names.indexOf("areaC-start"), -1,
+      "Grid row line 1 doesn't have the name 'areaC-start'."
     );
 
     isnot(grid.cols.lines[0].names.indexOf("areaC-end"), -1,
       "Grid row line 1 has the name 'areaC-end'."
     );
 
     isnot(grid.cols.lines[1].names.indexOf("areaC-start"), -1,
       "Grid row line 2 has the name 'areaC-start'."
     );
 
-    isnot(grid.cols.lines[1].names.indexOf("areaC-end"), -1,
-      "Grid row line 2 has the name 'areaC-end'."
+    is(grid.cols.lines[1].names.indexOf("areaC-end"), -1,
+      "Grid row line 2 doesn't have the name 'areaC-end'."
     );
   }
 
   // test area count
   is(grid.areas.length, 4,
     "Grid.areas property reports 4 areas."
   );