mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 02:40:22 -10:00
- mochitest folder is renamed browser. - unit folder is rename xpcshell. - all the file and folder for mocha are put in a node folder. We take this as an opportunity to revist our stub-generating mochitests. Previously we had 2 tests for each kind of stubs, one for check, the other one for updating. It was not ideal when you wanted to update all the stubs at once because you add either to mention every 5 files, or unskip the update test files. We now merge the update and the check files in a single test. By default, the test that the stubs are up to date, and if you pass the --setenv WEBCONSOLE_STUBS_UPDATE=true param, it will update the stubs. This allow us to move the function that actually generate the stub in the test file, and have a helper file for multi-purpose functions. Because these tests are failing on TRY, let's disabled them so we can land the test re-organization (we'll re-enable them in Bug 1572667). Differential Revision: https://phabricator.services.mozilla.com/D41344
45 lines
1.4 KiB
JavaScript
45 lines
1.4 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
// Test that getter properties that return long strings can be expanded. See Bug 1481833.
|
|
|
|
"use strict";
|
|
|
|
const LONGSTRING = "a ".repeat(10000);
|
|
const TEST_URI = `data:text/html,Test expanding longString getter property
|
|
<svg>
|
|
<image xlink:href="data:image/png;base64,${LONGSTRING}"></image>
|
|
</svg>
|
|
<script>
|
|
console.dir("Test message", document.querySelector("svg image").href);
|
|
</script>`;
|
|
|
|
add_task(async function() {
|
|
const hud = await openNewTabAndConsole(TEST_URI);
|
|
|
|
// Retrieve the logged message.
|
|
const message = await waitFor(() => findMessage(hud, "Test message"));
|
|
|
|
// Wait until the SVGAnimatedString is expanded.
|
|
await waitFor(() => message.querySelectorAll(".arrow").length > 1);
|
|
|
|
const arrow = message.querySelectorAll(".arrow")[1];
|
|
ok(arrow, "longString expand arrow is shown");
|
|
|
|
info("wait for long string expansion");
|
|
const onLongStringFullTextDisplayed = waitFor(() =>
|
|
findMessage(hud, LONGSTRING)
|
|
);
|
|
arrow.click();
|
|
await onLongStringFullTextDisplayed;
|
|
|
|
ok(true, "The full text of the longString is displayed");
|
|
|
|
info("wait for long string collapse");
|
|
const onLongStringCollapsed = waitFor(() => !findMessage(hud, LONGSTRING));
|
|
arrow.click();
|
|
await onLongStringCollapsed;
|
|
|
|
ok(true, "The longString can be collapsed");
|
|
});
|