“不允许加载本地资源";启动Chrome浏览器崩溃URL时看到错误 [英] "Not allowed to load local resource" error is seen while launching the chrome crash url

查看:156
本文介绍了“不允许加载本地资源";启动Chrome浏览器崩溃URL时看到错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于我的应用程序测试目的,我想在单独的窗口中将Chrome网址崩溃,但是下面的代码给了我不允许加载本地资源"错误.

I want to crash the chrome url in a separate window for my application testing purpose, But the below piece of code gives me 'Not allowed to load local resource' error.

有什么办法可以通过window.open启动chrome崩溃URL而不收到错误吗?

Is there any way I can launch the chrome crash url through window.open without receiving the error ?

这是我尝试过的:

<html>
<head>
    <title>Sample Test</title>

    <script type="text/javascript">
        function crashTest() {                     
            window.open("chrome://inducebrowsercrashforrealz", "windowInMyApp", "left=50, top=100, width=600, height=400, toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
        }      

    </script>
</head>
<body>
    <div>
        <br />
        <button onclick="crashTest();">Navigate</button>        
    </div>
</body>
</html>

推荐答案

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆