| Index: LayoutTests/dart/security/cross-frame-access.html
|
| diff --git a/LayoutTests/dart/security/cross-frame-access.html b/LayoutTests/dart/security/cross-frame-access.html
|
| deleted file mode 100644
|
| index 942cbc361ed027dd0533aba1fb37e4cefc7efb2c..0000000000000000000000000000000000000000
|
| --- a/LayoutTests/dart/security/cross-frame-access.html
|
| +++ /dev/null
|
| @@ -1,101 +0,0 @@
|
| -<html>
|
| -<body>
|
| -<script type='application/javascript' src='../../../../../dart/client/testing/unittest/test_controller.js'></script>
|
| -<script type=application/dart>
|
| -#import('../../../../../dart/client/testing/unittest/unittest.dart');
|
| -#import('dart:dom');
|
| -
|
| -main() {
|
| - forLayoutTests();
|
| -
|
| - final sameOriginIFrame = document.createElement('iframe');
|
| - sameOriginIFrame.src = 'resources/cross-frame-access-iframe.html';
|
| -
|
| - final crossOriginIFrame = document.createElement('iframe');
|
| - crossOriginIFrame.src = 'data:text/html, <p>test iframe</p>';
|
| -
|
| - asyncTest('WaitForFramesLoad', 2, () {
|
| - frameLoaded(Event e) { callbackDone(); }
|
| - sameOriginIFrame.addEventListener('load', frameLoaded, true);
|
| - document.body.appendChild(sameOriginIFrame);
|
| - crossOriginIFrame.addEventListener('load', frameLoaded, true);
|
| - document.body.appendChild(crossOriginIFrame);
|
| - });
|
| -
|
| - test('DOMWindow', () {
|
| - testDOMWindow(sameOriginIFrame.contentWindow);
|
| - testDOMWindow(crossOriginIFrame.contentWindow);
|
| - });
|
| -
|
| - test('History', () {
|
| - testHistory(sameOriginIFrame.contentWindow.history);
|
| - testHistory(crossOriginIFrame.contentWindow.history);
|
| - });
|
| -
|
| - asyncTest('Location', 2, () {
|
| - testLocation(sameOriginIFrame.contentWindow.location);
|
| - testLocation(crossOriginIFrame.contentWindow.location);
|
| - });
|
| -}
|
| -
|
| -testDOMWindow(DOMWindow targetWindow) {
|
| - // Not allowed methods.
|
| - expectThrow(() => targetWindow.alert('test'));
|
| - expectThrow(() => targetWindow.addEventListener('load', (Event e) {}, true));
|
| - expectThrow(() => targetWindow.find('test', true, true, true, true, true, true));
|
| -
|
| - // Not allowed properties.
|
| - expectThrow(() => targetWindow.contentDocument);
|
| - expectThrow(() => targetWindow.localStorage);
|
| - expectThrow(() => targetWindow.console);
|
| -
|
| - // Allowed methods.
|
| - targetWindow.focus();
|
| - targetWindow.blur();
|
| - targetWindow.close();
|
| -
|
| - // Allowed properties.
|
| - expect(targetWindow.location).isNotNull();
|
| - expect(targetWindow.history).isNotNull();
|
| - expect(targetWindow.parent).isNotNull();
|
| -}
|
| -
|
| -testHistory(History history) {
|
| - // Not allowed properties.
|
| - expectThrow(() => history.length);
|
| -
|
| - // Not allowed methods.
|
| - window.history.pushState('test', 'test', 'test');
|
| - expectThrow(() => history.pushState('test', 'test', 'test'));
|
| - window.history.replaceState('test', 'test', 'test');
|
| - expectThrow(() => history.replaceState('test', 'test', 'test'));
|
| -
|
| - // Allowed method.
|
| - history.back();
|
| - history.forward();
|
| - history.go(-1);
|
| -}
|
| -
|
| -testLocation(Location location) {
|
| - // Not allowed properties.
|
| - expectThrow(() => location.href);
|
| - expectThrow(() => location.protocol);
|
| - expectThrow(() => location.host = 'test');
|
| - expectThrow(() => location.origin);
|
| -
|
| - // Not allowed methods.
|
| - expectThrow(() => location.assign('http://www.webkit.org'));
|
| - expectThrow(() => location.reload());
|
| - expectThrow(() => location.getParameter('test'));
|
| -
|
| - // Allowed properties.
|
| - window.addEventListener('message', (Event e) {
|
| - expect(e.data).equals('navigated');
|
| - window.setTimeout(callbackDone, 0);
|
| - });
|
| - location.href = 'data:text/html, <script>parent.postMessage("navigated", "*")<' + '/script>';
|
| -}
|
| -</script>
|
| -
|
| -</body>
|
| -</html>
|
|
|