Commit ca73bb0e authored by lfg's avatar lfg Committed by Commit bot

Porting more tests to app_shell_browsertests.

The tests included in this CL are:
TestExecuteScriptIsAbortedWhenWebViewSourceIsChanged
TestFindAPI
TestFindAPI_findupdate
TestGetProcessId
TestHiddenBeforeNavigation
TestInlineScriptFromAccessibleResources
TestInvalidChromeExtensionURL

BUG=352293

Review URL: https://codereview.chromium.org/615623002

Cr-Commit-Position: refs/heads/master@{#297537}
parent 5fa737de
...@@ -121,6 +121,37 @@ IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestExecuteScriptFail) { ...@@ -121,6 +121,37 @@ IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestExecuteScriptFail) {
RunTest("testExecuteScriptFail", "web_view/apitest"); RunTest("testExecuteScriptFail", "web_view/apitest");
} }
IN_PROC_BROWSER_TEST_F(WebViewAPITest,
TestExecuteScriptIsAbortedWhenWebViewSourceIsChanged) {
RunTest("testExecuteScriptIsAbortedWhenWebViewSourceIsChanged",
"web_view/apitest");
}
IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestFindAPI) {
RunTest("testFindAPI", "web_view/apitest");
}
IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestFindAPI_findupdate) {
RunTest("testFindAPI_findupdate", "web_view/apitest");
}
IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestGetProcessId) {
RunTest("testGetProcessId", "web_view/apitest");
}
IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestHiddenBeforeNavigation) {
RunTest("testHiddenBeforeNavigation", "web_view/apitest");
}
IN_PROC_BROWSER_TEST_F(WebViewAPITest,
TestInlineScriptFromAccessibleResources) {
RunTest("testInlineScriptFromAccessibleResources", "web_view/apitest");
}
IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestInvalidChromeExtensionURL) {
RunTest("testInvalidChromeExtensionURL", "web_view/apitest");
}
IN_PROC_BROWSER_TEST_F(WebViewAPITest, IN_PROC_BROWSER_TEST_F(WebViewAPITest,
TestLoadAbortChromeExtensionURLWrongPartition) { TestLoadAbortChromeExtensionURLWrongPartition) {
RunTest("testLoadAbortChromeExtensionURLWrongPartition", "web_view/apitest"); RunTest("testLoadAbortChromeExtensionURLWrongPartition", "web_view/apitest");
......
<!doctype html>
<!--
* Copyright 2014 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.
-->
<!-- This file is loaded from webview accessible resource -->
<html>
<head>
<title>A guest page.</title>
</head>
<body style="padding: 0; margin: 0;">
<script>
window.console.log('guest_with_inline_script.html: Inline script ran');
</script>
</body>
</html>
// Copyright 2014 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.
window.addEventListener('message', function(e) {
var response = '';
var data = JSON.parse(e.data);
if (data[0] == 'visibilityState-request') {
response = document.visibilityState;
} else {
response = 'FAILED';
}
e.source.postMessage(
JSON.stringify(['visibilityState-response', response]), '*');
});
...@@ -9,5 +9,15 @@ ...@@ -9,5 +9,15 @@
"background": { "background": {
"scripts": ["test.js"] "scripts": ["test.js"]
} }
},
"webview": {
"partitions": [
{
"name": "foobar",
"accessible_resources": [
"guest_with_inline_script.html"
]
}
]
} }
} }
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