Bug 1482052 - add talos test with many files for the debugger; r=ochameau

We do not have a test case in talos that has many files to be loaded on start. This change adds 100
files, each around 1000 lines long.

Differential Revision: https://phabricator.services.mozilla.com/D3308

--HG--
extra : moz-landing-system : lando
This commit is contained in:
yulia 2018-08-27 12:32:29 +00:00
Родитель 73e4fdc8f6
Коммит 5b894e11fe
9 изменённых файлов: 1158 добавлений и 6 удалений

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

@ -1 +1,135 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="./manifest.json"><title>React App</title></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="./static/js/main.js"></script></body></html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
Notice the use of . in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "./favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<script type="text/javascript" src="./js/testfile.js?id=0"></script>
<script type="text/javascript" src="./js/testfile.js?id=1"></script>
<script type="text/javascript" src="./js/testfile.js?id=2"></script>
<script type="text/javascript" src="./js/testfile.js?id=3"></script>
<script type="text/javascript" src="./js/testfile.js?id=4"></script>
<script type="text/javascript" src="./js/testfile.js?id=5"></script>
<script type="text/javascript" src="./js/testfile.js?id=6"></script>
<script type="text/javascript" src="./js/testfile.js?id=7"></script>
<script type="text/javascript" src="./js/testfile.js?id=8"></script>
<script type="text/javascript" src="./js/testfile.js?id=9"></script>
<script type="text/javascript" src="./js/testfile.js?id=10"></script>
<script type="text/javascript" src="./js/testfile.js?id=11"></script>
<script type="text/javascript" src="./js/testfile.js?id=12"></script>
<script type="text/javascript" src="./js/testfile.js?id=13"></script>
<script type="text/javascript" src="./js/testfile.js?id=14"></script>
<script type="text/javascript" src="./js/testfile.js?id=15"></script>
<script type="text/javascript" src="./js/testfile.js?id=16"></script>
<script type="text/javascript" src="./js/testfile.js?id=17"></script>
<script type="text/javascript" src="./js/testfile.js?id=18"></script>
<script type="text/javascript" src="./js/testfile.js?id=19"></script>
<script type="text/javascript" src="./js/testfile.js?id=20"></script>
<script type="text/javascript" src="./js/testfile.js?id=21"></script>
<script type="text/javascript" src="./js/testfile.js?id=22"></script>
<script type="text/javascript" src="./js/testfile.js?id=23"></script>
<script type="text/javascript" src="./js/testfile.js?id=24"></script>
<script type="text/javascript" src="./js/testfile.js?id=25"></script>
<script type="text/javascript" src="./js/testfile.js?id=26"></script>
<script type="text/javascript" src="./js/testfile.js?id=27"></script>
<script type="text/javascript" src="./js/testfile.js?id=28"></script>
<script type="text/javascript" src="./js/testfile.js?id=29"></script>
<script type="text/javascript" src="./js/testfile.js?id=30"></script>
<script type="text/javascript" src="./js/testfile.js?id=31"></script>
<script type="text/javascript" src="./js/testfile.js?id=32"></script>
<script type="text/javascript" src="./js/testfile.js?id=33"></script>
<script type="text/javascript" src="./js/testfile.js?id=34"></script>
<script type="text/javascript" src="./js/testfile.js?id=35"></script>
<script type="text/javascript" src="./js/testfile.js?id=36"></script>
<script type="text/javascript" src="./js/testfile.js?id=37"></script>
<script type="text/javascript" src="./js/testfile.js?id=38"></script>
<script type="text/javascript" src="./js/testfile.js?id=39"></script>
<script type="text/javascript" src="./js/testfile.js?id=40"></script>
<script type="text/javascript" src="./js/testfile.js?id=41"></script>
<script type="text/javascript" src="./js/testfile.js?id=42"></script>
<script type="text/javascript" src="./js/testfile.js?id=43"></script>
<script type="text/javascript" src="./js/testfile.js?id=44"></script>
<script type="text/javascript" src="./js/testfile.js?id=45"></script>
<script type="text/javascript" src="./js/testfile.js?id=46"></script>
<script type="text/javascript" src="./js/testfile.js?id=47"></script>
<script type="text/javascript" src="./js/testfile.js?id=48"></script>
<script type="text/javascript" src="./js/testfile.js?id=49"></script>
<script type="text/javascript" src="./js/testfile.js?id=50"></script>
<script type="text/javascript" src="./js/testfile.js?id=51"></script>
<script type="text/javascript" src="./js/testfile.js?id=52"></script>
<script type="text/javascript" src="./js/testfile.js?id=53"></script>
<script type="text/javascript" src="./js/testfile.js?id=54"></script>
<script type="text/javascript" src="./js/testfile.js?id=55"></script>
<script type="text/javascript" src="./js/testfile.js?id=56"></script>
<script type="text/javascript" src="./js/testfile.js?id=57"></script>
<script type="text/javascript" src="./js/testfile.js?id=58"></script>
<script type="text/javascript" src="./js/testfile.js?id=59"></script>
<script type="text/javascript" src="./js/testfile.js?id=60"></script>
<script type="text/javascript" src="./js/testfile.js?id=61"></script>
<script type="text/javascript" src="./js/testfile.js?id=62"></script>
<script type="text/javascript" src="./js/testfile.js?id=63"></script>
<script type="text/javascript" src="./js/testfile.js?id=64"></script>
<script type="text/javascript" src="./js/testfile.js?id=65"></script>
<script type="text/javascript" src="./js/testfile.js?id=66"></script>
<script type="text/javascript" src="./js/testfile.js?id=67"></script>
<script type="text/javascript" src="./js/testfile.js?id=68"></script>
<script type="text/javascript" src="./js/testfile.js?id=69"></script>
<script type="text/javascript" src="./js/testfile.js?id=70"></script>
<script type="text/javascript" src="./js/testfile.js?id=71"></script>
<script type="text/javascript" src="./js/testfile.js?id=72"></script>
<script type="text/javascript" src="./js/testfile.js?id=73"></script>
<script type="text/javascript" src="./js/testfile.js?id=74"></script>
<script type="text/javascript" src="./js/testfile.js?id=75"></script>
<script type="text/javascript" src="./js/testfile.js?id=76"></script>
<script type="text/javascript" src="./js/testfile.js?id=77"></script>
<script type="text/javascript" src="./js/testfile.js?id=78"></script>
<script type="text/javascript" src="./js/testfile.js?id=79"></script>
<script type="text/javascript" src="./js/testfile.js?id=80"></script>
<script type="text/javascript" src="./js/testfile.js?id=81"></script>
<script type="text/javascript" src="./js/testfile.js?id=82"></script>
<script type="text/javascript" src="./js/testfile.js?id=83"></script>
<script type="text/javascript" src="./js/testfile.js?id=84"></script>
<script type="text/javascript" src="./js/testfile.js?id=85"></script>
<script type="text/javascript" src="./js/testfile.js?id=86"></script>
<script type="text/javascript" src="./js/testfile.js?id=87"></script>
<script type="text/javascript" src="./js/testfile.js?id=88"></script>
<script type="text/javascript" src="./js/testfile.js?id=89"></script>
<script type="text/javascript" src="./js/testfile.js?id=90"></script>
<script type="text/javascript" src="./js/testfile.js?id=91"></script>
<script type="text/javascript" src="./js/testfile.js?id=92"></script>
<script type="text/javascript" src="./js/testfile.js?id=93"></script>
<script type="text/javascript" src="./js/testfile.js?id=94"></script>
<script type="text/javascript" src="./js/testfile.js?id=95"></script>
<script type="text/javascript" src="./js/testfile.js?id=96"></script>
<script type="text/javascript" src="./js/testfile.js?id=97"></script>
<script type="text/javascript" src="./js/testfile.js?id=98"></script>
<script type="text/javascript" src="./js/testfile.js?id=99"></script>
<script type="text/javascript" src="./js/testfile.js?id=100"></script>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<script type="text/javascript" src="./static/js/main.js"></script></body>
</html>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

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

@ -10,6 +10,7 @@ const { openDebuggerAndLog, reloadDebuggerAndLog } = require("./debugger-helpers
const EXPECTED = {
sources: 14,
file: "ga.js",
sourceURL: COMPLICATED_URL,
text: "Math;function ga(a,b){return a.name=b}"
};

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

@ -11,8 +11,9 @@ const { createContext, openDebuggerAndLog, pauseDebugger, reloadDebuggerAndLog,
removeBreakpoints, resume, step } = require("./debugger-helpers");
const EXPECTED = {
sources: 7,
sources: 107,
file: "App.js",
sourceURL: `${PAGES_BASE_URL}custom/debugger/static/js/App.js`,
text: "import React, { Component } from 'react';"
};

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

@ -122,6 +122,14 @@ function waitForSources(dbg, expectedSources) {
return waitForState(dbg, countSources, "count sources");
}
function waitForSource(dbg, sourceURL) {
const { selectors } = dbg;
function hasSource(state) {
return selectors.getSourceByURL(state, sourceURL);
}
return waitForState(dbg, hasSource, `has source ${sourceURL}`);
}
async function waitForPaused(dbg) {
const onLoadedScope = waitForLoadedScopes(dbg);
const onStateChange = waitForState(
@ -201,7 +209,7 @@ function evalInContent(dbg, tab, testFunction) {
async function openDebuggerAndLog(label, expected) {
const onLoad = async (toolbox, panel) => {
const dbg = await createContext(panel);
await waitForSources(dbg, expected.sources);
await waitForSource(dbg, expected.sourceURL);
await selectSource(dbg, expected.file);
await waitForText(dbg, expected.file, expected.text);
await waitForMetaData(dbg);

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

@ -10,6 +10,7 @@ const { openDebuggerAndLog, reloadDebuggerAndLog } = require("./debugger-helpers
const EXPECTED = {
sources: 1,
file: "simple.html",
sourceURL: SIMPLE_URL,
text: "This is a simple page"
};

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

@ -66,6 +66,12 @@ exports.getToolbox = function() {
return gDevTools.getToolbox(target);
};
exports.navigateTo = function(url) {
let tab = getActiveTab();
let target = TargetFactory.forTab(tab);
target.activeTab.navigateTo(url);
};
/**
* Wait for any pending paint.
* The tool may have touched the DOM elements at the very end of the current test.