Refactor <webview> tag tests (#12886)
This commit is contained in:
parent
cc2cd95ec5
commit
fc34076c2b
7 changed files with 632 additions and 635 deletions
8
spec/fixtures/module/preload-node-off.js
vendored
8
spec/fixtures/module/preload-node-off.js
vendored
|
@ -1,6 +1,12 @@
|
||||||
setImmediate(function () {
|
setImmediate(function () {
|
||||||
try {
|
try {
|
||||||
console.log([typeof process, typeof setImmediate, typeof global, typeof Buffer].join(' '))
|
const types = {
|
||||||
|
process: typeof process,
|
||||||
|
setImmediate: typeof setImmediate,
|
||||||
|
global: typeof global,
|
||||||
|
Buffer: typeof Buffer
|
||||||
|
}
|
||||||
|
console.log(JSON.stringify(types))
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e.message)
|
console.log(e.message)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
try {
|
try {
|
||||||
console.log([typeof process, typeof setImmediate, typeof global, typeof Buffer, typeof global.Buffer].join(' '))
|
const types = {
|
||||||
|
process: typeof process,
|
||||||
|
setImmediate: typeof setImmediate,
|
||||||
|
global: typeof global,
|
||||||
|
Buffer: typeof Buffer,
|
||||||
|
'global.Buffer': typeof global.Buffer
|
||||||
|
}
|
||||||
|
console.log(JSON.stringify(types))
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e.message)
|
console.log(e.message)
|
||||||
}
|
}
|
||||||
|
|
8
spec/fixtures/module/preload.js
vendored
8
spec/fixtures/module/preload.js
vendored
|
@ -1 +1,7 @@
|
||||||
console.log([typeof require, typeof module, typeof process, typeof Buffer].join(' '))
|
const types = {
|
||||||
|
require: typeof require,
|
||||||
|
module: typeof module,
|
||||||
|
process: typeof process,
|
||||||
|
Buffer: typeof Buffer
|
||||||
|
}
|
||||||
|
console.log(JSON.stringify(types))
|
||||||
|
|
8
spec/fixtures/pages/c.html
vendored
8
spec/fixtures/pages/c.html
vendored
|
@ -1,7 +1,13 @@
|
||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
console.log([typeof require, typeof module, typeof process, typeof global].join(' '));
|
const types = {
|
||||||
|
require: typeof require,
|
||||||
|
module: typeof module,
|
||||||
|
process: typeof process,
|
||||||
|
global: typeof global
|
||||||
|
}
|
||||||
|
console.log(JSON.stringify(types));
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
7
spec/fixtures/pages/d.html
vendored
7
spec/fixtures/pages/d.html
vendored
|
@ -1,7 +1,12 @@
|
||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
console.log([typeof require, typeof module, typeof process].join(' '));
|
const types = {
|
||||||
|
require: typeof require,
|
||||||
|
module: typeof module,
|
||||||
|
process: typeof process
|
||||||
|
}
|
||||||
|
console.log(JSON.stringify(types));
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
6
spec/fixtures/pages/partition/one.html
vendored
6
spec/fixtures/pages/partition/one.html
vendored
|
@ -1,4 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
const item = window.localStorage.getItem('test');
|
console.log(JSON.stringify({
|
||||||
console.log([item, window.localStorage.length].join(' '));
|
numberOfEntries: window.localStorage.length,
|
||||||
|
testValue: window.localStorage.getItem('test')
|
||||||
|
}));
|
||||||
</script>
|
</script>
|
||||||
|
|
1157
spec/webview-spec.js
1157
spec/webview-spec.js
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue