Refactor <webview> tag tests (#12886)

This commit is contained in:
Alexey Kuzmin 2018-05-15 01:00:49 +03:00 committed by Charles Kerr
parent cc2cd95ec5
commit fc34076c2b
7 changed files with 632 additions and 635 deletions

View file

@ -1,6 +1,12 @@
setImmediate(function () {
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) {
console.log(e.message)
}

View file

@ -1,5 +1,12 @@
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) {
console.log(e.message)
}

View file

@ -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))

View file

@ -1,7 +1,13 @@
<html>
<body>
<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>
</body>
</html>

View file

@ -1,7 +1,12 @@
<html>
<body>
<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>
</body>
</html>

View file

@ -1,4 +1,6 @@
<script>
const item = window.localStorage.getItem('test');
console.log([item, window.localStorage.length].join(' '));
console.log(JSON.stringify({
numberOfEntries: window.localStorage.length,
testValue: window.localStorage.getItem('test')
}));
</script>

File diff suppressed because it is too large Load diff