Bug 1344294 - Bump Debugger 3/3/2017. r=gtatum

This commit is contained in:
Jason Laster 2017-03-03 18:34:00 -05:00
parent 48fc4f10ec
commit 936a43f195
39 changed files with 28044 additions and 26555 deletions

View File

@ -202,6 +202,7 @@
.landing-page .sidebar li:focus a {
color: inherit;
}
:root.theme-light,
:root .theme-light {
--theme-search-overlays-semitransparent: rgba(221, 225, 228, 0.66);
@ -891,6 +892,15 @@ selector in floating-scrollbar-light.css across all platforms. */
.CodeMirror-Tern-fhint-guess {
opacity: .7;
}
:root.theme-light,
:root .theme-light {
--search-overlays-semitransparent: rgba(221, 225, 228, 0.66);
}
:root.theme-dark,
:root .theme-dark {
--search-overlays-semitransparent: rgba(42, 46, 56, 0.66);
}
.debugger {
display: flex;
flex: 1;
@ -922,7 +932,7 @@ selector in floating-scrollbar-light.css across all platforms. */
height: 100%;
display: flex;
z-index: 200;
background-color: var(--theme-search-overlays-semitransparent);
background-color: var(--search-overlays-semitransparent);
}
.search-container .close-button {
@ -1275,6 +1285,10 @@ menuseparator {
border-bottom: 1px solid var(--theme-splitter-color);
}
.theme-dark .result-list li .subtitle {
color: var(--theme-comment-alt);
}
.arrow,
.folder,
.domain,
@ -1413,6 +1427,7 @@ html .arrow.expanded svg {
background-color: var(--theme-body-background);
border-bottom: 1px solid var(--theme-splitter-color);
display: flex;
flex-shrink: 0;
}
.search-field i {
@ -1430,11 +1445,15 @@ html .arrow.expanded svg {
line-height: 30px;
font-size: 14px;
background-color: var(--theme-body-background);
color: var(--theme-comment);
color: var(--theme-comment-alt);
width: calc(100% - 38px);
flex: 1;
}
.theme-dark .search-field input {
color: var(--theme-comment-alt);
}
.search-field .magnifying-glass {
background-color: var(--theme-body-background);
}
@ -1445,7 +1464,7 @@ html .arrow.expanded svg {
}
.search-field input::placeholder {
color: var(--theme-body-color-inactive);
color: var(--theme-comment-alt);
}
.search-field input:focus {
@ -1597,6 +1616,10 @@ html[dir="rtl"] .tree .node > div {
justify-content: flex-end;
}
.theme-dark .sources-header {
background-color: var(--theme-tab-toolbar-background);
}
.sources-header {
padding-inline-start: 10px;
}
@ -1633,6 +1656,11 @@ html[dir="rtl"] .tree .node > div {
fill: var(--theme-comment);
}
.theme-dark .toggle-button-start svg,
.theme-dark .toggle-button-end svg {
fill: var(--theme-comment-alt);
}
.toggle-button-end {
margin-left: auto;
}
@ -1722,6 +1750,11 @@ html .toggle-button-end.vertical svg {
max-height: 50%;
}
.search-bottom-bar * {
-moz-user-select: none;
user-select: none;
}
.search-bottom-bar {
display: flex;
flex-shrink: 0;
@ -1733,6 +1766,10 @@ html .toggle-button-end.vertical svg {
padding: 0 13px;
}
.search-bottom-bar button:focus {
outline: none;
}
.search-bottom-bar .search-modifiers {
display: flex;
align-items: center;
@ -1757,24 +1794,38 @@ html .toggle-button-end.vertical svg {
}
.search-bottom-bar .search-modifiers button svg {
fill: var(--theme-comment);
fill: var(--theme-comment-alt);
height: 16px;
width: 16px;
}
.search-bottom-bar .search-modifiers button.active {
background-color: var(--theme-selection-background);
.search-bottom-bar .search-modifiers button svg:hover {
cursor: pointer;
}
.search-bottom-bar .search-modifiers button:active {
outline: none;
}
.search-bottom-bar .search-modifiers button.active svg {
fill: var(--theme-selection-background);
}
.theme-dark .search-bottom-bar .search-modifiers button.active svg {
fill: white;
}
.search-bottom-bar .search-modifiers button.disabled svg {
fill: var(--theme-comment-alt);
}
.search-bottom-bar .search-type-toggles {
display: flex;
align-items: center;
}
.search-bottom-bar .search-type-toggles h1 {
color: var(--theme-comment);
.search-bottom-bar .search-type-toggles .search-toggle-title {
color: var(--theme-comment-alt);
font-size: 12px;
margin: 0;
}
@ -1786,61 +1837,162 @@ html .toggle-button-end.vertical svg {
color: var(--theme-comment-alt);
}
.search-bottom-bar .search-type-toggles .search-type-btn:hover {
cursor: pointer;
}
.search-bottom-bar .search-type-toggles .search-type-btn:active {
outline: none;
}
.search-bottom-bar .search-type-toggles .search-type-btn.active {
color: var(--theme-selection-background);
font-weight: bold;
}
.theme-dark .search-bottom-bar .search-type-toggles .search-type-btn.active {
color: white;
}
.search-bar .result-list {
max-height: calc(100% - 80px);
border-bottom: 1px solid var(--theme-splitter-color);
background-color: var(--theme-body-background);
}
.search-bar .result-list li {
border: none;
color: var(--theme-body-color);
border-bottom: 1px solid var(--theme-splitter-color);
padding: 4px 13px;
margin: 0;
display: flex;
justify-content: space-between;
}
.search-bar .result-list li:first-child {
border-top: none;
}
.search-bar .result-list li {
border: none;
color: var(--theme-comment);
border-top: 1px solid var(--theme-splitter-color);
border-bottom: 1px solid var(--theme-splitter-color);
background-color: var(--theme-tab-toolbar-background);
padding: 4px;
margin: 0;
display: flex;
.search-bar .result-list li:last-child {
border-bottom: none;
}
.search-bar .result-list li.selected,
.search-bar .result-list li.selected .subtitle {
color: var(--theme-body-background);
.search-bar .result-list li.selected {
background-color: var(--theme-selection-background);
}
.search-bar .result-list li .title {
font-weight: bold;
flex-grow: 2;
flex-basis: 95%;
color: white;
}
.search-bar .result-list li .subtitle {
font-weight: lighter;
flex-grow: 1;
flex-basis: 5%;
}
.search-bar .result-list li.selected .subtitle {
color: white;
}
.theme-dark .result-list {
background-color: var(--theme-body-background);
}
.popover {
position: absolute;
background: white;
position: fixed;
z-index: 4;
}
.popover-gap {
height: 10px;
padding-top: 10px;
}
.popover::before,
.popover::after {
content: '';
height: 0;
width: 0;
position: absolute;
border: 10px solid transparent;
left: calc(20% - 10px); /* corresponds to calculation in Popover.js */
}
.popover::before {
border-bottom-color: var(--theme-comment);
top: -10px;
}
.popover::after {
border-bottom-color: var(--theme-body-background);
top: -8px;
}
.preview {
background: var(--theme-body-background);
min-width: 200px;
min-height: 80px;
border: 1px solid #cccccc;
border: 1px solid var(--theme-comment);
padding: 10px;
height: auto;
min-height: inherit;
max-height: 130px;
overflow: scroll;
overflow: auto;
max-width: 400px;
}
.preview .header {
width: 100%;
line-height: 20px;
border-bottom: 1px solid #cccccc;
display: flex;
flex-direction: column;
}
.preview .header .link {
align-self: flex-end;
color: var(--theme-highlight-blue);
text-decoration: underline;
}
.preview .header .link:hover {
cursor: pointer;
}
.selected-token {
background-color: var(--theme-search-overlays-semitransparent);
color: var(--theme-selection-color);
}
.selected-token:hover {
cursor: pointer;
}
.preview .function-signature {
padding-top: 10px;
}
.function-signature {
line-height: 20px;
align-self: center;
}
.function-signature .function-name {
color: var(--theme-highlight-blue);
}
.function-signature .param {
color: var(--string-color);
}
.function-signature .paren {
color: var(--object-color);
}
.function-signature .comma {
color: var(--object-color);
}
.theme-dark .preview {
border-color: var(--theme-body-color);
}
.theme-dark .preview .arrow svg {
fill: var(--theme-comment);
}
.conditional-breakpoint-panel {
cursor: initial;
margin: 1em 0;
@ -1854,7 +2006,7 @@ html .toggle-button-end.vertical svg {
.conditional-breakpoint-panel .prompt {
font-size: 1.8em;
color: var(--theme-highlight-blue);
color: var(--theme-comment-alt);
padding-left: 3px;
}
@ -1969,6 +2121,10 @@ html[dir="rtl"] .editor-mount {
line-height: 14px;
}
.theme-dark .editor-wrapper .CodeMirror-line .cm-comment {
color: var(--theme-content-color3);
}
.debug-line .CodeMirror-line {
background-color: var(--breakpoint-active-color) !important;
}
@ -2047,6 +2203,7 @@ html[dir="rtl"] .editor-mount {
color: var(--theme-body-color);
background-color: var(--theme-body-background);
display: flex;
position: relative;
}
.expression-container > .tree {
@ -2059,20 +2216,21 @@ html[dir="rtl"] .editor-mount {
}
:root.theme-dark .expression-container:hover {
background-color: var(--theme-search-overlays-semitransparent);
background-color: var(--search-overlays-semitransparent);
}
.expression-container .close-btn {
display: none;
cursor: pointer;
width: 20px;
height: 20px;
padding: 0 4px;
margin: 0;
position: absolute;
offset-inline-end: 6px;
top: 6px;
}
.expression-container:hover .close-btn {
display: flex;
.expression-container .close {
display: none;
}
.expression-container:hover .close {
display: block;
}
.expression-input {
@ -2155,7 +2313,7 @@ html .breakpoints-list .breakpoint.paused {
.breakpoints-list .breakpoint:hover {
cursor: pointer;
background-color: var(--theme-search-overlays-semitransparent);
background-color: var(--search-overlays-semitransparent);
}
.breakpoints-list .breakpoint.paused:hover {
@ -2314,7 +2472,7 @@ html .breakpoints-list .breakpoint.paused {
}
.show-more:hover {
background-color: var(--theme-search-overlays-semitransparent);
background-color: var(--search-overlays-semitransparent);
}
.event-listeners {
list-style: none;
@ -2388,7 +2546,7 @@ html .breakpoints-list .breakpoint.paused {
}
.accordion ._header:hover {
background-color: var(--theme-search-overlays-semitransparent);
background-color: var(--search-overlays-semitransparent);
}
.accordion ._header button svg,
@ -2436,7 +2594,10 @@ html .breakpoints-list .breakpoint.paused {
position: sticky;
top: 0;
z-index: 1;
background-color: var(--theme-body-background);
}
.theme-dark .command-bar {
background-color: var(--theme-tab-toolbar-background);
}
.command-bar > button {
@ -2549,17 +2710,22 @@ html .welcomebox .toggle-button-end {
top: auto;
}
.dropdown {
--width: 150px;
background: var(--theme-body-background);
border: 1px solid var(--theme-splitter-color);
box-shadow: 0 4px 4px 0 var(--theme-search-overlays-semitransparent);
box-shadow: 0 4px 4px 0 var(--search-overlays-semitransparent);
max-height: 300px;
position: absolute;
offset-inline-end: 8px;
right: 8px;
top: 35px;
width: 150px;
width: var(--width);
z-index: 1000;
}
html[dir="rtl"] .dropdown {
right: calc((var(--width) - 11px) * (-1));
}
.dropdown-block {
padding: 0px 2px;
position: relative;
@ -2587,7 +2753,7 @@ html .welcomebox .toggle-button-end {
}
.dropdown li:hover {
background-color: var(--theme-search-overlays-semitransparent);
background-color: var(--search-overlays-semitransparent);
cursor: pointer;
}
@ -2613,7 +2779,6 @@ html .welcomebox .toggle-button-end {
width: 100%;
height: 30px;
display: flex;
justify-content: space-between;
align-items: flex-end;
}
@ -2641,7 +2806,6 @@ html .welcomebox .toggle-button-end {
}
.source-tab {
color: var(--theme-faded-tab-color);
border: 1px solid transparent;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
@ -2670,10 +2834,6 @@ html .welcomebox .toggle-button-end {
border-bottom-color: transparent;
}
.source-tab path {
fill: var(--theme-faded-tab-color);
}
.source-tab.active path,
.source-tab:hover path {
fill: var(--theme-body-color);
@ -2724,4 +2884,4 @@ html .welcomebox .toggle-button-end {
display: inline-block;
}
/*# sourceMappingURL=debugger.css.map*/
/*# sourceMappingURL=debugger.css.map*/

File diff suppressed because one or more lines are too long

View File

@ -17,7 +17,7 @@
</head>
<body>
<div id="mount"></div>
<script type="application/javascript"
<script type="application/javascript;version=1.8"
src="chrome://devtools/content/shared/theme-switching.js"></script>
<script type="text/javascript">
const { BrowserLoader } = Components.utils.import("resource://devtools/client/shared/browser-loader.js", {});

View File

@ -6,7 +6,6 @@
DevToolsModules(
'debugger.css',
'debugger.js',
'integration-tests.js',
'panel.js',
'pretty-print-worker.js',
'source-map-worker.js'

View File

@ -55,7 +55,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ 0:
/***/ function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(788);
module.exports = __webpack_require__(801);
/***/ },
@ -75,12 +75,12 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 788:
/***/ 801:
/***/ function(module, exports, __webpack_require__) {
"use strict";
var prettyFast = __webpack_require__(789);
var prettyFast = __webpack_require__(802);
var assert = __webpack_require__(223);
function prettyPrint(_ref) {
@ -145,7 +145,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 789:
/***/ 802:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
@ -167,8 +167,8 @@ return /******/ (function(modules) { // webpackBootstrap
}(this, function () {
"use strict";
var acorn = this.acorn || __webpack_require__(790);
var sourceMap = this.sourceMap || __webpack_require__(791);
var acorn = this.acorn || __webpack_require__(803);
var sourceMap = this.sourceMap || __webpack_require__(804);
var SourceNode = sourceMap.SourceNode;
// If any of these tokens are seen before a "[" token, we know that "[" token
@ -1027,7 +1027,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 790:
/***/ 803:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Acorn is a tiny, fast JavaScript parser written in JavaScript.
@ -3687,7 +3687,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 791:
/***/ 804:
/***/ function(module, exports, __webpack_require__) {
/*
@ -3695,14 +3695,14 @@ return /******/ (function(modules) { // webpackBootstrap
* Licensed under the New BSD license. See LICENSE.txt or:
* http://opensource.org/licenses/BSD-3-Clause
*/
exports.SourceMapGenerator = __webpack_require__(792).SourceMapGenerator;
exports.SourceMapConsumer = __webpack_require__(798).SourceMapConsumer;
exports.SourceNode = __webpack_require__(800).SourceNode;
exports.SourceMapGenerator = __webpack_require__(805).SourceMapGenerator;
exports.SourceMapConsumer = __webpack_require__(811).SourceMapConsumer;
exports.SourceNode = __webpack_require__(813).SourceNode;
/***/ },
/***/ 792:
/***/ 805:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -3716,10 +3716,10 @@ return /******/ (function(modules) { // webpackBootstrap
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var base64VLQ = __webpack_require__(793);
var util = __webpack_require__(795);
var ArraySet = __webpack_require__(796).ArraySet;
var MappingList = __webpack_require__(797).MappingList;
var base64VLQ = __webpack_require__(806);
var util = __webpack_require__(808);
var ArraySet = __webpack_require__(809).ArraySet;
var MappingList = __webpack_require__(810).MappingList;
/**
* An instance of the SourceMapGenerator represents a source map which is
@ -4109,7 +4109,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 793:
/***/ 806:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4153,7 +4153,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var base64 = __webpack_require__(794);
var base64 = __webpack_require__(807);
// A single base 64 digit can contain 6 bits of data. For the base 64 variable
// length quantities we use in the source map spec, the first bit is the sign,
@ -4258,7 +4258,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 794:
/***/ 807:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4307,7 +4307,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 795:
/***/ 808:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4633,7 +4633,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 796:
/***/ 809:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4647,7 +4647,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var util = __webpack_require__(795);
var util = __webpack_require__(808);
/**
* A data structure which is a combination of an array and a set. Adding a new
@ -4737,7 +4737,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 797:
/***/ 810:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4751,7 +4751,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var util = __webpack_require__(795);
var util = __webpack_require__(808);
/**
* Determine whether mappingB is after mappingA with respect to generated
@ -4830,7 +4830,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 798:
/***/ 811:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4844,10 +4844,10 @@ return /******/ (function(modules) { // webpackBootstrap
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var util = __webpack_require__(795);
var binarySearch = __webpack_require__(799);
var ArraySet = __webpack_require__(796).ArraySet;
var base64VLQ = __webpack_require__(793);
var util = __webpack_require__(808);
var binarySearch = __webpack_require__(812);
var ArraySet = __webpack_require__(809).ArraySet;
var base64VLQ = __webpack_require__(806);
/**
* A SourceMapConsumer instance represents a parsed source map which we can
@ -5412,7 +5412,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 799:
/***/ 812:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -5499,7 +5499,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 800:
/***/ 813:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -5513,8 +5513,8 @@ return /******/ (function(modules) { // webpackBootstrap
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var SourceMapGenerator = __webpack_require__(792).SourceMapGenerator;
var util = __webpack_require__(795);
var SourceMapGenerator = __webpack_require__(805).SourceMapGenerator;
var util = __webpack_require__(808);
// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
// operating systems these days (capturing the result).

View File

@ -55,7 +55,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ 0:
/***/ function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(801);
module.exports = __webpack_require__(814);
/***/ },
@ -200,6 +200,12 @@ return /******/ (function(modules) { // webpackBootstrap
return url.replace(/:formatted$/, "");
}
function getFilenameFromURL(url) {
url = getRawSourceURL(url || "");
var name = basename(url) || "(index)";
return endTruncateStr(name, 50);
}
/**
* Show a source url's filename.
* If the source does not have a url, use the source id.
@ -216,9 +222,7 @@ return /******/ (function(modules) { // webpackBootstrap
return `SOURCE${sourceId}`;
}
url = getRawSourceURL(url || "");
var name = basename(url) || "(index)";
return endTruncateStr(name, 50);
return getFilenameFromURL(url);
}
var contentTypeModeMap = {
@ -305,6 +309,7 @@ return /******/ (function(modules) { // webpackBootstrap
getPrettySourceURL,
getRawSourceURL,
getFilename,
getFilenameFromURL,
getMode,
getContentType
};
@ -850,7 +855,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 568:
/***/ 334:
/***/ function(module, exports, __webpack_require__) {
// Copyright Joyent, Inc. and other Node contributors.
@ -876,8 +881,8 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
var punycode = __webpack_require__(569);
var util = __webpack_require__(570);
var punycode = __webpack_require__(335);
var util = __webpack_require__(336);
exports.parse = urlParse;
exports.resolve = urlResolve;
@ -952,7 +957,7 @@ return /******/ (function(modules) { // webpackBootstrap
'gopher:': true,
'file:': true
},
querystring = __webpack_require__(571);
querystring = __webpack_require__(337);
function urlParse(url, parseQueryString, slashesDenoteHost) {
if (url && util.isObject(url) && url instanceof Url) return url;
@ -1589,7 +1594,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 569:
/***/ 335:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module, global) {/*! https://mths.be/punycode v1.3.2 by @mathias */
@ -2125,7 +2130,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 570:
/***/ 336:
/***/ function(module, exports) {
'use strict';
@ -2148,18 +2153,18 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 571:
/***/ 337:
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.decode = exports.parse = __webpack_require__(572);
exports.encode = exports.stringify = __webpack_require__(573);
exports.decode = exports.parse = __webpack_require__(338);
exports.encode = exports.stringify = __webpack_require__(339);
/***/ },
/***/ 572:
/***/ 338:
/***/ function(module, exports) {
// Copyright Joyent, Inc. and other Node contributors.
@ -2246,7 +2251,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 573:
/***/ 339:
/***/ function(module, exports) {
// Copyright Joyent, Inc. and other Node contributors.
@ -2317,7 +2322,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 801:
/***/ 814:
/***/ function(module, exports, __webpack_require__) {
"use strict";
@ -2455,12 +2460,12 @@ return /******/ (function(modules) { // webpackBootstrap
var networkRequest = __webpack_require__(127);
var _require = __webpack_require__(568),
var _require = __webpack_require__(334),
parse = _require.parse;
var path = __webpack_require__(235);
var _require2 = __webpack_require__(802),
var _require2 = __webpack_require__(815),
SourceMapConsumer = _require2.SourceMapConsumer,
SourceMapGenerator = _require2.SourceMapGenerator;
@ -2597,7 +2602,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 802:
/***/ 815:
/***/ function(module, exports, __webpack_require__) {
/*
@ -2605,14 +2610,14 @@ return /******/ (function(modules) { // webpackBootstrap
* Licensed under the New BSD license. See LICENSE.txt or:
* http://opensource.org/licenses/BSD-3-Clause
*/
exports.SourceMapGenerator = __webpack_require__(803).SourceMapGenerator;
exports.SourceMapConsumer = __webpack_require__(809).SourceMapConsumer;
exports.SourceNode = __webpack_require__(812).SourceNode;
exports.SourceMapGenerator = __webpack_require__(816).SourceMapGenerator;
exports.SourceMapConsumer = __webpack_require__(822).SourceMapConsumer;
exports.SourceNode = __webpack_require__(825).SourceNode;
/***/ },
/***/ 803:
/***/ 816:
/***/ function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@ -2622,10 +2627,10 @@ return /******/ (function(modules) { // webpackBootstrap
* http://opensource.org/licenses/BSD-3-Clause
*/
var base64VLQ = __webpack_require__(804);
var util = __webpack_require__(806);
var ArraySet = __webpack_require__(807).ArraySet;
var MappingList = __webpack_require__(808).MappingList;
var base64VLQ = __webpack_require__(817);
var util = __webpack_require__(819);
var ArraySet = __webpack_require__(820).ArraySet;
var MappingList = __webpack_require__(821).MappingList;
/**
* An instance of the SourceMapGenerator represents a source map which is
@ -3023,7 +3028,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 804:
/***/ 817:
/***/ function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@ -3063,7 +3068,7 @@ return /******/ (function(modules) { // webpackBootstrap
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
var base64 = __webpack_require__(805);
var base64 = __webpack_require__(818);
// A single base 64 digit can contain 6 bits of data. For the base 64 variable
// length quantities we use in the source map spec, the first bit is the sign,
@ -3170,7 +3175,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 805:
/***/ 818:
/***/ function(module, exports) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@ -3244,7 +3249,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 806:
/***/ 819:
/***/ function(module, exports) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@ -3668,7 +3673,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 807:
/***/ 820:
/***/ function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@ -3678,7 +3683,7 @@ return /******/ (function(modules) { // webpackBootstrap
* http://opensource.org/licenses/BSD-3-Clause
*/
var util = __webpack_require__(806);
var util = __webpack_require__(819);
var has = Object.prototype.hasOwnProperty;
/**
@ -3779,7 +3784,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 808:
/***/ 821:
/***/ function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@ -3789,7 +3794,7 @@ return /******/ (function(modules) { // webpackBootstrap
* http://opensource.org/licenses/BSD-3-Clause
*/
var util = __webpack_require__(806);
var util = __webpack_require__(819);
/**
* Determine whether mappingB is after mappingA with respect to generated
@ -3865,7 +3870,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 809:
/***/ 822:
/***/ function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@ -3875,11 +3880,11 @@ return /******/ (function(modules) { // webpackBootstrap
* http://opensource.org/licenses/BSD-3-Clause
*/
var util = __webpack_require__(806);
var binarySearch = __webpack_require__(810);
var ArraySet = __webpack_require__(807).ArraySet;
var base64VLQ = __webpack_require__(804);
var quickSort = __webpack_require__(811).quickSort;
var util = __webpack_require__(819);
var binarySearch = __webpack_require__(823);
var ArraySet = __webpack_require__(820).ArraySet;
var base64VLQ = __webpack_require__(817);
var quickSort = __webpack_require__(824).quickSort;
function SourceMapConsumer(aSourceMap) {
var sourceMap = aSourceMap;
@ -4954,7 +4959,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 810:
/***/ 823:
/***/ function(module, exports) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@ -5072,7 +5077,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 811:
/***/ 824:
/***/ function(module, exports) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@ -5193,7 +5198,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/***/ 812:
/***/ 825:
/***/ function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@ -5203,8 +5208,8 @@ return /******/ (function(modules) { // webpackBootstrap
* http://opensource.org/licenses/BSD-3-Clause
*/
var SourceMapGenerator = __webpack_require__(803).SourceMapGenerator;
var util = __webpack_require__(806);
var SourceMapGenerator = __webpack_require__(816).SourceMapGenerator;
var util = __webpack_require__(819);
// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
// operating systems these days (capturing the result).

View File

@ -1,7 +1,7 @@
[DEFAULT]
tags = devtools
subsuite = devtools
skip-if = debug # Disabled on debug platforms while tests are not run in debug on Github.
skip-if = (os == 'linux' && debug && bits == 32)
support-files =
head.js
!/devtools/client/commandline/test/helpers.js
@ -11,7 +11,6 @@ support-files =
examples/sourcemaps2/main.min.js
examples/sourcemaps2/main.js
examples/sourcemaps2/main.js.map
examples/doc-asm.html
examples/doc-scripts.html
examples/doc-script-switching.html
examples/doc-exceptions.html
@ -19,12 +18,10 @@ support-files =
examples/doc-frames.html
examples/doc-debugger-statements.html
examples/doc-minified.html
examples/doc-return-values.html
examples/doc-sourcemaps.html
examples/doc-sourcemaps2.html
examples/doc-sourcemap-bogus.html
examples/doc-sources.html
examples/asm.js
examples/bogus-map.js
examples/entry.js
examples/exceptions.js
@ -40,10 +37,8 @@ support-files =
examples/script-switching-01.js
examples/times2.js
[browser_dbg-asm.js]
[browser_dbg-breaking.js]
[browser_dbg-breaking-from-console.js]
skip-if = true
[browser_dbg-breakpoints.js]
[browser_dbg-breakpoints-cond.js]
[browser_dbg-call-stack.js]
@ -62,7 +57,6 @@ skip-if = true
[browser_dbg-navigation.js]
[browser_dbg-pretty-print.js]
[browser_dbg-pretty-print-paused.js]
[browser_dbg-returnvalues.js]
[browser_dbg-searching.js]
skip-if = true
[browser_dbg-sourcemaps.js]

View File

@ -6,7 +6,7 @@
// debugger.
add_task(function* () {
const url = `${EXAMPLE_URL }doc-script-switching.html`;
const url = EXAMPLE_URL + "doc-script-switching.html";
const toolbox = yield openNewTabAndToolbox(url, "webconsole");
// Type "debugger" into console

View File

@ -3,12 +3,30 @@
// Tests the breakpoints are hit in various situations.
const {
setupTestRunner,
breaking
} = require("devtools/client/debugger/new/integration-tests");
add_task(function* () {
const dbg = yield initDebugger("doc-scripts.html");
const { selectors: { getSelectedSource }, getState } = dbg;
add_task(function*() {
setupTestRunner(this);
yield breaking(this);
// Make sure we can set a top-level breakpoint and it will be hit on
// reload.
yield addBreakpoint(dbg, "scripts.html", 18);
reload(dbg);
yield waitForPaused(dbg);
assertPausedLocation(dbg, "scripts.html", 18);
yield resume(dbg);
const paused = waitForPaused(dbg);
// Create an eval script that pauses itself.
invokeInTab("doEval");
yield paused;
yield resume(dbg);
const source = getSelectedSource(getState()).toJS();
ok(!source.url, "It is an eval source");
yield addBreakpoint(dbg, source, 5);
invokeInTab("evaledFunc");
yield waitForPaused(dbg);
assertPausedLocation(dbg, source, 5);
});

View File

@ -1,14 +1,50 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
// Tests basic pretty-printing functionality.
function findBreakpoint(dbg, url, line) {
const { selectors: { getBreakpoint }, getState } = dbg;
const source = findSource(dbg, url);
return getBreakpoint(getState(), { sourceId: source.id, line });
}
const {
breakpointsCond,
setupTestRunner
} = require("devtools/client/debugger/new/integration-tests");
function setConditionalBreakpoint(dbg, index, condition) {
return Task.spawn(function* () {
rightClickElement(dbg, "gutter", index);
selectMenuItem(dbg, 2);
yield waitForElement(dbg, ".conditional-breakpoint-panel input");
findElementWithSelector(dbg, ".conditional-breakpoint-panel input").focus();
type(dbg, condition);
pressKey(dbg, "Enter");
});
}
add_task(function*() {
setupTestRunner(this);
yield breakpointsCond(this);
add_task(function* () {
const dbg = yield initDebugger("doc-scripts.html");
yield selectSource(dbg, "simple2");
// Adding a conditional Breakpoint
yield setConditionalBreakpoint(dbg, 5, "1");
yield waitForDispatch(dbg, "ADD_BREAKPOINT");
let bp = findBreakpoint(dbg, "simple2", 5);
is(bp.condition, "1", "breakpoint is created with the condition");
// Editing a conditional Breakpoint
yield setConditionalBreakpoint(dbg, 5, "2");
yield waitForDispatch(dbg, "SET_BREAKPOINT_CONDITION");
bp = findBreakpoint(dbg, "simple2", 5);
is(bp.condition, "12", "breakpoint is created with the condition");
// Removing a conditional breakpoint
clickElement(dbg, "gutter", 5);
yield waitForDispatch(dbg, "REMOVE_BREAKPOINT");
bp = findBreakpoint(dbg, "simple2", 5);
is(bp, null, "breakpoint was removed");
// Adding a condition to a breakpoint
clickElement(dbg, "gutter", 5);
yield waitForDispatch(dbg, "ADD_BREAKPOINT");
yield setConditionalBreakpoint(dbg, 5, "1");
bp = findBreakpoint(dbg, "simple2", 5);
is(bp.condition, "1", "breakpoint is created with the condition");
});

View File

@ -1,17 +1,100 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const {
breakpoints,
setupTestRunner
} = require("devtools/client/debugger/new/integration-tests");
function toggleBreakpoint(dbg, index) {
const bp = findElement(dbg, "breakpointItem", index);
const input = bp.querySelector("input");
input.click();
}
add_task(function*() {
setupTestRunner(this);
yield breakpoints.toggle(this);
function removeBreakpoint(dbg, index) {
return Task.spawn(function* () {
const bp = findElement(dbg, "breakpointItem", index);
bp.querySelector(".close-btn").click();
yield waitForDispatch(dbg, "REMOVE_BREAKPOINT");
});
}
function disableBreakpoint(dbg, index) {
return Task.spawn(function* () {
toggleBreakpoint(dbg, index);
yield waitForDispatch(dbg, "REMOVE_BREAKPOINT");
});
}
function enableBreakpoint(dbg, index) {
return Task.spawn(function* () {
toggleBreakpoint(dbg, index);
yield waitForDispatch(dbg, "ADD_BREAKPOINT");
});
}
function toggleBreakpoints(dbg) {
return Task.spawn(function* () {
clickElement(dbg, "toggleBreakpoints");
yield waitForDispatch(dbg, "TOGGLE_BREAKPOINTS");
});
}
function findBreakpoint(dbg, url, line) {
const { selectors: { getBreakpoint }, getState } = dbg;
const source = findSource(dbg, url);
return getBreakpoint(getState(), { sourceId: source.id, line });
}
function findBreakpoints(dbg) {
const { selectors: { getBreakpoints }, getState } = dbg;
return getBreakpoints(getState());
}
add_task(function* () {
const dbg = yield initDebugger("doc-scripts.html");
// Create two breakpoints
yield selectSource(dbg, "simple2");
yield addBreakpoint(dbg, "simple2", 3);
yield addBreakpoint(dbg, "simple2", 5);
// Disable the first one
yield disableBreakpoint(dbg, 1);
let bp1 = findBreakpoint(dbg, "simple2", 3);
let bp2 = findBreakpoint(dbg, "simple2", 5);
is(bp1.disabled, true, "first breakpoint is disabled");
is(bp2.disabled, false, "second breakpoint is enabled");
// Disable and Re-Enable the second one
yield disableBreakpoint(dbg, 2);
yield enableBreakpoint(dbg, 2);
bp2 = findBreakpoint(dbg, "simple2", 5);
is(bp2.disabled, false, "second breakpoint is enabled");
});
// add_task(function*() {
// setupTestRunner(this);
// yield breakpoints.toggleAll(this);
// });
// toggle all
add_task(function* () {
const dbg = yield initDebugger("doc-scripts.html");
// Create two breakpoints
yield selectSource(dbg, "simple2");
yield addBreakpoint(dbg, "simple2", 3);
yield addBreakpoint(dbg, "simple2", 5);
// Disable all of the breakpoints
yield toggleBreakpoints(dbg);
let bp1 = findBreakpoint(dbg, "simple2", 3);
let bp2 = findBreakpoint(dbg, "simple2", 5);
is(bp1.disabled, true, "first breakpoint is disabled");
is(bp2.disabled, true, "second breakpoint is disabled");
// Enable all of the breakpoints
yield toggleBreakpoints(dbg);
bp1 = findBreakpoint(dbg, "simple2", 3);
bp2 = findBreakpoint(dbg, "simple2", 5);
is(bp1.disabled, false, "first breakpoint is enabled");
is(bp2.disabled, false, "second breakpoint is enabled");
// Remove the breakpoints
yield removeBreakpoint(dbg, 1);
yield removeBreakpoint(dbg, 1);
const bps = findBreakpoints(dbg);
is(bps.size, 0, "breakpoints are removed");
});

View File

@ -1,17 +1,59 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const {
callStack,
setupTestRunner
} = require("devtools/client/debugger/new/integration-tests");
// checks to see if the frame is selected and the title is correct
function isFrameSelected(dbg, index, title) {
const $frame = findElement(dbg, "frame", index);
const frame = dbg.selectors.getSelectedFrame(dbg.getState());
add_task(function*() {
setupTestRunner(this);
yield callStack.test1(this);
const elSelected = $frame.classList.contains("selected");
const titleSelected = frame.displayName == title;
return elSelected && titleSelected;
}
function toggleButton(dbg) {
const callStackBody = findElement(dbg, "callStackBody");
return callStackBody.querySelector(".show-more");
}
add_task(function* () {
const dbg = yield initDebugger("doc-script-switching.html");
toggleCallStack(dbg);
const notPaused = findElement(dbg, "callStackBody").innerText;
is(notPaused, "Not Paused", "Not paused message is shown");
invokeInTab("firstCall");
yield waitForPaused(dbg);
ok(isFrameSelected(dbg, 1, "secondCall"), "the first frame is selected");
let button = toggleButton(dbg);
ok(!button, "toggle button shouldn't be there");
});
add_task(function*() {
setupTestRunner(this);
yield callStack.test2(this);
add_task(function* () {
const dbg = yield initDebugger("doc-frames.html");
toggleCallStack(dbg);
invokeInTab("startRecursion");
yield waitForPaused(dbg);
ok(isFrameSelected(dbg, 1, "recurseA"), "the first frame is selected");
// check to make sure that the toggle button isn't there
let button = toggleButton(dbg);
let frames = findAllElements(dbg, "frames");
is(button.innerText, "Expand Rows", "toggle button should be expand");
is(frames.length, 7, "There should be at most seven frames");
button.click();
button = toggleButton(dbg);
frames = findAllElements(dbg, "frames");
is(button.innerText, "Collapse Rows", "toggle button should be collapse");
is(frames.length, 22, "All of the frames should be shown");
});

View File

@ -26,9 +26,9 @@ function onClose() {
is(gProcess._dbgProcess.exitValue, (Services.appinfo.OS == "WINNT" ? 0 : 256),
"The remote debugger process didn't die cleanly.");
info(`process exit value: ${ gProcess._dbgProcess.exitValue}`);
info("process exit value: " + gProcess._dbgProcess.exitValue);
info(`profile path: ${ gProcess._dbgProfilePath}`);
info("profile path: " + gProcess._dbgProfilePath);
finish();
}
@ -52,10 +52,10 @@ add_task(function* () {
is(typeof gProcess._dbgProcess.pid, "number",
"The remote debugger process doesn't have a pid (?!)");
info(`process location: ${ gProcess._dbgProcess.location}`);
info(`process pid: ${ gProcess._dbgProcess.pid}`);
info(`process name: ${ gProcess._dbgProcess.processName}`);
info(`process sig: ${ gProcess._dbgProcess.processSignature}`);
info("process location: " + gProcess._dbgProcess.location);
info("process pid: " + gProcess._dbgProcess.pid);
info("process name: " + gProcess._dbgProcess.processName);
info("process sig: " + gProcess._dbgProcess.processSignature);
ok(gProcess._dbgProfilePath,
"The remote debugger profile wasn't created properly!");
@ -66,7 +66,7 @@ add_task(function* () {
"The remote debugger profile isn't where we expect it!"
);
info(`profile path: ${ gProcess._dbgProfilePath}`);
info("profile path: " + gProcess._dbgProfilePath);
gProcess.close();
});

View File

@ -46,7 +46,7 @@ function onNewGlobal() {
function onNewSource(event, packet) {
if (packet.source.url.startsWith("chrome:")) {
ok(true, `Received a new chrome source: ${ packet.source.url}`);
ok(true, "Received a new chrome source: " + packet.source.url);
gThreadClient.removeListener("newSource", onNewSource);
gNewChromeSource.resolve();
}

View File

@ -27,19 +27,14 @@ function getSplitConsole(dbg) {
add_task(function* () {
Services.prefs.setBoolPref("devtools.toolbox.splitconsoleEnabled", true);
const dbg = yield initDebugger(
"doc-script-switching.html"
);
const dbg = yield initDebugger("doc-script-switching.html");
yield selectSource(dbg, "switching-01");
// open the console
const jsterm = yield getSplitConsole(dbg);
yield getSplitConsole(dbg);
ok(dbg.toolbox.splitConsole, "Split console is shown.");
info("Evaluating a script in the console");
yield jsterm.execute("1+1");
// close the console
clickElement(dbg, "codeMirror");
// First time to focus out of text area

View File

@ -1,12 +1,54 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const {
setupTestRunner,
debuggerButtons
} = require("devtools/client/debugger/new/integration-tests");
function clickStepOver(dbg) {
clickElement(dbg, "stepOver");
return waitForPaused(dbg);
}
add_task(function*() {
setupTestRunner(this);
yield debuggerButtons(this);
function clickStepIn(dbg) {
clickElement(dbg, "stepIn");
return waitForPaused(dbg);
}
function clickStepOut(dbg) {
clickElement(dbg, "stepOut");
return waitForPaused(dbg);
}
/**
* Test debugger buttons
* 1. resume
* 2. stepOver
* 3. stepIn
* 4. stepOver to the end of a function
* 5. stepUp at the end of a function
*/
add_task(function* () {
const dbg = yield initDebugger("doc-debugger-statements.html");
yield reload(dbg);
yield waitForPaused(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 8);
// resume
clickElement(dbg, "resume");
yield waitForPaused(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 12);
// step over
yield clickStepOver(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 13);
// step into
yield clickStepIn(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 18);
// step over
yield clickStepOver(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 20);
// step out
yield clickStepOut(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 20);
});

View File

@ -1,12 +1,64 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const {
editorGutter,
setupTestRunner
} = require("devtools/client/debugger/new/integration-tests");
// Tests the breakpoint gutter and making sure breakpoint icons exist
// correctly
add_task(function*() {
setupTestRunner(this);
yield editorGutter(this);
// Utilities for interacting with the editor
function clickGutter(dbg, line) {
clickElement(dbg, "gutter", line);
}
function getLineEl(dbg, line) {
const lines = dbg.win.document.querySelectorAll(".CodeMirror-code > div");
return lines[line - 1];
}
function assertEditorBreakpoint(dbg, line, shouldExist) {
const exists = !!getLineEl(dbg, line).querySelector(".new-breakpoint");
ok(exists === shouldExist,
"Breakpoint " + (shouldExist ? "exists" : "does not exist") +
" on line " + line);
}
add_task(function* () {
const dbg = yield initDebugger("doc-scripts.html");
const { selectors: { getBreakpoints, getBreakpoint }, getState } = dbg;
const source = findSource(dbg, "simple1.js");
yield selectSource(dbg, source.url);
// Make sure that clicking the gutter creates a breakpoint icon.
clickGutter(dbg, 4);
yield waitForDispatch(dbg, "ADD_BREAKPOINT");
is(getBreakpoints(getState()).size, 1, "One breakpoint exists");
assertEditorBreakpoint(dbg, 4, true);
// Make sure clicking at the same place removes the icon.
clickGutter(dbg, 4);
yield waitForDispatch(dbg, "REMOVE_BREAKPOINT");
is(getBreakpoints(getState()).size, 0, "No breakpoints exist");
assertEditorBreakpoint(dbg, 4, false);
// Test that a breakpoint icon slides down to the correct line.
clickGutter(dbg, 2);
yield waitForDispatch(dbg, "ADD_BREAKPOINT");
is(getBreakpoints(getState()).size, 1, "One breakpoint exists");
ok(getBreakpoint(getState(), { sourceId: source.id, line: 4 }),
"Breakpoint has correct line");
assertEditorBreakpoint(dbg, 2, false);
assertEditorBreakpoint(dbg, 4, true);
// Do the same sliding and make sure it works if there's already a
// breakpoint.
clickGutter(dbg, 2);
yield waitForDispatch(dbg, "ADD_BREAKPOINT");
is(getBreakpoints(getState()).size, 1, "One breakpoint exists");
assertEditorBreakpoint(dbg, 2, false);
assertEditorBreakpoint(dbg, 4, true);
clickGutter(dbg, 4);
yield waitForDispatch(dbg, "REMOVE_BREAKPOINT");
is(getBreakpoints(getState()).size, 0, "No breakpoints exist");
assertEditorBreakpoint(dbg, 4, false);
});

View File

@ -1,12 +1,46 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const {
setupTestRunner,
editorHighlight
} = require("devtools/client/debugger/new/integration-tests");
// Tests that the editor will always highight the right line, no
// matter if the source text doesn't exist yet or even if the source
// doesn't exist.
add_task(function*() {
setupTestRunner(this);
yield editorHighlight(this);
add_task(function* () {
const dbg = yield initDebugger("doc-scripts.html");
const { selectors: { getSourceText }, getState } = dbg;
const sourceUrl = EXAMPLE_URL + "long.js";
// The source itself doesn't even exist yet, and using
// `selectSourceURL` will set a pending request to load this source
// and highlight a specific line.
dbg.actions.selectSourceURL(sourceUrl, { line: 66 });
// Wait for the source text to load and make sure we're in the right
// place.
yield waitForDispatch(dbg, "LOAD_SOURCE_TEXT");
assertHighlightLocation(dbg, "long.js", 66);
// Jump to line 16 and make sure the editor scrolled.
yield selectSource(dbg, "long.js", 16);
assertHighlightLocation(dbg, "long.js", 16);
// Make sure only one line is ever highlighted and the flash
// animation is cancelled on old lines.
yield selectSource(dbg, "long.js", 17);
yield selectSource(dbg, "long.js", 18);
assertHighlightLocation(dbg, "long.js", 18);
is(findAllElements(dbg, "highlightLine").length, 1,
"Only 1 line is highlighted");
// Test jumping to a line in a source that exists but hasn't been
// loaded yet.
selectSource(dbg, "simple1.js", 6);
// Make sure the source is in the loading state, wait for it to be
// fully loaded, and check the highlighted line.
const simple1 = findSource(dbg, "simple1.js");
ok(getSourceText(getState(), simple1.id).get("loading"));
yield waitForDispatch(dbg, "LOAD_SOURCE_TEXT");
ok(getSourceText(getState(), simple1.id).get("text"));
assertHighlightLocation(dbg, "simple1.js", 6);
});

View File

@ -1,12 +1,54 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const {
setupTestRunner,
editorSelect
} = require("devtools/client/debugger/new/integration-tests");
// Tests that the editor highlights the correct location when the
// debugger pauses
add_task(function*() {
setupTestRunner(this);
yield editorSelect(this);
// checks to see if the first breakpoint is visible
function isElementVisible(dbg, elementName) {
const bpLine = findElement(dbg, elementName);
const cm = findElement(dbg, "codeMirror");
return bpLine && isVisibleWithin(cm, bpLine);
}
add_task(function* () {
// This test runs too slowly on linux debug. I'd like to figure out
// which is the slowest part of this and make it run faster, but to
// fix a frequent failure allow a longer timeout.
requestLongerTimeout(2);
const dbg = yield initDebugger("doc-scripts.html");
const { selectors: { getSelectedSource }, getState } = dbg;
const simple1 = findSource(dbg, "simple1.js");
const simple2 = findSource(dbg, "simple2.js");
// Set the initial breakpoint.
yield addBreakpoint(dbg, simple1, 4);
ok(!getSelectedSource(getState()), "No selected source");
// Call the function that we set a breakpoint in.
invokeInTab("main");
yield waitForPaused(dbg);
assertPausedLocation(dbg, simple1, 4);
// Step through to another file and make sure it's paused in the
// right place.
yield stepIn(dbg);
assertPausedLocation(dbg, simple2, 2);
// Step back out to the initial file.
yield stepOut(dbg);
yield stepOut(dbg);
assertPausedLocation(dbg, simple1, 5);
yield resume(dbg);
// Make sure that we can set a breakpoint on a line out of the
// viewport, and that pausing there scrolls the editor to it.
let longSrc = findSource(dbg, "long.js");
yield addBreakpoint(dbg, longSrc, 66);
invokeInTab("testModel");
yield waitForPaused(dbg);
assertPausedLocation(dbg, longSrc, 66);
ok(isElementVisible(dbg, "breakpoint"), "Breakpoint is visible");
});

View File

@ -1,12 +1,26 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const {
setupTestRunner,
iframes
} = require("devtools/client/debugger/new/integration-tests");
/**
* Test debugging a page with iframes
* 1. pause in the main thread
* 2. pause in the iframe
*/
add_task(function* () {
const dbg = yield initDebugger("doc-iframes.html");
add_task(function*() {
setupTestRunner(this);
yield iframes(this);
// test pausing in the main thread
yield reload(dbg);
yield waitForPaused(dbg);
assertPausedLocation(dbg, "iframes.html", 8);
// test pausing in the iframe
yield resume(dbg);
yield waitForPaused(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 8);
// test pausing in the iframe
yield resume(dbg);
yield waitForPaused(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 12);
});

View File

@ -1,12 +1,47 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const {
setupTestRunner,
navigation
} = require("devtools/client/debugger/new/integration-tests");
function countSources(dbg) {
const sources = dbg.selectors.getSources(dbg.getState());
return sources.size;
}
add_task(function*() {
setupTestRunner(this);
yield navigation(this);
/**
* Test navigating
* navigating while paused will reset the pause state and sources
*/
add_task(function* () {
const dbg = yield initDebugger("doc-script-switching.html");
const { selectors: { getSelectedSource, getPause }, getState } = dbg;
invokeInTab("firstCall");
yield waitForPaused(dbg);
yield navigate(dbg, "doc-scripts.html", "simple1.js");
yield addBreakpoint(dbg, "simple1.js", 4);
invokeInTab("main");
yield waitForPaused(dbg);
assertPausedLocation(dbg, "simple1.js", 4);
is(countSources(dbg), 4, "4 sources are loaded.");
yield navigate(dbg, "about:blank");
yield waitForDispatch(dbg, "NAVIGATE");
is(countSources(dbg), 0, "0 sources are loaded.");
ok(!getPause(getState()), "No pause state exists");
yield navigate(dbg,
"doc-scripts.html",
"simple1.js",
"simple2.js",
"long.js",
"scripts.html"
);
is(countSources(dbg), 4, "4 sources are loaded.");
// Test that the current select source persists across reloads
yield selectSource(dbg, "long.js");
yield reload(dbg, "long.js");
ok(getSelectedSource(getState()).get("url").includes("long.js"),
"Selected source is long.js");
});

View File

@ -1,12 +1,46 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const {
setupTestRunner,
pauseOnExceptions
} = require("devtools/client/debugger/new/integration-tests");
function uncaughtException() {
return invokeInTab("uncaughtException").catch(() => {});
}
add_task(function*() {
setupTestRunner(this);
yield pauseOnExceptions(this);
function caughtException() {
return invokeInTab("caughtException");
}
/*
Tests Pausing on exception
1. skip an uncaught exception
2. pause on an uncaught exception
3. pause on a caught error
4. skip a caught error
*/
add_task(function* () {
const dbg = yield initDebugger("doc-exceptions.html");
// test skipping an uncaught exception
yield togglePauseOnExceptions(dbg, false, false);
yield uncaughtException();
ok(!isPaused(dbg));
// Test pausing on an uncaught exception
yield togglePauseOnExceptions(dbg, true, false);
uncaughtException();
yield waitForPaused(dbg);
assertPausedLocation(dbg, "exceptions.js", 2);
yield resume(dbg);
// Test pausing on a caught Error
caughtException();
yield waitForPaused(dbg);
assertPausedLocation(dbg, "exceptions.js", 15);
yield resume(dbg);
// Test skipping a caught error
yield togglePauseOnExceptions(dbg, true, true);
caughtException();
yield waitForPaused(dbg);
assertPausedLocation(dbg, "exceptions.js", 17);
yield resume(dbg);
});

View File

@ -3,12 +3,20 @@
// Tests pretty-printing a source that is currently paused.
const {
setupTestRunner,
prettyPrintPaused
} = require("devtools/client/debugger/new/integration-tests");
add_task(function* () {
const dbg = yield initDebugger("doc-minified.html");
add_task(function*() {
setupTestRunner(this);
yield prettyPrintPaused(this);
yield selectSource(dbg, "math.min.js");
yield addBreakpoint(dbg, "math.min.js", 2);
invokeInTab("arithmetic");
yield waitForPaused(dbg);
assertPausedLocation(dbg, "math.min.js", 2);
clickElement(dbg, "prettyPrintButton");
yield waitForDispatch(dbg, "TOGGLE_PRETTY_PRINT");
assertPausedLocation(dbg, "math.min.js:formatted", 18);
yield resume(dbg);
});

View File

@ -3,12 +3,29 @@
// Tests basic pretty-printing functionality.
const {
prettyPrint,
setupTestRunner
} = require("devtools/client/debugger/new/integration-tests");
add_task(function* () {
const dbg = yield initDebugger("doc-minified.html");
add_task(function*() {
setupTestRunner(this);
yield prettyPrint(this);
yield selectSource(dbg, "math.min.js");
clickElement(dbg, "prettyPrintButton");
yield waitForDispatch(dbg, "TOGGLE_PRETTY_PRINT");
const ppSrc = findSource(dbg, "math.min.js:formatted");
ok(ppSrc, "Pretty-printed source exists");
yield addBreakpoint(dbg, ppSrc, 18);
invokeInTab("arithmetic");
yield waitForPaused(dbg);
assertPausedLocation(dbg, ppSrc, 18);
yield stepOver(dbg);
assertPausedLocation(dbg, ppSrc, 27);
yield resume(dbg);
// The pretty-print button should go away in the pretty-printed
// source.
ok(!findElement(dbg, "sourceFooter"), "Footer is hidden");
yield selectSource(dbg, "math.min.js");
ok(findElement(dbg, "sourceFooter"), "Footer is hidden");
});

View File

@ -1,12 +1,22 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const {
setupTestRunner,
scopes
} = require("devtools/client/debugger/new/integration-tests");
function toggleNode(dbg, index) {
clickElement(dbg, "scopeNode", index);
}
add_task(function*() {
setupTestRunner(this);
yield scopes(this);
function getLabel(dbg, index) {
return findElement(dbg, "scopeNode", index).innerText;
}
add_task(function* () {
const dbg = yield initDebugger("doc-script-switching.html");
toggleScopes(dbg);
invokeInTab("firstCall");
yield waitForPaused(dbg);
is(getLabel(dbg, 1), "secondCall");
is(getLabel(dbg, 2), "<this>");
});

View File

@ -2,12 +2,27 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */
// Testing source search
const {
setupTestRunner,
searching
} = require("devtools/client/debugger/new/integration-tests");
add_task(function* () {
const dbg = yield initDebugger("doc-script-switching.html");
add_task(function*() {
setupTestRunner(this);
yield searching(this);
pressKey(dbg, "sourceSearch");
yield waitForElement(dbg, "input");
findElementWithSelector(dbg, "input").focus();
type(dbg, "sw");
pressKey(dbg, "Enter");
yield waitForDispatch(dbg, "LOAD_SOURCE_TEXT");
let source = dbg.selectors.getSelectedSource(dbg.getState());
ok(source.get("url").match(/switching-01/), "first source is selected");
// 2. arrow keys and check to see if source is selected
pressKey(dbg, "sourceSearch");
findElementWithSelector(dbg, "input").focus();
type(dbg, "sw");
pressKey(dbg, "Down");
pressKey(dbg, "Enter");
yield waitForDispatch(dbg, "LOAD_SOURCE_TEXT");
source = dbg.selectors.getSelectedSource(dbg.getState());
ok(source.get("url").match(/switching-02/), "second source is selected");
});

View File

@ -4,12 +4,20 @@
// Test that an error while loading a sourcemap does not break
// debugging.
const {
setupTestRunner,
sourceMapsBogus
} = require("devtools/client/debugger/new/integration-tests");
add_task(function* () {
const dbg = yield initDebugger("doc-sourcemap-bogus.html");
const { selectors: { getSources }, getState } = dbg;
add_task(function*() {
setupTestRunner(this);
yield sourceMapsBogus(this);
yield selectSource(dbg, "bogus-map.js");
// We should still be able to set breakpoints and pause in the
// generated source.
yield addBreakpoint(dbg, "bogus-map.js", 4);
invokeInTab("runCode");
yield waitForPaused(dbg);
assertPausedLocation(dbg, "bogus-map.js", 4);
// Make sure that only the single generated source exists. The
// sourcemap failed to download.
is(getSources(getState()).size, 1, "Only 1 source exists");
});

View File

@ -3,12 +3,42 @@
// Tests loading sourcemapped sources, setting breakpoints, and
// stepping in them.
const {
setupTestRunner,
sourceMaps
} = require("devtools/client/debugger/new/integration-tests");
add_task(function*() {
setupTestRunner(this);
yield sourceMaps(this);
add_task(function* () {
const dbg = yield initDebugger("doc-sourcemaps.html");
const { selectors: { getBreakpoint, getBreakpoints }, getState } = dbg;
yield waitForSources(dbg, "entry.js", "output.js", "times2.js", "opts.js");
ok(true, "Original sources exist");
const entrySrc = findSource(dbg, "entry.js");
yield selectSource(dbg, entrySrc);
ok(dbg.win.cm.getValue().includes("window.keepMeAlive"),
"Original source text loaded correctly");
// Test that breakpoint sliding is not attempted. The breakpoint
// should not move anywhere.
yield addBreakpoint(dbg, entrySrc, 13);
is(getBreakpoints(getState()).size, 1, "One breakpoint exists");
ok(getBreakpoint(getState(), { sourceId: entrySrc.id, line: 13 }),
"Breakpoint has correct line");
// Test breaking on a breakpoint
yield addBreakpoint(dbg, "entry.js", 15);
is(getBreakpoints(getState()).size, 2, "Two breakpoints exist");
ok(getBreakpoint(getState(), { sourceId: entrySrc.id, line: 15 }),
"Breakpoint has correct line");
invokeInTab("keepMeAlive");
yield waitForPaused(dbg);
assertPausedLocation(dbg, entrySrc, 15);
yield stepIn(dbg);
assertPausedLocation(dbg, "times2.js", 2);
yield stepOver(dbg);
assertPausedLocation(dbg, "times2.js", 3);
yield stepOut(dbg);
yield stepOut(dbg);
assertPausedLocation(dbg, "entry.js", 16);
});

View File

@ -5,12 +5,26 @@
// stepping in them.
// This source map does not have source contents, so it's fetched separately
const {
setupTestRunner,
sourceMaps2
} = require("devtools/client/debugger/new/integration-tests");
add_task(function*() {
setupTestRunner(this);
yield sourceMaps2(this);
add_task(function* () {
const dbg = yield initDebugger("doc-sourcemaps2.html");
const { selectors: { getBreakpoint, getBreakpoints }, getState } = dbg;
yield waitForSources(dbg, "main.js", "main.min.js");
ok(true, "Original sources exist");
const mainSrc = findSource(dbg, "main.js");
yield selectSource(dbg, mainSrc);
// Test that breakpoint is not off by a line.
yield addBreakpoint(dbg, mainSrc, 4);
is(getBreakpoints(getState()).size, 1, "One breakpoint exists");
ok(getBreakpoint(getState(), { sourceId: mainSrc.id, line: 4 }),
"Breakpoint has correct line");
invokeInTab("logMessage");
yield waitForPaused(dbg);
assertPausedLocation(dbg, "main.js", 4);
});

View File

@ -1,12 +1,60 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const {
setupTestRunner,
sources
} = require("devtools/client/debugger/new/integration-tests");
// Tests that the source tree works.
add_task(function*() {
setupTestRunner(this);
yield sources(this);
function* waitForSourceCount(dbg, i) {
// We are forced to wait until the DOM nodes appear because the
// source tree batches its rendering.
yield waitUntil(() => {
return findAllElements(dbg, "sourceNodes").length === i;
});
}
add_task(function* () {
const dbg = yield initDebugger("doc-sources.html");
const { selectors: { getSelectedSource }, getState } = dbg;
yield waitForSources(dbg, "simple1");
// Expand nodes and make sure more sources appear.
is(findAllElements(dbg, "sourceNodes").length, 2);
clickElement(dbg, "sourceArrow", 2);
is(findAllElements(dbg, "sourceNodes").length, 7);
clickElement(dbg, "sourceArrow", 3);
is(findAllElements(dbg, "sourceNodes").length, 8);
// Select a source.
ok(!findElementWithSelector(dbg, ".sources-list .focused"),
"Source is not focused");
const selected = waitForDispatch(dbg, "SELECT_SOURCE");
clickElement(dbg, "sourceNode", 4);
yield selected;
ok(findElementWithSelector(dbg, ".sources-list .focused"),
"Source is focused");
ok(getSelectedSource(getState()).get("url").includes("nested-source.js"),
"The right source is selected");
// Make sure new sources appear in the list.
ContentTask.spawn(gBrowser.selectedBrowser, null, function() {
const script = content.document.createElement("script");
script.src = "math.min.js";
content.document.body.appendChild(script);
});
yield waitForSourceCount(dbg, 9);
is(findElement(dbg, "sourceNode", 7).textContent,
"math.min.js",
"The dynamic script exists");
// Make sure named eval sources appear in the list.
ContentTask.spawn(gBrowser.selectedBrowser, null, function() {
content.eval("window.evaledFunc = function() {} //# sourceURL=evaled.js");
});
yield waitForSourceCount(dbg, 11);
is(findElement(dbg, "sourceNode", 2).textContent,
"evaled.js",
"The eval script exists");
});

View File

@ -1,12 +1,46 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const {
setupTestRunner,
keyboardShortcuts
} = require("devtools/client/debugger/new/integration-tests");
/**
* Test keyboard shortcuts.
*/
add_task(function*() {
setupTestRunner(this);
yield keyboardShortcuts(this);
});
function pressResume(dbg) {
pressKey(dbg, "resumeKey");
return waitForPaused(dbg);
}
function pressStepOver(dbg) {
pressKey(dbg, "stepOverKey");
return waitForPaused(dbg);
}
function pressStepIn(dbg) {
pressKey(dbg, "stepInKey");
return waitForPaused(dbg);
}
function pressStepOut(dbg) {
pressKey(dbg, "stepOutKey");
return waitForPaused(dbg);
}
add_task(function*() {
const dbg = yield initDebugger("doc-debugger-statements.html");
yield reload(dbg);
yield waitForPaused(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 8);
yield pressResume(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 12);
yield pressStepIn(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 13);
yield pressStepOut(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 14);
yield pressStepOver(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 9);
});

View File

@ -3,12 +3,27 @@
// Tests that keyboard navigation into and out of debugger code editor
const {
setupTestRunner,
keyboardNavigation
} = require("devtools/client/debugger/new/integration-tests");
add_task(function* () {
const dbg = yield initDebugger("doc-scripts.html");
let doc = dbg.win.document;
add_task(function*() {
setupTestRunner(this);
yield keyboardNavigation(this);
yield selectSource(dbg, "simple2");
yield waitForElement(dbg, ".CodeMirror");
findElementWithSelector(dbg, ".CodeMirror").focus();
// Enter code editor
pressKey(dbg, "Enter");
is(findElementWithSelector(dbg, "textarea"), doc.activeElement,
"Editor is enabled");
// Exit code editor and focus on container
pressKey(dbg, "Escape");
is(findElementWithSelector(dbg, ".CodeMirror"), doc.activeElement,
"Focused on container");
// Enter code editor
pressKey(dbg, "Tab");
is(findElementWithSelector(dbg, "textarea"), doc.activeElement,
"Editor is enabled");
});

View File

@ -5,6 +5,7 @@
<body>
<script>
debugger;
// This inline script allows this HTML page to show up as a
// source. It also needs to introduce a new global variable so
// it's not immediately garbage collected.

View File

@ -13,14 +13,6 @@
<script type="text/javascript" src="script-switching-01.js"></script>
<script type="text/javascript" src="script-switching-02.js"></script>
<script>
// This inline script allows this HTML page to show up as a
// source. It also needs to introduce a new global variable so
// it's not immediately garbage collected.
function inline_script() { var x = 5; }
</script>
</body>
</html>

View File

@ -6,23 +6,18 @@
<meta charset="utf-8"/>
<title>Debugger test page</title>
</head>
<body>
<script src="simple1.js"></script>
<script src="simple2.js"></script>
<script src="long.js"></script>
<script src="nested/nested-source.js"></script>
<script>
// This inline script allows this HTML page to show up as a
// source. It also needs to introduce a new global variable so
// it's not immediately garbage collected.
function inline_script() { var x = 5; }
function loadScript() {
const script = document.createElement("script");
script.src = "math.min.js";
document.body.appendChild(script);
}
</script>
<script src="nested/nested-source.js"></script>
<script src="nested/deeper/deeper-source.js"></script>
</body>
</html>

View File

@ -19,6 +19,6 @@ function recurseB(i) {
}
function startRecursion() {
window.startRecursion = function() {
return recurseA(0);
}

View File

@ -1,3 +1,6 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
function firstCall() {
secondCall();
}

View File

@ -41,11 +41,6 @@ Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", true);
Services.prefs.clearUserPref("devtools.debugger.tabs")
Services.prefs.clearUserPref("devtools.debugger.pending-selected-location")
this.gBrowser = gBrowser;
this.Services = Services;
this.EXAMPLE_URL = EXAMPLE_URL;
this.EventUtils = EventUtils;
registerCleanupFunction(() => {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
delete window.resumeTest;
@ -237,8 +232,8 @@ function assertHighlightLocation(dbg, source, line) {
// Check the highlight line
const lineEl = findElement(dbg, "highlightLine");
ok(lineEl, "Line is highlighted");
ok(isVisibleWithin(findElement(dbg, "codeMirror"), lineEl),
"Highlighted line is visible");
// ok(isVisibleWithin(findElement(dbg, "codeMirror"), lineEl),
// "Highlighted line is visible");
ok(dbg.win.cm.lineInfo(line - 1).wrapClass.includes("highlight-line"),
"Line is highlighted");
}
@ -293,7 +288,6 @@ function createDebuggerContext(toolbox) {
getState: store.getState,
store: store,
client: win.Debugger.client,
threadClient: toolbox.threadClient,
toolbox: toolbox,
win: win
};
@ -312,8 +306,7 @@ function initDebugger(url, ...sources) {
return Task.spawn(function* () {
Services.prefs.clearUserPref("devtools.debugger.tabs")
Services.prefs.clearUserPref("devtools.debugger.pending-selected-location")
url = url.startsWith("data:") ? url : EXAMPLE_URL + url;
const toolbox = yield openNewTabAndToolbox(url, "jsdebugger");
const toolbox = yield openNewTabAndToolbox(EXAMPLE_URL + url, "jsdebugger");
return createDebuggerContext(toolbox);
});
}
@ -446,7 +439,7 @@ function resume(dbg) {
* @static
*/
function reload(dbg, ...sources) {
return dbg.client.reload().then(() => waitForSources(dbg, ...sources));
return dbg.client.reload().then(() => waitForSources(...sources));
}
/**
@ -531,7 +524,6 @@ function togglePauseOnExceptions(dbg,
* @return {Promise}
* @static
*/
function invokeInTab(fnc) {
info(`Invoking function ${fnc} in tab`);
return ContentTask.spawn(gBrowser.selectedBrowser, fnc, function* (fnc) {
@ -583,8 +575,11 @@ function type(dbg, string) {
}
function isVisibleWithin(outerEl, innerEl) {
info(`isVisibleWithin`);
const innerRect = innerEl.getBoundingClientRect();
const outerRect = outerEl.getBoundingClientRect();
info(`isVisibleWithin innerRect.top ${innerRect.top} outerRect.top ${outerRect.top} innerRect.bottom ${innerRect.bottom} outerRect.bottom ${outerRect.bottom}`);
return innerRect.top > outerRect.top &&
innerRect.bottom < outerRect.bottom;
}

View File

@ -132,6 +132,10 @@ sources.searchAlt.key=O
# for searching within a the currently opened files in the editor
sourceSearch.search.key=F
# LOCALIZATION NOTE (sourceSearch.search.placeholder): placeholder text in
# the source search input bar
sourceSearch.search.placeholder=Search in file…
# LOCALIZATION NOTE (sourceSearch.search.again.key): Key shortcut to re-open
# the search for re-searching the same search triggered from a sourceSearch
sourceSearch.search.again.key=G