Bug 1262443 - Fix tests; r=pbro

This commit is contained in:
Jan Odvarko 2016-09-20 17:24:47 +02:00
Родитель f4505be3c1
Коммит f11090bde3
10 изменённых файлов: 34 добавлений и 13 удалений

Просмотреть файл

@ -11,6 +11,8 @@
// is selected, animations will be displayed in the timeline, so the timeline
// play/resume button will be displayed
add_task(function* () {
requestLongerTimeout(2);
yield addTab(URL_ROOT + "doc_simple_animation.html");
let {panel, window} = yield openAnimationInspector();
let {playTimelineButtonEl} = panel;

Просмотреть файл

@ -35,8 +35,12 @@ add_task(function* () {
is(cmdUndo.getAttribute("disabled"), "true", "cmdUndo is disabled");
is(cmdDelete.getAttribute("disabled"), "true", "cmdDelete is disabled");
is(cmdSelectAll.getAttribute("disabled"), "true", "cmdSelectAll is disabled");
is(cmdCut.getAttribute("disabled"), "true", "cmdCut is disabled");
is(cmdCopy.getAttribute("disabled"), "true", "cmdCopy is disabled");
// Cut/Copy items are enabled in context menu even if there
// is no selection. See also Bug 1303033
is(cmdCut.getAttribute("disabled"), "", "cmdCut is enabled");
is(cmdCopy.getAttribute("disabled"), "", "cmdCopy is enabled");
if (isWindows()) {
// emptyClipboard only works on Windows (666254), assert paste only for this OS.
is(cmdPaste.getAttribute("disabled"), "true", "cmdPaste is disabled");

Просмотреть файл

@ -44,8 +44,12 @@ add_task(function* () {
is(cmdUndo.getAttribute("disabled"), "true", "cmdUndo is disabled");
is(cmdDelete.getAttribute("disabled"), "true", "cmdDelete is disabled");
is(cmdSelectAll.getAttribute("disabled"), "true", "cmdSelectAll is disabled");
is(cmdCut.getAttribute("disabled"), "true", "cmdCut is disabled");
is(cmdCopy.getAttribute("disabled"), "true", "cmdCopy is disabled");
// Cut/Copy items are enabled in context menu even if there
// is no selection. See also Bug 1303033
is(cmdCut.getAttribute("disabled"), "", "cmdCut is enabled");
is(cmdCopy.getAttribute("disabled"), "", "cmdCopy is enabled");
if (isWindows()) {
// emptyClipboard only works on Windows (666254), assert paste only for this OS.
is(cmdPaste.getAttribute("disabled"), "true", "cmdPaste is disabled");

Просмотреть файл

@ -38,6 +38,7 @@ add_task(function* () {
"Should have cancelled creating a new text property.");
ok(!elementRuleEditor.propertyList.hasChildNodes(),
"Should not have any properties.");
is(view.styleDocument.activeElement, view.styleDocument.documentElement,
is(view.styleDocument.activeElement, view.styleDocument.body,
"Correct element has focus");
});

Просмотреть файл

@ -23,7 +23,7 @@ add_task(function* () {
info("Test creating a new property and escaping");
yield addProperty(view, 1, "color", "red", "VK_ESCAPE", false);
is(view.styleDocument.documentElement, view.styleDocument.activeElement,
is(view.styleDocument.activeElement, view.styleDocument.body,
"Correct element has focus");
let elementRuleEditor = getRuleViewRuleEditor(view, 1);

Просмотреть файл

@ -38,6 +38,6 @@ add_task(function* () {
is(elementRuleEditor.rule.textProps.length, 1,
"Should have canceled creating a new text property.");
is(view.styleDocument.documentElement, view.styleDocument.activeElement,
is(view.styleDocument.activeElement, view.styleDocument.body,
"Correct element has focus");
});

Просмотреть файл

@ -43,8 +43,12 @@ add_task(function* () {
is(cmdUndo.getAttribute("disabled"), "true", "cmdUndo is disabled");
is(cmdDelete.getAttribute("disabled"), "true", "cmdDelete is disabled");
is(cmdSelectAll.getAttribute("disabled"), "true", "cmdSelectAll is disabled");
is(cmdCut.getAttribute("disabled"), "true", "cmdCut is disabled");
is(cmdCopy.getAttribute("disabled"), "true", "cmdCopy is disabled");
// Cut/Copy items are enabled in context menu even if there
// is no selection. See also Bug 1303033
is(cmdCut.getAttribute("disabled"), "", "cmdCut is enabled");
is(cmdCopy.getAttribute("disabled"), "", "cmdCopy is enabled");
if (isWindows()) {
// emptyClipboard only works on Windows (666254), assert paste only for this OS.
is(cmdPaste.getAttribute("disabled"), "true", "cmdPaste is disabled");

Просмотреть файл

@ -58,7 +58,7 @@ const TEST_DATA = [
];
add_task(function* () {
requestLongerTimeout(2);
requestLongerTimeout(4);
info("Starting the test with the pref set to true before toolbox is opened");
yield setUserAgentStylesPref(true);

Просмотреть файл

@ -634,7 +634,9 @@ var togglePropStatus = Task.async(function* (view, textProp) {
*/
var focusNewRuleViewProperty = Task.async(function* (ruleEditor) {
info("Clicking on a close ruleEditor brace to start editing a new property");
ruleEditor.closeBrace.scrollIntoView();
// Use bottom alignment to avoid scrolling out of the parent element area.
ruleEditor.closeBrace.scrollIntoView(false);
let editor = yield focusEditableField(ruleEditor.ruleView,
ruleEditor.closeBrace);

Просмотреть файл

@ -41,8 +41,12 @@ add_task(function* () {
is(cmdUndo.getAttribute("disabled"), "true", "cmdUndo is disabled");
is(cmdDelete.getAttribute("disabled"), "true", "cmdDelete is disabled");
is(cmdSelectAll.getAttribute("disabled"), "true", "cmdSelectAll is disabled");
is(cmdCut.getAttribute("disabled"), "true", "cmdCut is disabled");
is(cmdCopy.getAttribute("disabled"), "true", "cmdCopy is disabled");
// Cut/Copy items are enabled in context menu even if there
// is no selection. See also Bug 1303033
is(cmdCut.getAttribute("disabled"), "", "cmdCut is enabled");
is(cmdCopy.getAttribute("disabled"), "", "cmdCopy is enabled");
if (isWindows()) {
// emptyClipboard only works on Windows (666254), assert paste only for this OS.
is(cmdPaste.getAttribute("disabled"), "true", "cmdPaste is disabled");