Bug 1761921 - [devtools] Clarify the integration test page with many comments. r=bomsy

Differential Revision: https://phabricator.services.mozilla.com/D142318
This commit is contained in:
Alexandre Poirot 2022-03-31 11:20:52 +00:00
parent bef5976c4e
commit 06b128e3ee
22 changed files with 64 additions and 32 deletions

View File

@ -19,7 +19,7 @@ add_task(async function testBreakableLinesOverReloads() {
);
info("Assert breakable lines of the first html page load");
await assertBreakableLines(dbg, "index.html", 22, [[17], [18]]);
await assertBreakableLines(dbg, "index.html", 28, [[23, 24]]);
info("Assert breakable lines of the first original source file, original.js");
// The length of original.js is longer than the test file
@ -44,7 +44,7 @@ add_task(async function testBreakableLinesOverReloads() {
await assertBreakableLines(dbg, "script.js", 23, [[2], [13, 23]]);
info("Assert breakable lines of the second html page load");
await assertBreakableLines(dbg, "index.html", 22, [[16], [18]]);
await assertBreakableLines(dbg, "index.html", 28, [[22], [24]]);
info("Assert breakable lines of the second orignal file");
// See first assertion about original.js,

View File

@ -30,9 +30,9 @@ add_task(async function testBreakableLinesOverReloads() {
);
info("Assert breakable lines of the first html page load");
await assertBreakablePositions(dbg, "index.html", 20, [
{ line: 17, columns: [6, 14] },
{ line: 18, columns: [] },
await assertBreakablePositions(dbg, "index.html", 28, [
{ line: 23, columns: [6, 14] },
{ line: 24, columns: [] },
]);
info("Assert breakable lines of the first original source file, original.js");
@ -79,9 +79,9 @@ add_task(async function testBreakableLinesOverReloads() {
]);
info("Assert breakable lines of the second html page load");
await assertBreakablePositions(dbg, "index.html", 22, [
{ line: 16, columns: [6, 14] },
{ line: 18, columns: [] },
await assertBreakablePositions(dbg, "index.html", 28, [
{ line: 22, columns: [6, 14] },
{ line: 24, columns: [] },
]);
info("Assert breakable lines of the second orignal file");
@ -106,11 +106,8 @@ async function assertBreakablePositions(
breakablePositions
) {
await selectSource(dbg, file);
const editorLines = dbg.win.document.querySelectorAll(
".CodeMirror-lines .CodeMirror-code > div"
);
is(
editorLines.length,
getCM(dbg).lineCount(),
numberOfLines,
`We show the expected number of lines in CodeMirror for ${file}`
);

View File

@ -3,8 +3,13 @@
<!doctype html>
<html>
<!-- A simple script -->
<script src="script.js"></script>
<!-- A bundle/generated source that contains original.js -->
<script src="bundle.js"></script>
<!-- Another bundle/generated source that contains removed-original.js -->
<script src="replaced-bundle.js"></script>
<head>
<meta charset="utf-8"/>
@ -12,6 +17,7 @@
</head>
<body>
<!-- A simple inline script, that helps to cover breakable lines/columns -->
<script>
// Comment
console.log('breakable-line');

View File

@ -1,5 +1,5 @@
// Add two comment lines, to match the one from new-original.js and have same
// breakpoint positions..............................
// Add two comment lines, to match the one from v2/new-original.js and have same....
// breakpoint column positions.......................
window.removedOriginal = function removedOriginal() {
console.log("Removed original");
}

View File

@ -1 +1 @@
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./removed-original.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","removedOriginal","console","log"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRzB,EAAoB6B,EAAI,SAAS1B,GAChC,IAAIS,EAAST,GAAUA,EAAOqB,WAC7B,WAAwB,OAAOrB,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAH,EAAoBU,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRZ,EAAoBa,EAAI,SAASiB,EAAQC,GAAY,OAAOjB,OAAOkB,UAAUC,eAAe1B,KAAKuB,EAAQC,IAGzG/B,EAAoBkC,EAAI,GAIjBlC,EAAoBA,EAAoBmC,EAAI,G,gDChFrDC,OAAOC,gBAAkB,WACvBC,QAAQC,IAAI","file":"replaced-bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","// Add two comment lines, to match the one from new-original.js and have same\n// breakpoint positions..............................\nwindow.removedOriginal = function removedOriginal() {\n console.log(\"Removed original\");\n}\n"],"sourceRoot":""}
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./removed-original.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","removedOriginal","console","log"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRzB,EAAoB6B,EAAI,SAAS1B,GAChC,IAAIS,EAAST,GAAUA,EAAOqB,WAC7B,WAAwB,OAAOrB,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAH,EAAoBU,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRZ,EAAoBa,EAAI,SAASiB,EAAQC,GAAY,OAAOjB,OAAOkB,UAAUC,eAAe1B,KAAKuB,EAAQC,IAGzG/B,EAAoBkC,EAAI,GAIjBlC,EAAoBA,EAAoBmC,EAAI,G,gDChFrDC,OAAOC,gBAAkB,WACvBC,QAAQC,IAAI","file":"replaced-bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","// Add two comment lines, to match the one from v2/new-original.js and have same....\n// breakpoint column positions.......................\nwindow.removedOriginal = function removedOriginal() {\n console.log(\"Removed original\");\n}\n"],"sourceRoot":""}

View File

@ -3,8 +3,13 @@
<!doctype html>
<html>
<!-- A simple script -->
<script src="script.js"></script>
<!-- A bundle/generated source that contains an updated version of original.js -->
<script src="bundle.js"></script>
<!-- Another bundle/generated source that contains new-original.js which replaced the content of removed-original.js -->
<script src="replaced-bundle.js"></script>
<head>
<meta charset="utf-8"/>
@ -12,6 +17,7 @@
</head>
<body>
<!-- A simple inline script, that helps to cover breakable lines/columns -->
<script>
console.log('breakable-line');
// Comment

View File

@ -1,4 +1,4 @@
// Pad the name with "_" in order to match the same length as removedOriginal
// Pad the name with "_" in order to match the same length as v1/removed-original.js
// and set the column breakpoints on the same column!
window.____newOriginal = function ____newOriginal() {
console.log("New original");

View File

@ -3,8 +3,9 @@
<!doctype html>
<html>
<script src="script.js"></script>
<!-- A bundle/generated source that contains yet another version of original.js -->
<script src="bundle.js"></script>
<head>
<meta charset="utf-8"/>
<title>Empty test page 3</title>

View File

@ -3,8 +3,13 @@
<!doctype html>
<html>
<!-- A simple script -->
<script src="script.js"></script>
<!-- A bundle/generated source that contains original.js -->
<script src="bundle.js"></script>
<!-- Another bundle/generated source that contains removed-original.js -->
<script src="replaced-bundle.js"></script>
<head>
<meta charset="utf-8"/>
@ -12,6 +17,7 @@
</head>
<body>
<!-- A simple inline script, that helps to cover breakable lines/columns -->
<script>
// Comment
console.log('breakable-line');

View File

@ -1,5 +1,5 @@
// Add two comment lines, to match the one from new-original.js and have same
// breakpoint positions..............................
// Add two comment lines, to match the one from v2/new-original.js and have same....
// breakpoint column positions.......................
window.removedOriginal = function removedOriginal() {
console.log("Removed original");
}

View File

@ -74,8 +74,8 @@ module.exports = __webpack_require__(1);
/* 1 */
/***/ (function(module, exports) {
// Add two comment lines, to match the one from new-original.js and have same
// breakpoint positions..............................
// Add two comment lines, to match the one from v2/new-original.js and have same....
// breakpoint column positions.......................
window.removedOriginal = function removedOriginal() {
console.log("Removed original");
};

View File

@ -1 +1 @@
{"version":3,"sources":["webpack:///webpack/bootstrap 450f2ed5071212525ef7","webpack:///./removed-original.js"],"names":["window","removedOriginal","console","log"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,KAAK;QACL;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;QAEA;QACA;;;;;;;;;;;;;;AC7DA;AACA;AACAA,OAAOC,eAAP,GAAyB,SAASA,eAAT,GAA2B;AAClDC,UAAQC,GAAR,CAAY,kBAAZ;AACD,CAFD,C","file":"replaced-bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 450f2ed5071212525ef7","// Add two comment lines, to match the one from new-original.js and have same\n// breakpoint positions..............................\nwindow.removedOriginal = function removedOriginal() {\n console.log(\"Removed original\");\n}\n\n\n\n// WEBPACK FOOTER //\n// ./removed-original.js"],"sourceRoot":""}
{"version":3,"sources":["webpack:///webpack/bootstrap 3b1a221408fdde86aa49","webpack:///./removed-original.js"],"names":["window","removedOriginal","console","log"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,KAAK;QACL;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;QAEA;QACA;;;;;;;;;;;;;;AC7DA;AACA;AACAA,OAAOC,eAAP,GAAyB,SAASA,eAAT,GAA2B;AAClDC,UAAQC,GAAR,CAAY,kBAAZ;AACD,CAFD,C","file":"replaced-bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 3b1a221408fdde86aa49","// Add two comment lines, to match the one from v2/new-original.js and have same....\n// breakpoint column positions.......................\nwindow.removedOriginal = function removedOriginal() {\n console.log(\"Removed original\");\n}\n\n\n\n// WEBPACK FOOTER //\n// ./removed-original.js"],"sourceRoot":""}

View File

@ -3,8 +3,13 @@
<!doctype html>
<html>
<!-- A simple script -->
<script src="script.js"></script>
<!-- A bundle/generated source that contains an updated version of original.js -->
<script src="bundle.js"></script>
<!-- Another bundle/generated source that contains new-original.js which replaced the content of removed-original.js -->
<script src="replaced-bundle.js"></script>
<head>
<meta charset="utf-8"/>
@ -12,6 +17,7 @@
</head>
<body>
<!-- A simple inline script, that helps to cover breakable lines/columns -->
<script>
console.log('breakable-line');
// Comment

View File

@ -1,4 +1,4 @@
// Pad the name with "_" in order to match the same length as removedOriginal
// Pad the name with "_" in order to match the same length as v1/removed-original.js
// and set the column breakpoints on the same column!
window.____newOriginal = function ____newOriginal() {
console.log("New original");

View File

@ -74,7 +74,7 @@ module.exports = __webpack_require__(1);
/* 1 */
/***/ (function(module, exports) {
// Pad the name with "_" in order to match the same length as removedOriginal
// Pad the name with "_" in order to match the same length as v1/removed-original.js
// and set the column breakpoints on the same column!
window.____newOriginal = function ____newOriginal() {
console.log("New original");

View File

@ -1 +1 @@
{"version":3,"sources":["webpack:///webpack/bootstrap 70ef17637fbc0da592a3","webpack:///./new-original.js"],"names":["window","____newOriginal","console","log"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,KAAK;QACL;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;QAEA;QACA;;;;;;;;;;;;;;AC7DA;AACA;AACAA,OAAOC,eAAP,GAAyB,SAASA,eAAT,GAA2B;AAClDC,UAAQC,GAAR,CAAY,cAAZ;AACD,CAFD;AAGAH,OAAOC,eAAP,G","file":"replaced-bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 70ef17637fbc0da592a3","// Pad the name with \"_\" in order to match the same length as removedOriginal\n// and set the column breakpoints on the same column!\nwindow.____newOriginal = function ____newOriginal() {\n console.log(\"New original\");\n}\nwindow.____newOriginal();\n\n\n\n// WEBPACK FOOTER //\n// ./new-original.js"],"sourceRoot":""}
{"version":3,"sources":["webpack:///webpack/bootstrap 94a35eb61033f6e1078b","webpack:///./new-original.js"],"names":["window","____newOriginal","console","log"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,KAAK;QACL;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;QAEA;QACA;;;;;;;;;;;;;;AC7DA;AACA;AACAA,OAAOC,eAAP,GAAyB,SAASA,eAAT,GAA2B;AAClDC,UAAQC,GAAR,CAAY,cAAZ;AACD,CAFD;AAGAH,OAAOC,eAAP,G","file":"replaced-bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 94a35eb61033f6e1078b","// Pad the name with \"_\" in order to match the same length as v1/removed-original.js\n// and set the column breakpoints on the same column!\nwindow.____newOriginal = function ____newOriginal() {\n console.log(\"New original\");\n}\nwindow.____newOriginal();\n\n\n\n// WEBPACK FOOTER //\n// ./new-original.js"],"sourceRoot":""}

View File

@ -3,8 +3,9 @@
<!doctype html>
<html>
<script src="script.js"></script>
<!-- A bundle/generated source that contains yet another version of original.js -->
<script src="bundle.js"></script>
<head>
<meta charset="utf-8"/>
<title>Empty test page 3</title>

View File

@ -7,6 +7,13 @@
/**
* This first test will focus on original.js file whose content changes
* which affects the related generated file: bundle.js
*
* In the first reload, v2/original.js will only change with new lines being added
* before the line where we set a breakpoint. So that the breakpoint, if not
* automatically shifted, will now be against an empty line.
*
* In the second reload, v3/original.js will be trimmed, so that the line
* where we set a breakpoint against, has been removed.
*/
"use strict";

View File

@ -5,11 +5,15 @@
/* import-globals-from ../head.js */
/**
* This second test will focus on removed-original.js which is an original source mapped file.
* This second test will focus on v1/removed-original.js which is an original source mapped file.
* This source is mapped to replaced-bundle.js.
* This original source is removed and another original file: new-original.js
* In the first reload (v2), this original source is removed and another original file: v2/new-original.js
* will replace the content of the removed-original.js in the replaced-bundle.js generated file.
* And finally, everything is removed, both original and generated source.
* And finally, in the second reload (v3) everything is removed, both original and generated source.
*
* Note that great care is done to ensure that new-original replaces removed-original with the
* exact same breakable lines and columns. So that the breakpoint isn't simply removed
* because the location is no longer breakable.
*/
"use strict";