blob: 12215003f5a6d25371226deccb8f7fc32e31235a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<!DOCTYPE html>
<body>
<script src="../../resources/js-test.js"></script>
<script>
description('Make sure wrappers are setup using the window the property came from, instead of the lexical global object.');
var frame = document.createElement('iframe');
document.body.appendChild(frame);
var inner = frame.contentWindow;
window.Object.prototype.isInner = false;
inner.Object.prototype.isInner = true;
var pathsToTest = [
'HTMLElement',
'Window',
'close',
'console',
'document',
'document.body',
'document.childNodes',
'navigator',
'postMessage',
'window',
];
function testPath(path) {
shouldBeTrue('inner.' + path + '.isInner');
shouldBeTrue('inner.' + path + '.constructor.isInner');
shouldBeTrue('inner.' + path + '.constructor.prototype.isInner');
shouldBeTrue('inner.' + path + '.__proto__.isInner');
}
pathsToTest.forEach(testPath);
</script>
</body>
|