mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 11:37:43 -10:00
5 tests of the styleeditor suite are importing shared/test/head. Now that this also includes shared-head.js, it conflicts with the existing styleeditor head file. For now, the import was moved to the head, so it's always imported. The tests have been updated accordingly. Should file a follow-up to split the inspector test suites head files in a head.js + helpers.js (see commandline/test). It should be possible to include helpers in other tests without impact on the test lifecycle. MozReview-Commit-ID: BU3LiEr0UtZ
32 lines
843 B
JavaScript
32 lines
843 B
JavaScript
/* vim: set ts=2 et sw=2 tw=80: */
|
|
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
"use strict";
|
|
|
|
// Test that adding a new rule is synced to the style editor.
|
|
|
|
const TESTCASE_URI = TEST_BASE_HTTP + "sync.html";
|
|
|
|
const expectedText = `
|
|
#testid {
|
|
}`;
|
|
|
|
add_task(function* () {
|
|
yield addTab(TESTCASE_URI);
|
|
let { inspector, view } = yield openRuleView();
|
|
yield selectNode("#testid", inspector);
|
|
|
|
let onRuleViewChanged = once(view, "ruleview-changed");
|
|
view.addRuleButton.click();
|
|
yield onRuleViewChanged;
|
|
|
|
let { ui } = yield openStyleEditor();
|
|
|
|
info("Selecting the second editor");
|
|
yield ui.selectStyleSheet(ui.editors[1].styleSheet);
|
|
|
|
let editor = ui.editors[1];
|
|
let text = editor.sourceEditor.getText();
|
|
is(text, expectedText, "selector edits are synced");
|
|
});
|