mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 13:42:20 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/amd-function-name.test.js
generated
vendored
Normal file
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/amd-function-name.test.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
describe("AMD Function Name", function() {
|
||||
beforeEach(function() {
|
||||
this.ifr = document.createElement("iframe");
|
||||
document.body.append(this.ifr);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
this.ifr.remove();
|
||||
});
|
||||
|
||||
it("loads with a different AMD function name", function(done) {
|
||||
window.addEventListener("message", function l(ev) {
|
||||
if (ev.data === "a") {
|
||||
window.removeEventListener("message", l);
|
||||
done();
|
||||
}
|
||||
});
|
||||
this.ifr.src = "/base/tests/fixtures/amd-function-name/build/runner.html";
|
||||
});
|
||||
});
|
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/asset-in-worker.test.js
generated
vendored
Normal file
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/asset-in-worker.test.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
describe("Assets in workers", function() {
|
||||
beforeEach(function() {
|
||||
this.ifr = document.createElement("iframe");
|
||||
document.body.append(this.ifr);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
this.ifr.remove();
|
||||
});
|
||||
|
||||
it("can be fetched", function(done) {
|
||||
window.addEventListener("message", function l(ev) {
|
||||
if (ev.data === "assetcontent") {
|
||||
window.removeEventListener("message", l);
|
||||
done();
|
||||
}
|
||||
});
|
||||
this.ifr.src = "/base/tests/fixtures/assets-in-worker/build/runner.html";
|
||||
});
|
||||
});
|
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/dynamic-import.test.js
generated
vendored
Normal file
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/dynamic-import.test.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
describe("Dynamic import", function() {
|
||||
beforeEach(function() {
|
||||
this.ifr = document.createElement("iframe");
|
||||
document.body.append(this.ifr);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
this.ifr.remove();
|
||||
});
|
||||
|
||||
it("loads transpiled modules", function(done) {
|
||||
window.addEventListener("message", function l(ev) {
|
||||
if (ev.data === "a") {
|
||||
window.removeEventListener("message", l);
|
||||
done();
|
||||
}
|
||||
});
|
||||
this.ifr.src = "/base/tests/fixtures/dynamic-import/build/runner.html";
|
||||
});
|
||||
});
|
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/amd-function-name/a.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/amd-function-name/a.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default function() {
|
||||
return 4;
|
||||
}
|
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/amd-function-name/build/runner.html
generated
vendored
Normal file
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/amd-function-name/build/runner.html
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!--
|
||||
Copyright 2018 Google Inc. All Rights Reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!doctype html>
|
||||
<script src="entry.js"></script>
|
3
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/amd-function-name/config.json
generated
vendored
Normal file
3
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/amd-function-name/config.json
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"amdFunctionName": "foo"
|
||||
}
|
22
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/amd-function-name/entry.js
generated
vendored
Normal file
22
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/amd-function-name/entry.js
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import("./a.js").then(m => {
|
||||
if (m.default() != 4) {
|
||||
return;
|
||||
}
|
||||
if (!self.foo) {
|
||||
return;
|
||||
}
|
||||
window.parent.postMessage("a", "*");
|
||||
});
|
1
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/assets-in-worker/build/assets/my-asset-620b911b.bin
generated
vendored
Normal file
1
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/assets-in-worker/build/assets/my-asset-620b911b.bin
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
assetcontent
|
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/assets-in-worker/build/runner.html
generated
vendored
Normal file
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/assets-in-worker/build/runner.html
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!--
|
||||
Copyright 2018 Google Inc. All Rights Reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!doctype html>
|
||||
<script src="entry.js"></script>
|
17
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/assets-in-worker/entry.js
generated
vendored
Normal file
17
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/assets-in-worker/entry.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
const w = new Worker("./worker.js");
|
||||
w.addEventListener("message", ev => {
|
||||
window.parent.postMessage(ev.data, "*");
|
||||
});
|
25
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/assets-in-worker/rollup.config.js
generated
vendored
Normal file
25
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/assets-in-worker/rollup.config.js
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
const MARKER = "my-special-import";
|
||||
module.exports = (config, outputOptions, omt) => {
|
||||
config.plugins = [
|
||||
omt(),
|
||||
{
|
||||
resolveId(id) {
|
||||
if (id !== MARKER) {
|
||||
return;
|
||||
}
|
||||
return id;
|
||||
},
|
||||
load(id) {
|
||||
if (id !== MARKER) {
|
||||
return;
|
||||
}
|
||||
const referenceId = this.emitFile({
|
||||
type: "asset",
|
||||
name: "my-asset.bin",
|
||||
source: "assetcontent"
|
||||
});
|
||||
return `export default import.meta.ROLLUP_FILE_URL_${referenceId}`;
|
||||
}
|
||||
}
|
||||
];
|
||||
};
|
18
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/assets-in-worker/worker.js
generated
vendored
Normal file
18
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/assets-in-worker/worker.js
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import url from "my-special-import";
|
||||
|
||||
fetch(url)
|
||||
.then(resp => resp.text())
|
||||
.then(text => postMessage(text));
|
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/dynamic-import/a.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/dynamic-import/a.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default function() {
|
||||
window.parent.postMessage("a", "*");
|
||||
}
|
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/dynamic-import/build/runner.html
generated
vendored
Normal file
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/dynamic-import/build/runner.html
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!--
|
||||
Copyright 2018 Google Inc. All Rights Reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!doctype html>
|
||||
<script src="entry.js"></script>
|
14
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/dynamic-import/entry.js
generated
vendored
Normal file
14
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/dynamic-import/entry.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import("./a.js").then(m => m.default());
|
0
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/empty.js
generated
vendored
Normal file
0
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/empty.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-meta/a.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-meta/a.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default function() {
|
||||
window.parent.postMessage(import.meta.url, "*");
|
||||
}
|
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-meta/build/runner.html
generated
vendored
Normal file
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-meta/build/runner.html
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!--
|
||||
Copyright 2018 Google Inc. All Rights Reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!doctype html>
|
||||
<script src="entry.js"></script>
|
14
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-meta/entry.js
generated
vendored
Normal file
14
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-meta/entry.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import("./a.js").then(m => m.default());
|
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url-custom-scheme/a.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url-custom-scheme/a.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2020 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default function() {
|
||||
self.postMessage("a");
|
||||
}
|
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url-custom-scheme/b.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url-custom-scheme/b.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2020 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default function() {
|
||||
return 1;
|
||||
}
|
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url-custom-scheme/build/runner.html
generated
vendored
Normal file
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url-custom-scheme/build/runner.html
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!--
|
||||
Copyright 2020 Google Inc. All Rights Reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!doctype html>
|
||||
<script src="entry.js"></script>
|
3
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url-custom-scheme/config.json
generated
vendored
Normal file
3
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url-custom-scheme/config.json
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"urlLoaderScheme": "fancy-custom-scheme"
|
||||
}
|
21
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url-custom-scheme/entry.js
generated
vendored
Normal file
21
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url-custom-scheme/entry.js
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* Copyright 2020 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import workerURL from "fancy-custom-scheme:./worker.js";
|
||||
|
||||
// Set this, so it can be picked up in the test.
|
||||
self.workerURL = workerURL;
|
||||
|
||||
const w = new Worker(workerURL);
|
||||
w.addEventListener("message", ev => {
|
||||
window.parent.postMessage(ev.data, "*");
|
||||
});
|
17
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url-custom-scheme/worker.js
generated
vendored
Normal file
17
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url-custom-scheme/worker.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* Copyright 2020 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import a from "./a.js";
|
||||
|
||||
a();
|
||||
import("./b.js");
|
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url/a.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url/a.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2020 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default function() {
|
||||
self.postMessage("a");
|
||||
}
|
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url/b.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url/b.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2020 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default function() {
|
||||
return 1;
|
||||
}
|
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url/build/runner.html
generated
vendored
Normal file
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url/build/runner.html
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!--
|
||||
Copyright 2020 Google Inc. All Rights Reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!doctype html>
|
||||
<script src="entry.js"></script>
|
21
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url/entry.js
generated
vendored
Normal file
21
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url/entry.js
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* Copyright 2020 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import workerURL from "omt:./worker.js";
|
||||
|
||||
// Set this, so it can be picked up in the test.
|
||||
self.workerURL = workerURL;
|
||||
|
||||
const w = new Worker(workerURL);
|
||||
w.addEventListener("message", ev => {
|
||||
window.parent.postMessage(ev.data, "*");
|
||||
});
|
17
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url/worker.js
generated
vendored
Normal file
17
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/import-worker-url/worker.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* Copyright 2020 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import a from "./a.js";
|
||||
|
||||
a();
|
||||
import("./b.js");
|
17
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/module-worker/a.js
generated
vendored
Normal file
17
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/module-worker/a.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default async function() {
|
||||
const { default: f } = await import("./b.js");
|
||||
self.postMessage(f());
|
||||
}
|
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/module-worker/b.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/module-worker/b.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default function() {
|
||||
return "a";
|
||||
}
|
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/module-worker/build/runner.html
generated
vendored
Normal file
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/module-worker/build/runner.html
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!--
|
||||
Copyright 2018 Google Inc. All Rights Reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!doctype html>
|
||||
<script src="entry.js"></script>
|
17
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/module-worker/entry.js
generated
vendored
Normal file
17
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/module-worker/entry.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
const w = new Worker("./worker.js", { type: "module" });
|
||||
w.addEventListener("message", ev => {
|
||||
window.parent.postMessage(ev.data, "*");
|
||||
});
|
4
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/module-worker/rollup.config.js
generated
vendored
Normal file
4
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/module-worker/rollup.config.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
module.exports = (config, outputOptions, omt) => {
|
||||
outputOptions.format = "esm";
|
||||
config.plugins = [omt()];
|
||||
};
|
17
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/module-worker/worker.js
generated
vendored
Normal file
17
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/module-worker/worker.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import a from "./a.js";
|
||||
|
||||
a();
|
||||
import("./b.js");
|
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/more-workers/a.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/more-workers/a.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default function() {
|
||||
self.postMessage("a");
|
||||
}
|
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/more-workers/b.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/more-workers/b.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default function() {
|
||||
self.postMessage("b");
|
||||
}
|
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/more-workers/build/runner.html
generated
vendored
Normal file
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/more-workers/build/runner.html
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!--
|
||||
Copyright 2018 Google Inc. All Rights Reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!doctype html>
|
||||
<script src="entry.js"></script>
|
34
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/more-workers/entry.js
generated
vendored
Normal file
34
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/more-workers/entry.js
generated
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
async function run() {
|
||||
await new Promise(resolve => {
|
||||
const w = new Worker("./worker_a.js");
|
||||
w.addEventListener("message", ev => {
|
||||
if (ev.data === "a") {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
await new Promise(resolve => {
|
||||
const w = new Worker("./worker_b.js");
|
||||
w.addEventListener("message", ev => {
|
||||
if (ev.data === "b") {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
window.parent.postMessage("a", "*");
|
||||
}
|
||||
|
||||
run();
|
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/more-workers/worker_a.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/more-workers/worker_a.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import a from "./a.js";
|
||||
|
||||
a();
|
18
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/more-workers/worker_b.js
generated
vendored
Normal file
18
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/more-workers/worker_b.js
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
async function run() {
|
||||
const { default: b } = await import("./b.js");
|
||||
b();
|
||||
}
|
||||
run();
|
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/public-path/a.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/public-path/a.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default function() {
|
||||
window.parent.postMessage("a", "*");
|
||||
}
|
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/public-path/build/runner.html
generated
vendored
Normal file
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/public-path/build/runner.html
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!--
|
||||
Copyright 2018 Google Inc. All Rights Reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!doctype html>
|
||||
<script src="entry.js"></script>
|
3
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/public-path/config.json
generated
vendored
Normal file
3
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/public-path/config.json
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"publicPath": "/base/tests/fixtures/public-path/build"
|
||||
}
|
14
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/public-path/entry.js
generated
vendored
Normal file
14
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/public-path/entry.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import("./a.js").then(m => m.default());
|
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/simple-bundle/a.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/simple-bundle/a.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default function() {
|
||||
window.parent.postMessage("a", "*");
|
||||
}
|
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/simple-bundle/build/runner.html
generated
vendored
Normal file
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/simple-bundle/build/runner.html
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!--
|
||||
Copyright 2018 Google Inc. All Rights Reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!doctype html>
|
||||
<script src="entry.js"></script>
|
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/simple-bundle/entry.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/simple-bundle/entry.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import A from "./a.js";
|
||||
|
||||
A();
|
14
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/single-default/a.js
generated
vendored
Normal file
14
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/single-default/a.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default 4;
|
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/single-default/build/runner.html
generated
vendored
Normal file
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/single-default/build/runner.html
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!--
|
||||
Copyright 2018 Google Inc. All Rights Reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!doctype html>
|
||||
<script src="entry.js"></script>
|
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/single-default/entry.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/single-default/entry.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import A from "./a.js";
|
||||
|
||||
window.parent.postMessage(A, "*");
|
17
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/worker/a.js
generated
vendored
Normal file
17
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/worker/a.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default async function() {
|
||||
const { default: f } = await import("./b.js");
|
||||
self.postMessage(f());
|
||||
}
|
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/worker/b.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/worker/b.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default function() {
|
||||
return "a";
|
||||
}
|
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/worker/build/runner.html
generated
vendored
Normal file
15
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/worker/build/runner.html
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!--
|
||||
Copyright 2018 Google Inc. All Rights Reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!doctype html>
|
||||
<script src="entry.js"></script>
|
18
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/worker/entry.js
generated
vendored
Normal file
18
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/worker/entry.js
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// The type module should get removed for AMD format!
|
||||
const w = new Worker("./worker.js", { type: "module" });
|
||||
w.addEventListener("message", ev => {
|
||||
window.parent.postMessage(ev.data, "*");
|
||||
});
|
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/worker/worker.js
generated
vendored
Normal file
16
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/worker/worker.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import a from "./a.js";
|
||||
|
||||
a();
|
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/import-meta.test.js
generated
vendored
Normal file
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/import-meta.test.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
describe("import.meta", function() {
|
||||
beforeEach(function() {
|
||||
this.ifr = document.createElement("iframe");
|
||||
document.body.append(this.ifr);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
this.ifr.remove();
|
||||
});
|
||||
|
||||
it("loads transpiled modules", function(done) {
|
||||
window.addEventListener("message", function l(ev) {
|
||||
if (/^https?:\/\/[^/]+\/a-[0-9a-f]+\.js$/.test(ev.data)) {
|
||||
window.removeEventListener("message", l);
|
||||
done();
|
||||
}
|
||||
});
|
||||
this.ifr.src = "/base/tests/fixtures/import-meta/build/runner.html";
|
||||
});
|
||||
});
|
42
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/import-worker-url-custom-scheme.test.js
generated
vendored
Normal file
42
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/import-worker-url-custom-scheme.test.js
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* Copyright 2020 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
describe("omt: URL import with custom scheme", function() {
|
||||
const runner =
|
||||
"/base/tests/fixtures/import-worker-url-custom-scheme/build/runner.html";
|
||||
|
||||
beforeEach(function() {
|
||||
this.ifr = document.createElement("iframe");
|
||||
document.body.append(this.ifr);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
this.ifr.remove();
|
||||
});
|
||||
|
||||
it("imports as string", async function() {
|
||||
this.ifr.src = runner;
|
||||
await new Promise(resolve => this.ifr.addEventListener("load", resolve));
|
||||
assert.typeOf(this.ifr.contentWindow.workerURL, "string");
|
||||
});
|
||||
|
||||
it("loads transpiled modules", function(done) {
|
||||
window.addEventListener("message", function l(ev) {
|
||||
if (ev.data === "a") {
|
||||
window.removeEventListener("message", l);
|
||||
done();
|
||||
}
|
||||
});
|
||||
this.ifr.src = runner;
|
||||
});
|
||||
});
|
41
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/import-worker-url.test.js
generated
vendored
Normal file
41
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/import-worker-url.test.js
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
/**
|
||||
* Copyright 2020 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
describe("omt: URL import", function() {
|
||||
const runner = "/base/tests/fixtures/import-worker-url/build/runner.html";
|
||||
|
||||
beforeEach(function() {
|
||||
this.ifr = document.createElement("iframe");
|
||||
document.body.append(this.ifr);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
this.ifr.remove();
|
||||
});
|
||||
|
||||
it("imports as string", async function() {
|
||||
this.ifr.src = runner;
|
||||
await new Promise(resolve => this.ifr.addEventListener("load", resolve));
|
||||
assert.typeOf(this.ifr.contentWindow.workerURL, "string");
|
||||
});
|
||||
|
||||
it("loads transpiled modules", function(done) {
|
||||
window.addEventListener("message", function l(ev) {
|
||||
if (ev.data === "a") {
|
||||
window.removeEventListener("message", l);
|
||||
done();
|
||||
}
|
||||
});
|
||||
this.ifr.src = runner;
|
||||
});
|
||||
});
|
47
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/module-worker.test.js
generated
vendored
Normal file
47
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/module-worker.test.js
generated
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
describe("Module Worker", function() {
|
||||
const blob = new Blob([""], { type: "text/javascript" });
|
||||
const url = URL.createObjectURL(blob);
|
||||
let supportsModuleWorker = false;
|
||||
const options = {
|
||||
get type() {
|
||||
supportsModuleWorker = true;
|
||||
}
|
||||
};
|
||||
new Worker(url, options).terminate();
|
||||
URL.revokeObjectURL(url);
|
||||
|
||||
beforeEach(function() {
|
||||
if (!supportsModuleWorker) {
|
||||
return this.skip();
|
||||
}
|
||||
this.ifr = document.createElement("iframe");
|
||||
document.body.append(this.ifr);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
this.ifr.remove();
|
||||
});
|
||||
|
||||
it("work", function(done) {
|
||||
window.addEventListener("message", function l(ev) {
|
||||
if (ev.data === "a") {
|
||||
window.removeEventListener("message", l);
|
||||
done();
|
||||
}
|
||||
});
|
||||
this.ifr.src = "/base/tests/fixtures/module-worker/build/runner.html";
|
||||
});
|
||||
});
|
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/more-workers.test.js
generated
vendored
Normal file
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/more-workers.test.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
describe("Worker", function() {
|
||||
beforeEach(function() {
|
||||
this.ifr = document.createElement("iframe");
|
||||
document.body.append(this.ifr);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
this.ifr.remove();
|
||||
});
|
||||
|
||||
it("can load multiple workers", function(done) {
|
||||
window.addEventListener("message", function l(ev) {
|
||||
if (ev.data === "a") {
|
||||
window.removeEventListener("message", l);
|
||||
done();
|
||||
}
|
||||
});
|
||||
this.ifr.src = "/base/tests/fixtures/more-workers/build/runner.html";
|
||||
});
|
||||
});
|
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/public-path.test.js
generated
vendored
Normal file
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/public-path.test.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
describe("Public Path", function() {
|
||||
beforeEach(function() {
|
||||
this.ifr = document.createElement("iframe");
|
||||
document.body.append(this.ifr);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
this.ifr.remove();
|
||||
});
|
||||
|
||||
it("loads transpiled modules", function(done) {
|
||||
window.addEventListener("message", function l(ev) {
|
||||
if (ev.data === "a") {
|
||||
window.removeEventListener("message", l);
|
||||
done();
|
||||
}
|
||||
});
|
||||
this.ifr.src = "/base/tests/fixtures/public-path/build/runner.html";
|
||||
});
|
||||
});
|
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/simple-bundle.test.js
generated
vendored
Normal file
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/simple-bundle.test.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
describe("Simple bundle", function() {
|
||||
beforeEach(function() {
|
||||
this.ifr = document.createElement("iframe");
|
||||
document.body.append(this.ifr);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
this.ifr.remove();
|
||||
});
|
||||
|
||||
it("loads transpiled modules", function(done) {
|
||||
window.addEventListener("message", function l(ev) {
|
||||
if (ev.data === "a") {
|
||||
window.removeEventListener("message", l);
|
||||
done();
|
||||
}
|
||||
});
|
||||
this.ifr.src = "/base/tests/fixtures/simple-bundle/build/runner.html";
|
||||
});
|
||||
});
|
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/single-default.test.js
generated
vendored
Normal file
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/single-default.test.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
describe("Single default const export", function() {
|
||||
beforeEach(function() {
|
||||
this.ifr = document.createElement("iframe");
|
||||
document.body.append(this.ifr);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
this.ifr.remove();
|
||||
});
|
||||
|
||||
it("loads transpiled modules", function(done) {
|
||||
window.addEventListener("message", function l(ev) {
|
||||
if (ev.data === 4) {
|
||||
window.removeEventListener("message", l);
|
||||
done();
|
||||
}
|
||||
});
|
||||
this.ifr.src = "/base/tests/fixtures/single-default/build/runner.html";
|
||||
});
|
||||
});
|
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/worker.test.js
generated
vendored
Normal file
33
web/node_modules/@surma/rollup-plugin-off-main-thread/tests/worker.test.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
describe("Worker", function() {
|
||||
beforeEach(function() {
|
||||
this.ifr = document.createElement("iframe");
|
||||
document.body.append(this.ifr);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
this.ifr.remove();
|
||||
});
|
||||
|
||||
it("loads transpiled modules", function(done) {
|
||||
window.addEventListener("message", function l(ev) {
|
||||
if (ev.data === "a") {
|
||||
window.removeEventListener("message", l);
|
||||
done();
|
||||
}
|
||||
});
|
||||
this.ifr.src = "/base/tests/fixtures/worker/build/runner.html";
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue