mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1246843 - Add a default page for mozscreenshots mochitest;r=MattN
MozReview-Commit-ID: Cv74fVKrUkQ
This commit is contained in:
parent
406dc13a1d
commit
4a87e7e277
@ -9,7 +9,9 @@ this.EXPORTED_SYMBOLS = ["TestRunner"];
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
||||
const defaultSetNames = ["TabsInTitlebar", "Tabs", "WindowSize", "Toolbars", "LightweightThemes"];
|
||||
const env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
|
||||
const HOME_PAGE = "chrome://mozscreenshots/content/lib/mozscreenshots.html";
|
||||
|
||||
Cu.import("resource://testing-common/BrowserTestUtils.jsm");
|
||||
Cu.import("resource://gre/modules/FileUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/Task.jsm");
|
||||
@ -46,7 +48,7 @@ this.TestRunner = {
|
||||
/**
|
||||
* Load specified sets, execute all combinations of them, and capture screenshots.
|
||||
*/
|
||||
start(setNames = null) {
|
||||
start: Task.async(function*(setNames = null) {
|
||||
setNames = setNames || defaultSetNames;
|
||||
|
||||
let subDirs = ["mozscreenshots",
|
||||
@ -83,18 +85,20 @@ this.TestRunner = {
|
||||
// Don't let the caret blink since it causes false positives for image diffs
|
||||
Services.prefs.setIntPref("ui.caretBlinkTime", -1);
|
||||
|
||||
return Task.spawn(function* doStart() {
|
||||
for (let i = 0; i < this.combos.length;
|
||||
i++){
|
||||
this.currentComboIndex = i;
|
||||
yield* this._performCombo(this.combos.item(this.currentComboIndex));
|
||||
}
|
||||
let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
let selectedBrowser = browserWindow.gBrowser.selectedBrowser;
|
||||
yield BrowserTestUtils.loadURI(selectedBrowser, HOME_PAGE);
|
||||
yield BrowserTestUtils.browserLoaded(selectedBrowser);
|
||||
|
||||
log.info("Done: Completed " + this.completedCombos + " out of " +
|
||||
this.combos.length + " configurations.");
|
||||
this.cleanup();
|
||||
}.bind(this));
|
||||
},
|
||||
for (let i = 0; i < this.combos.length; i++){
|
||||
this.currentComboIndex = i;
|
||||
yield this._performCombo(this.combos.item(this.currentComboIndex));
|
||||
}
|
||||
|
||||
log.info("Done: Completed " + this.completedCombos + " out of " +
|
||||
this.combos.length + " configurations.");
|
||||
this.cleanup();
|
||||
}),
|
||||
|
||||
/**
|
||||
* Load sets of configurations from JSMs.
|
||||
|
@ -62,11 +62,3 @@ function uninstallExtension(data) {
|
||||
addon.uninstall();
|
||||
});
|
||||
}
|
||||
|
||||
function startRun() {
|
||||
let env = Cc["@mozilla.org/process/environment;1"]
|
||||
.getService(Ci.nsIEnvironment);
|
||||
let setsEnv = env.get("MOZSCREENSHOTS_SETS");
|
||||
let sets = setsEnv ? setsEnv.split(",") : null;
|
||||
TestRunner.start(sets);
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ mozscreenshots.jar:
|
||||
Screenshot.jsm
|
||||
TestRunner.jsm
|
||||
configurations/ (configurations/*.jsm)
|
||||
lib/ (lib/*.png)
|
||||
lib/ (lib/*)
|
||||
|
@ -0,0 +1,13 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
console.log(document, document.body);
|
||||
console.assert(false, "Failing mozscreenshots assertion");
|
||||
|
||||
console.group("Grouped Message");
|
||||
console.log("group message 1");
|
||||
console.groupEnd("Grouped Message");
|
||||
|
||||
console.count("counter");
|
||||
console.count("counter");
|
@ -0,0 +1,28 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
body {
|
||||
--background-color: #f3f3f3;
|
||||
background: tomato;
|
||||
}
|
||||
|
||||
body {
|
||||
background: var(--background-color);
|
||||
color: #222;
|
||||
padding: 0 10px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
header {
|
||||
background: #eee;
|
||||
border-bottom: solid 2px #ccc;
|
||||
margin: 0 -10px;
|
||||
margin-bottom: 5px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>mozscreenshots</title>
|
||||
<link rel="stylesheet" href="mozscreenshots-style.css" />
|
||||
<script>console.info("This page was generated by mozscreenshots");</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header><h1>mozscreenshots</h1></header>
|
||||
|
||||
<p>
|
||||
This page was generated by mozscreenshots
|
||||
</p>
|
||||
|
||||
<img src="robot.png" />
|
||||
|
||||
<p>Welcome Humans! We invite others to keep the Manifesto’s principles; use the creation delivery and commitment. Advancing the Manifesto. We have shiny metal posteriors which <strong>should not be bitten</strong>. And they have distilled a public benefit is committed to use Mozilla project one basic and communities of modern life.</p>
|
||||
|
||||
<p>Robots have <mark>distilled a balance between commercial aspects of life</mark>.</p>
|
||||
|
||||
<p>Robots may not they have shown in education communication collaboration business entertainment and other people to pursue; speak to continue; and opportunity are many different ways to benefit the public benefit the Manifesto’s principles; build and motivate us and trademarks infrastructure funds and trademarks infrastructure funds and enable open-source technologies and provide a whole. </p>
|
||||
|
||||
<p>And they have seen things you people who believe that Mozilla Manifesto. We are to: articulate a vision of individual human being to benefit the lives of these efforts we will: build and promote models for creating economic value for the Internet. We create world-class open and anticipate the Mozilla Manifesto <strong>There are Your Plastic Pal Who's Fun To Be With</strong></p>
|
||||
|
||||
<p>Some Foundation to advance this vision of individual human being or not deeply involved in groups and promote models for the Manifesto principles will not come to support the Mozilla Foundation Pledge The Mozilla Manifesto in its activities. People are to: articulate a set of consumer products that support <mark>the Internet is a human being</mark> or not be treated as individuals working together in the development of the Internet open and with goodwill!Specifically we believe that we will: build and society as a public good as a result of the lives of collaborative activities. Specifically we have seen things you people acting as optional. Individuals must not come to continue to develop new ways of the Internet are fundamental and with us to ensure that openness innovation and very effective way that the Manifesto There are many benefits; a global public benefit; and society as optional.</p>
|
||||
|
||||
<p><strong>We have metal posteriors which should not deeply involved in a reality.</strong> Individuals must remain open source software promotes the Internet is a balance between commercial profit and within the Mozilla Corporation. Invitation The Internet are key to join us to life on their own. The Internet a whole. The Internet as a vision of the Mozilla contributors proud of time attention and motivate us and provide a reality.</p>
|
||||
|
||||
<script src="mozscreenshots-script.js"></script>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
After Width: | Height: | Size: 9.6 KiB |
Loading…
Reference in New Issue
Block a user