mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
49 lines
1.4 KiB
HTML
49 lines
1.4 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<!--
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=725796
|
|
-->
|
|
<head>
|
|
<title>Test for Bug 725796</title>
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<script type="application/javascript" src="browserFrameHelpers.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
</head>
|
|
<body>
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=725796">Mozilla Bug 725796</a>
|
|
|
|
<!--
|
|
Test that an <iframe mozbrowser> is a window.{top,parent,frameElement} barrier.
|
|
|
|
If <iframe mozbrowser> is changed to run in a separate process, this test
|
|
will not work.
|
|
-->
|
|
|
|
<script type="application/javascript;version=1.7">
|
|
"use strict";
|
|
|
|
browserFrameHelpers.setEnabledPref(true);
|
|
browserFrameHelpers.addToWhitelist();
|
|
|
|
var iframe = document.createElement('iframe');
|
|
iframe.mozbrowser = true;
|
|
document.body.appendChild(iframe);
|
|
|
|
var innerIframe = document.createElement('iframe');
|
|
iframe.contentDocument.body.appendChild(innerIframe);
|
|
|
|
var iframeCw = iframe.contentWindow;
|
|
var innerCw = innerIframe.contentWindow;
|
|
|
|
is(iframeCw.top, iframeCw, 'iframe top');
|
|
is(iframeCw.parent, iframeCw, 'iframe parent');
|
|
is(iframeCw.frameElement, null, 'iframe frameElement');
|
|
|
|
is(innerCw.top, iframeCw, 'inner iframe top');
|
|
is(innerCw.parent, iframeCw, 'inner iframe parent');
|
|
is(innerCw.frameElement, innerIframe, 'inner iframe frameElement');
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|