mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
0b8deaf5a5
--HG-- rename : browser/devtools/styleinspector/test/browser_styleinspector_bug_672746_default_styles.js => browser/devtools/styleinspector/test/browser_computedview_browser-styles.js rename : browser/devtools/styleinspector/test/browser_bug589375_keybindings.js => browser/devtools/styleinspector/test/browser_computedview_keybindings_01.js rename : browser/devtools/styleinspector/test/browser_computedview_bug835808_keyboard_nav.js => browser/devtools/styleinspector/test/browser_computedview_keybindings_02.js rename : browser/devtools/styleinspector/test/browser_bug913014_matched_expand.js => browser/devtools/styleinspector/test/browser_computedview_matched-selectors-toggle.js rename : browser/devtools/styleinspector/test/browser_bug683672.js => browser/devtools/styleinspector/test/browser_computedview_matched-selectors_01.js rename : browser/devtools/styleinspector/test/browser_bug_692400_element_style.js => browser/devtools/styleinspector/test/browser_computedview_matched-selectors_02.js rename : browser/devtools/styleinspector/test/browser_bug722196_property_view_media_queries.js => browser/devtools/styleinspector/test/browser_computedview_media-queries.js rename : browser/devtools/styleinspector/test/browser_styleinspector_bug_689759_no_results_placeholder.js => browser/devtools/styleinspector/test/browser_computedview_no-results-placeholder.js rename : browser/devtools/styleinspector/test/browser_computedview_original_source_link.js => browser/devtools/styleinspector/test/browser_computedview_original-source-link.js rename : browser/devtools/styleinspector/test/browser_styleinspector_bug_672744_search_filter.js => browser/devtools/styleinspector/test/browser_computedview_search-filter.js rename : browser/devtools/styleinspector/test/browser_computedview_copy.js => browser/devtools/styleinspector/test/browser_computedview_select-and-copy-styles.js rename : browser/devtools/styleinspector/test/browser_computedview_734259_style_editor_link.js => browser/devtools/styleinspector/test/browser_computedview_style-editor-link.js rename : browser/devtools/styleinspector/test/browser_ruleview_add_property_01.js => browser/devtools/styleinspector/test/browser_ruleview_add-property-and-reselect.js rename : browser/devtools/styleinspector/test/browser_ruleview_editor_changedvalues_01.js => browser/devtools/styleinspector/test/browser_ruleview_add-property-cancel_01.js rename : browser/devtools/styleinspector/test/browser_ruleview_editor_changedvalues_03.js => browser/devtools/styleinspector/test/browser_ruleview_add-property-cancel_02.js rename : browser/devtools/styleinspector/test/browser_ruleview_cancel.js => browser/devtools/styleinspector/test/browser_ruleview_add-property-cancel_03.js rename : browser/devtools/styleinspector/test/browser_ruleview_editor_changedvalues_02.js => browser/devtools/styleinspector/test/browser_ruleview_add-property_01.js rename : browser/devtools/styleinspector/test/browser_ruleview_add_property_02.js => browser/devtools/styleinspector/test/browser_ruleview_add-property_02.js rename : browser/devtools/styleinspector/test/browser_bug940500_rule_view_pick_gradient_color.js => browser/devtools/styleinspector/test/browser_ruleview_colorpicker-edit-gradient.js rename : browser/devtools/styleinspector/test/browser_bug893965_css_property_completion_existing_property.js => browser/devtools/styleinspector/test/browser_ruleview_completion-existing-property_01.js rename : browser/devtools/styleinspector/test/browser_bug894376_css_value_completion_existing_property_value_pair.js => browser/devtools/styleinspector/test/browser_ruleview_completion-existing-property_02.js rename : browser/devtools/styleinspector/test/browser_bug893965_css_property_completion_new_property.js => browser/devtools/styleinspector/test/browser_ruleview_completion-new-property_01.js rename : browser/devtools/styleinspector/test/browser_bug894376_css_value_completion_new_property_value_pair.js => browser/devtools/styleinspector/test/browser_ruleview_completion-new-property_02.js rename : browser/devtools/styleinspector/test/browser_ruleview_bug_902966_revert_value_on_ESC.js => browser/devtools/styleinspector/test/browser_ruleview_edit-property-commit.js rename : browser/devtools/styleinspector/test/browser_bug722691_rule_view_increment.js => browser/devtools/styleinspector/test/browser_ruleview_edit-property-increments.js rename : browser/devtools/styleinspector/test/browser_ruleview_manipulation.js => browser/devtools/styleinspector/test/browser_ruleview_edit-property-order.js rename : browser/devtools/styleinspector/test/browser_ruleview_editor_changedvalues_04.js => browser/devtools/styleinspector/test/browser_ruleview_edit-property_01.js rename : browser/devtools/styleinspector/test/browser_ruleview_edit.js => browser/devtools/styleinspector/test/browser_ruleview_edit-property_02.js rename : browser/devtools/styleinspector/test/browser_ruleview_focus.js => browser/devtools/styleinspector/test/browser_ruleview_keybindings.js rename : browser/devtools/styleinspector/test/browser_bug970532_mathml_element.js => browser/devtools/styleinspector/test/browser_ruleview_mathml-element.js rename : browser/devtools/styleinspector/test/browser_bug722196_rule_view_media_queries.js => browser/devtools/styleinspector/test/browser_ruleview_media-queries.js rename : browser/devtools/styleinspector/test/browser_ruleview_multiple_properties_02.js => browser/devtools/styleinspector/test/browser_ruleview_multiple-properties-duplicates.js rename : browser/devtools/styleinspector/test/browser_ruleview_multiple_properties_03.js => browser/devtools/styleinspector/test/browser_ruleview_multiple-properties-priority.js rename : browser/devtools/styleinspector/test/browser_ruleview_multiple_properties_04.js => browser/devtools/styleinspector/test/browser_ruleview_multiple-properties-unfinished_01.js rename : browser/devtools/styleinspector/test/browser_ruleview_multiple_properties_05.js => browser/devtools/styleinspector/test/browser_ruleview_multiple-properties-unfinished_02.js rename : browser/devtools/styleinspector/test/browser_ruleview_original_source_link.js => browser/devtools/styleinspector/test/browser_ruleview_original-source-link.js rename : browser/devtools/styleinspector/test/browser_ruleview_pseudoelement.js => browser/devtools/styleinspector/test/browser_ruleview_pseudo-element.js rename : browser/devtools/styleinspector/test/browser_ruleview_copy.js => browser/devtools/styleinspector/test/browser_ruleview_select-and-copy-styles.js rename : browser/devtools/styleinspector/test/browser_ruleview_734259_style_editor_link.js => browser/devtools/styleinspector/test/browser_ruleview_style-editor-link.js rename : browser/devtools/styleinspector/test/browser_styleinspector_bug_677930_urls_clickable.js => browser/devtools/styleinspector/test/browser_ruleview_urls-clickable.js rename : browser/devtools/styleinspector/test/browser_bug942297_user_property_reset.js => browser/devtools/styleinspector/test/browser_ruleview_user-property-reset.js rename : browser/devtools/styleinspector/test/browser_bug705707_is_content_stylesheet.js => browser/devtools/styleinspector/test/browser_styleinspector_csslogic-content-stylesheets.js rename : browser/devtools/styleinspector/test/browser_csslogic_inherited.js => browser/devtools/styleinspector/test/browser_styleinspector_csslogic-inherited-properties.js rename : browser/devtools/styleinspector/test/browser_bug_592743_specificity.js => browser/devtools/styleinspector/test/browser_styleinspector_csslogic-specificity.js rename : browser/devtools/styleinspector/test/browser_ruleview_editor.js => browser/devtools/styleinspector/test/browser_styleinspector_inplace-editor.js rename : browser/devtools/styleinspector/test/browser_styleinspector_outputparser.js => browser/devtools/styleinspector/test/browser_styleinspector_output-parser.js rename : browser/devtools/styleinspector/test/browser_bug765105_background_image_tooltip.js => browser/devtools/styleinspector/test/browser_styleinspector_tooltip-background-image.js rename : browser/devtools/styleinspector/test/browser_bug946331_close_tooltip_on_new_selection.js => browser/devtools/styleinspector/test/browser_styleinspector_tooltip-closes-on-new-selection.js rename : browser/devtools/styleinspector/test/browser_bug702577_fontfamily_tooltip_longhand.js => browser/devtools/styleinspector/test/browser_styleinspector_tooltip-longhand-fontfamily.js rename : browser/devtools/styleinspector/test/browser_bug702577_fontfamily_tooltip_shorthand.js => browser/devtools/styleinspector/test/browser_styleinspector_tooltip-shorthand-fontfamily.js rename : browser/devtools/styleinspector/test/browser_bug726427_csstransform_tooltip.js => browser/devtools/styleinspector/test/browser_styleinspector_tooltip-transform.js rename : browser/devtools/styleinspector/test/browser_bug705707_is_content_stylesheet.html => browser/devtools/styleinspector/test/doc_content_stylesheet.html rename : browser/devtools/styleinspector/test/browser_bug705707_is_content_stylesheet.xul => browser/devtools/styleinspector/test/doc_content_stylesheet.xul rename : browser/devtools/styleinspector/test/browser_bug705707_is_content_stylesheet_imported.css => browser/devtools/styleinspector/test/doc_content_stylesheet_imported.css rename : browser/devtools/styleinspector/test/browser_bug705707_is_content_stylesheet_imported2.css => browser/devtools/styleinspector/test/doc_content_stylesheet_imported2.css rename : browser/devtools/styleinspector/test/browser_bug705707_is_content_stylesheet_linked.css => browser/devtools/styleinspector/test/doc_content_stylesheet_linked.css rename : browser/devtools/styleinspector/test/browser_bug705707_is_content_stylesheet_script.css => browser/devtools/styleinspector/test/doc_content_stylesheet_script.css rename : browser/devtools/styleinspector/test/browser_bug705707_is_content_stylesheet_xul.css => browser/devtools/styleinspector/test/doc_content_stylesheet_xul.css rename : browser/devtools/styleinspector/test/browser_bug683672.html => browser/devtools/styleinspector/test/doc_matched_selectors.html rename : browser/devtools/styleinspector/test/browser_bug722196_identify_media_queries.html => browser/devtools/styleinspector/test/doc_media_queries.html rename : browser/devtools/styleinspector/test/browser_ruleview_pseudoelement.html => browser/devtools/styleinspector/test/doc_pseudoelement.html rename : browser/devtools/styleinspector/test/sourcemaps.css => browser/devtools/styleinspector/test/doc_sourcemaps.css rename : browser/devtools/styleinspector/test/sourcemaps.css.map => browser/devtools/styleinspector/test/doc_sourcemaps.css.map rename : browser/devtools/styleinspector/test/sourcemaps.html => browser/devtools/styleinspector/test/doc_sourcemaps.html rename : browser/devtools/styleinspector/test/sourcemaps.scss => browser/devtools/styleinspector/test/doc_sourcemaps.scss rename : browser/devtools/styleinspector/test/browser_ruleview_734259_style_editor_link.css => browser/devtools/styleinspector/test/doc_style_editor_link.css rename : browser/devtools/styleinspector/test/test-image.png => browser/devtools/styleinspector/test/doc_test_image.png rename : browser/devtools/styleinspector/test/browser_styleinspector_bug_677930_urls_clickable/browser_styleinspector_bug_677930_urls_clickable.css => browser/devtools/styleinspector/test/doc_urls_clickable.css rename : browser/devtools/styleinspector/test/browser_styleinspector_bug_677930_urls_clickable.html => browser/devtools/styleinspector/test/doc_urls_clickable.html
74 lines
2.3 KiB
JavaScript
74 lines
2.3 KiB
JavaScript
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
|
|
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
"use strict";
|
|
|
|
// Tests that the no results placeholder works properly.
|
|
|
|
let test = asyncTest(function*() {
|
|
yield addTab("data:text/html,no results placeholder test");
|
|
|
|
info("Creating the test document");
|
|
content.document.body.innerHTML = '<style type="text/css"> ' +
|
|
'.matches {color: #F00;}</style>' +
|
|
'<span id="matches" class="matches">Some styled text</span>';
|
|
content.document.title = "Tests that the no results placeholder works properly";
|
|
|
|
info("Opening the computed view");
|
|
let {toolbox, inspector, view} = yield openComputedView();
|
|
|
|
info("Selecting the test node");
|
|
yield selectNode("#matches", inspector);
|
|
|
|
yield enterInvalidFilter(inspector, view);
|
|
checkNoResultsPlaceholderShown(view);
|
|
|
|
yield clearFilterText(inspector, view);
|
|
checkNoResultsPlaceholderHidden(view);
|
|
});
|
|
|
|
function* enterInvalidFilter(inspector, computedView) {
|
|
let searchbar = computedView.searchField;
|
|
let searchTerm = "xxxxx";
|
|
|
|
info("setting filter text to \"" + searchTerm + "\"");
|
|
|
|
let onRefreshed = inspector.once("computed-view-refreshed");
|
|
searchbar.focus();
|
|
for each (let c in searchTerm) {
|
|
EventUtils.synthesizeKey(c, {}, computedView.styleWindow);
|
|
}
|
|
yield onRefreshed;
|
|
}
|
|
|
|
function checkNoResultsPlaceholderShown(computedView) {
|
|
info("Checking that the no results placeholder is shown");
|
|
|
|
let placeholder = computedView.noResults;
|
|
let win = computedView.styleWindow;
|
|
let display = win.getComputedStyle(placeholder).display;
|
|
is(display, "block", "placeholder is visible");
|
|
}
|
|
|
|
function* clearFilterText(inspector, computedView) {
|
|
info("Clearing the filter text");
|
|
|
|
let searchbar = computedView.searchField;
|
|
|
|
let onRefreshed = inspector.once("computed-view-refreshed");
|
|
searchbar.focus();
|
|
searchbar.value = "";
|
|
EventUtils.synthesizeKey("c", {}, computedView.styleWindow);
|
|
yield onRefreshed;
|
|
}
|
|
|
|
function checkNoResultsPlaceholderHidden(computedView) {
|
|
info("Checking that the no results placeholder is hidden");
|
|
|
|
let placeholder = computedView.noResults;
|
|
let win = computedView.styleWindow;
|
|
let display = win.getComputedStyle(placeholder).display;
|
|
is(display, "none", "placeholder is hidden");
|
|
}
|