Commit 9e7b55d9 authored by arthursonzogni's avatar arthursonzogni Committed by Commit Bot

[Chrome Apps] Test new window with about:blank.

Check using chrome.app.window.create() with the about:blank URL is not
allowed.

Bug: None.
Change-Id: Ib8ca494921ca588540857b11e81584e686ba590e
Reviewed-on: https://chromium-review.googlesource.com/995892Reviewed-by: default avatarBen Wells <benwells@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549537}
parent c79fc93a
......@@ -1408,4 +1408,8 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, SandboxedLocalFile) {
ASSERT_TRUE(RunPlatformAppTest("platform_apps/sandboxed_local_file"));
}
IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, NewWindowAboutBlank) {
ASSERT_TRUE(RunPlatformAppTest("platform_apps/new_window_about_blank"));
}
} // namespace extensions
{
"name": "Platform App Test: Use chrome.app.window.create() with about:blank.",
"manifest_version": 2,
"version": "1",
"app": {
"background": {
"scripts": ["test.js"]
}
}
}
// Copyright (c) 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
chrome.app.runtime.onLaunched.addListener(function() {
chrome.app.window.create('about:blank', {}, function (createdWindow) {
if (createdWindow) {
chrome.test.notifyFail("chrome.app.window.create() with about:blank " +
"succeeded. That's not allowed.");
} else {
chrome.test.notifyPass();
}
})
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment