summaryrefslogtreecommitdiffstats
path: root/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2')
-rw-r--r--devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/another-original.js15
-rw-r--r--devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/bundle-with-another-original.js2
-rw-r--r--devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/bundle-with-another-original.js.map1
-rw-r--r--devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/bundle.js2
-rw-r--r--devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/bundle.js.map1
-rw-r--r--devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/iframe.html29
-rw-r--r--devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/index.html32
-rw-r--r--devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/new-original.js6
-rw-r--r--devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/original-with-no-update.js9
-rw-r--r--devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/original.js13
-rw-r--r--devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/replaced-bundle.js2
-rw-r--r--devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/replaced-bundle.js.map1
-rw-r--r--devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/script.js22
-rw-r--r--devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/webpack.config.js54
14 files changed, 189 insertions, 0 deletions
diff --git a/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/another-original.js b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/another-original.js
new file mode 100644
index 0000000000..790775ed99
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/another-original.js
@@ -0,0 +1,15 @@
+// This content of this file is added before that of original-with-no-update.js in the generated file
+// bundle-with-another-original.js, its main goal is to just cause the content of the generated file to change.
+function funcA() {
+ funcB();
+ funcC();
+}
+
+function funcB() {
+ console.log("Hello!");
+}
+
+function funcC() {
+ console.log("You made it!");
+}
+funcA();
diff --git a/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/bundle-with-another-original.js b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/bundle-with-another-original.js
new file mode 100644
index 0000000000..9688838a82
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/bundle-with-another-original.js
@@ -0,0 +1,2 @@
+!function(e){var n={};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=e,o.c=n,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,n){if(1&n&&(e=o(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)o.d(t,r,function(n){return e[n]}.bind(null,r));return t},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o(o.s=0)}([function(e,n,o){o(1),e.exports=o(2)},function(e,n){console.log("Hello!"),console.log("You made it!")},function(e,n){window.baabar=function(){return new Promise(e=>setTimeout(e,100))},window.foobar=async function(){await baabar(),console.log("YO")},foobar()}]);
+//# sourceMappingURL=bundle-with-another-original.js.map \ No newline at end of file
diff --git a/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/bundle-with-another-original.js.map b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/bundle-with-another-original.js.map
new file mode 100644
index 0000000000..f880838d8a
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/bundle-with-another-original.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./another-original.js","webpack:///./original-with-no-update.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","console","log","window","baabar","Promise","resolve","setTimeout","foobar","async"],"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,EAAoB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ACRL,SACNH,QAAQC,IAAI,OAEdM","file":"bundle-with-another-original.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","// This content of this file is added before that of original-with-no-update.js in the generated file\n// bundle-with-another-original.js, its main goal is to just cause the content of the generated file to change.\nfunction funcA() {\n funcB();\n funcC();\n}\n\nfunction funcB() {\n console.log(\"Hello!\");\n}\n\nfunction funcC() {\n console.log(\"You made it!\");\n}\nfuncA();\n","window.baabar = function baabar() {\n return new Promise(resolve => setTimeout(resolve, 100))\n}\n\nwindow.foobar = async function foobar() {\n await baabar();\n console.log(\"YO\")\n}\nfoobar();\n"],"sourceRoot":""} \ No newline at end of file
diff --git a/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/bundle.js b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/bundle.js
new file mode 100644
index 0000000000..9a067751d5
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/bundle.js
@@ -0,0 +1,2 @@
+!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){e.exports=t(1)},function(e,n){window.bar=function(){return new Promise(e=>setTimeout(e,100))},window.foo=async function(){await bar(),console.log("YO")},console.log("HEY")}]);
+//# sourceMappingURL=bundle.js.map \ No newline at end of file
diff --git a/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/bundle.js.map b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/bundle.js.map
new file mode 100644
index 0000000000..780bf9fa62
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/bundle.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./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","bar","Promise","resolve","setTimeout","foo","async","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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,IAAI","file":"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","window.bar = function bar() {\n return new Promise(resolve => setTimeout(resolve, 100))\n}\n\n// New comment\n// to add some\n// non-breakable lines\nwindow.foo = async function foo() {\n await bar();\n console.log(\"YO\")\n}\n\nconsole.log(\"HEY\")\n"],"sourceRoot":""} \ No newline at end of file
diff --git a/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/iframe.html b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/iframe.html
new file mode 100644
index 0000000000..04a2094e0d
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/iframe.html
@@ -0,0 +1,29 @@
+<!-- Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ -->
+<!doctype html>
+
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <title>Iframe v2</title>
+ </head>
+
+ <body>
+ <!-- A simple inline script, that helps to cover breakable lines/columns -->
+ <!-- Have them define first, so that we avoid shifting lines when adding new scripts later in the html -->
+ <script>
+ console.log('iframe breakable-line');
+ // Comment
+ </script>
+
+ <!-- A second inline script, that helps cover bugs when having two distinct inline scripts -->
+ <script>
+ console.log("second iframe inline script");
+ // Another comment
+ </script>
+
+ <!-- A script whose URL is loaded in many different ways -->
+ <script src="same-url.sjs"></script>
+ </body>
+
+</html>
diff --git a/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/index.html b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/index.html
new file mode 100644
index 0000000000..7467a29687
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/index.html
@@ -0,0 +1,32 @@
+<!-- Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ -->
+<!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>
+
+ <!-- A bundle/generated source that contains original-with-no-update.js as well as content from a newly added another-original.js -->
+ <script src="bundle-with-another-original.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"/>
+ <title>Empty test page 2</title>
+ </head>
+
+ <body>
+ <!-- A simple inline script, that helps to cover breakable lines/columns -->
+ <script>
+ console.log('breakable-line');
+ // Comment
+ </script>
+
+ <iframe src="iframe.html"></script>
+ </body>
+
+</html>
diff --git a/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/new-original.js b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/new-original.js
new file mode 100644
index 0000000000..4b67c21be1
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/new-original.js
@@ -0,0 +1,6 @@
+// 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");
+}
+window.____newOriginal();
diff --git a/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/original-with-no-update.js b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/original-with-no-update.js
new file mode 100644
index 0000000000..9fd6ecf110
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/original-with-no-update.js
@@ -0,0 +1,9 @@
+window.baabar = function baabar() {
+ return new Promise(resolve => setTimeout(resolve, 100))
+}
+
+window.foobar = async function foobar() {
+ await baabar();
+ console.log("YO")
+}
+foobar();
diff --git a/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/original.js b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/original.js
new file mode 100644
index 0000000000..fd36b53b56
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/original.js
@@ -0,0 +1,13 @@
+window.bar = function bar() {
+ return new Promise(resolve => setTimeout(resolve, 100))
+}
+
+// New comment
+// to add some
+// non-breakable lines
+window.foo = async function foo() {
+ await bar();
+ console.log("YO")
+}
+
+console.log("HEY")
diff --git a/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/replaced-bundle.js b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/replaced-bundle.js
new file mode 100644
index 0000000000..a70d5adfd1
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/replaced-bundle.js
@@ -0,0 +1,2 @@
+!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){e.exports=t(1)},function(e,n){window.____newOriginal=function(){console.log("New original")},window.____newOriginal()}]);
+//# sourceMappingURL=replaced-bundle.js.map \ No newline at end of file
diff --git a/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/replaced-bundle.js.map b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/replaced-bundle.js.map
new file mode 100644
index 0000000000..59fe219624
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/replaced-bundle.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./new-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","____newOriginal","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,iBAEdH,OAAOC","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","// 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"],"sourceRoot":""} \ No newline at end of file
diff --git a/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/script.js b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/script.js
new file mode 100644
index 0000000000..5c55c1e859
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/script.js
@@ -0,0 +1,22 @@
+// Single line comment <<=== this is line 1
+console.log("body instruction");
+/* Multi
+* line
+* comment
+*/
+function bodyFunction() {
+ // Inline comment
+ /* Inline
+ * multiline comment
+ */
+ function inlineFunction() {
+ console.log("nested instruction");
+ }
+ const inlineCount = 1;
+ let inlineLet = 2;
+ var inlineVar = 3;
+ console.log("inline instruction");
+}
+const bodyCount = 1;
+let bodyLet = 2;
+var bodyVar = 3;
diff --git a/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/webpack.config.js b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/webpack.config.js
new file mode 100644
index 0000000000..88afb5b73e
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/examples/sourcemaps-reload-compressed/v2/webpack.config.js
@@ -0,0 +1,54 @@
+const path = require("path");
+const webpack = require("webpack");
+
+const config = {
+ devtool: "sourcemap",
+};
+
+if (webpack.version && webpack.version[0] === "4") {
+ // Webpack 3, used in sourcemaps-reload-uncompressed, doesn't support mode attribute.
+ // Webpack 4, used in sourcemaps-reload-compressed we want production mode in order to compress the sources
+ config.mode = "production";
+} else {
+ // Also Webpack 4 doesn't support the module.loaders attribute
+ config.module = {
+ loaders: [
+ {
+ test: /\.js$/,
+ exclude: /node_modules/,
+ loader: "babel-loader",
+ },
+ ],
+ };
+}
+
+const originalBundle = Object.assign({}, config, {
+ entry: [path.join(__dirname, "original.js")],
+ output: {
+ path: __dirname,
+ filename: "bundle.js",
+ },
+});
+
+const bundleWithAnotherOriginalFile = Object.assign({}, config, {
+ entry: [
+ // This should cause the content of `original-with-no-update.js`
+ // to shift in the new `bundle-with-another-original.js` generated.
+ path.join(__dirname, "another-original.js"),
+ path.join(__dirname, "original-with-no-update.js")
+ ],
+ output: {
+ path: __dirname,
+ filename: "bundle-with-another-original.js"
+ }
+});
+
+const replacedBundle = Object.assign({}, config, {
+ entry: [path.join(__dirname, "new-original.js")],
+ output: {
+ path: __dirname,
+ filename: "replaced-bundle.js",
+ },
+});
+
+module.exports = [originalBundle, bundleWithAnotherOriginalFile, replacedBundle];