From 02c427558a15049393063856f016a22246cf6f96 Mon Sep 17 00:00:00 2001 From: Nicolas Chevobbe Date: Thu, 12 Jul 2018 16:25:06 +0200 Subject: [PATCH] Bug 1475165 - Fix inspector tests; r=gl. Adapt inspector test to the new order of the search results. This was an easy task since we were already flipping the expected results to make the test more readable (which makes me think that this is the "natural" order). MozReview-Commit-ID: DpxW2O1eOi4 --HG-- extra : rebase_source : 8d579c94bdaaee396a29b4674d4f9764bcadbb5d extra : source : 96c82bb5fa591470483263aea55fa33a10192afc --- devtools/client/inspector/test/browser_inspector_search-02.js | 2 +- devtools/client/inspector/test/browser_inspector_search-03.js | 2 +- devtools/client/inspector/test/browser_inspector_search-04.js | 2 +- devtools/client/inspector/test/browser_inspector_search-07.js | 2 +- devtools/client/inspector/test/browser_inspector_search-08.js | 2 +- .../client/inspector/test/browser_inspector_search-reserved.js | 2 +- .../test/browser_inspector_search-suggests-ids-and-classes.js | 1 - 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/devtools/client/inspector/test/browser_inspector_search-02.js b/devtools/client/inspector/test/browser_inspector_search-02.js index 0c33b4d0e777..0ad1ba11c937 100644 --- a/devtools/client/inspector/test/browser_inspector_search-02.js +++ b/devtools/client/inspector/test/browser_inspector_search-02.js @@ -150,7 +150,7 @@ add_task(async function() { info("Query completed. Performing checks for input '" + searchBox.value + "' - key pressed: " + key); - const actualSuggestions = popup.getItems().reverse(); + const actualSuggestions = popup.getItems(); is(popup.isOpen ? actualSuggestions.length : 0, suggestions.length, "There are expected number of suggestions."); diff --git a/devtools/client/inspector/test/browser_inspector_search-03.js b/devtools/client/inspector/test/browser_inspector_search-03.js index 86dc948c41e7..911fe3390d2a 100644 --- a/devtools/client/inspector/test/browser_inspector_search-03.js +++ b/devtools/client/inspector/test/browser_inspector_search-03.js @@ -231,7 +231,7 @@ add_task(async function() { info("Query completed. Performing checks for input '" + searchBox.value + "'"); - const actualSuggestions = popup.getItems().reverse(); + const actualSuggestions = popup.getItems(); is(popup.isOpen ? actualSuggestions.length : 0, suggestions.length, "There are expected number of suggestions."); diff --git a/devtools/client/inspector/test/browser_inspector_search-04.js b/devtools/client/inspector/test/browser_inspector_search-04.js index a07e67a81af3..3b5e198a4c32 100644 --- a/devtools/client/inspector/test/browser_inspector_search-04.js +++ b/devtools/client/inspector/test/browser_inspector_search-04.js @@ -93,7 +93,7 @@ add_task(async function() { info("Query completed. Performing checks for input '" + searchBox.value + "'"); - const actualSuggestions = popup.getItems().reverse(); + const actualSuggestions = popup.getItems(); is(popup.isOpen ? actualSuggestions.length : 0, suggestions.length, "There are expected number of suggestions."); diff --git a/devtools/client/inspector/test/browser_inspector_search-07.js b/devtools/client/inspector/test/browser_inspector_search-07.js index 505a21ba732a..f07524e8a2f0 100644 --- a/devtools/client/inspector/test/browser_inspector_search-07.js +++ b/devtools/client/inspector/test/browser_inspector_search-07.js @@ -36,7 +36,7 @@ add_task(async function() { info("Waiting for search query to complete and getting the suggestions"); await inspector.searchSuggestions._lastQuery; - const actualSuggestions = popup.getItems().reverse(); + const actualSuggestions = popup.getItems(); is(popup.isOpen ? actualSuggestions.length : 0, suggestions.length, "There are expected number of suggestions."); diff --git a/devtools/client/inspector/test/browser_inspector_search-08.js b/devtools/client/inspector/test/browser_inspector_search-08.js index 3c0a16a31a1d..51d740ac4569 100644 --- a/devtools/client/inspector/test/browser_inspector_search-08.js +++ b/devtools/client/inspector/test/browser_inspector_search-08.js @@ -51,7 +51,7 @@ add_task(async function() { info("Waiting for search query to complete and getting the suggestions"); await inspector.searchSuggestions._lastQuery; - const actualSuggestions = popup.getItems().reverse(); + const actualSuggestions = popup.getItems(); is(popup.isOpen ? actualSuggestions.length : 0, suggestions.length, "There are expected number of suggestions."); diff --git a/devtools/client/inspector/test/browser_inspector_search-reserved.js b/devtools/client/inspector/test/browser_inspector_search-reserved.js index e9f85b3ec7cb..f70ad94b21cf 100644 --- a/devtools/client/inspector/test/browser_inspector_search-reserved.js +++ b/devtools/client/inspector/test/browser_inspector_search-reserved.js @@ -113,7 +113,7 @@ add_task(async function() { info("Query completed. Performing checks for input '" + searchBox.value + "'"); - const actualSuggestions = popup.getItems().reverse(); + const actualSuggestions = popup.getItems(); is(popup.isOpen ? actualSuggestions.length : 0, suggestions.length, "There are expected number of suggestions."); diff --git a/devtools/client/inspector/test/browser_inspector_search-suggests-ids-and-classes.js b/devtools/client/inspector/test/browser_inspector_search-suggests-ids-and-classes.js index 621d1340e343..f6ae55444bc6 100644 --- a/devtools/client/inspector/test/browser_inspector_search-suggests-ids-and-classes.js +++ b/devtools/client/inspector/test/browser_inspector_search-suggests-ids-and-classes.js @@ -72,7 +72,6 @@ add_task(async function() { const actualSuggestions = popup.getItems(); is(popup.isOpen ? actualSuggestions.length : 0, expectedSuggestions.length, "There are expected number of suggestions"); - actualSuggestions.reverse(); for (let i = 0; i < expectedSuggestions.length; i++) { is(expectedSuggestions[i][0], actualSuggestions[i].label,