Commit 81ba03d4 authored by Dan Beam's avatar Dan Beam Committed by Commit Bot

Settings: fix some funkiness in search tests

R=rbpotter@chromium.org
BUG=355446

Change-Id: I58db2de0c366c427bfa86595004bc3815576be5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1983548
Commit-Queue: Dan Beam <dbeam@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Auto-Submit: Dan Beam <dbeam@chromium.org>
Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#727682}
parent 6bd7088e
......@@ -10,9 +10,11 @@ cr.define('settings_test', function() {
// Don't import script if already imported (happens in Vulcanized mode).
suiteSetup(function() {
if (!window.settings || !settings.getSearchManager) {
return PolymerTest.loadScript(
'chrome://resources/js/search_highlight_utils.js') &&
PolymerTest.loadScript('chrome://settings/search_settings.js');
return Promise.all([
PolymerTest.loadScript(
'chrome://resources/js/search_highlight_utils.js'),
PolymerTest.loadScript('chrome://settings/search_settings.js'),
]);
}
});
......@@ -86,9 +88,7 @@ cr.define('settings_test', function() {
.then(function() {
assertFalse(section.hiddenBySearch);
const highlightWrapper =
section.querySelector('.search-highlight-wrapper');
assertTrue(!!highlightWrapper);
assertEquals(1, document.querySelectorAll('.search-bubble').length);
// Check that original DOM structure is present even after search
// highlights are cleared.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment