Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1399)

Unified Diff: extensions/test/data/web_view/apitest/main.js

Issue 715583007: Various webview cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/renderer/resources/guest_view/web_view_experimental.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/test/data/web_view/apitest/main.js
diff --git a/extensions/test/data/web_view/apitest/main.js b/extensions/test/data/web_view/apitest/main.js
index 2c8d15f60313f8508e117e7d3677bcbce014aafb..78c56b70fce75f9e99f3c53c4e23eaab945a7cee 100644
--- a/extensions/test/data/web_view/apitest/main.js
+++ b/extensions/test/data/web_view/apitest/main.js
@@ -671,14 +671,17 @@ function testExecuteScript() {
function testExecuteScriptFail() {
var webview = document.createElement('webview');
- try {
+ document.body.appendChild(webview);
+ setTimeout(function() {
webview.executeScript(
- {code: 'document.body.style.backgroundColor = "red";'},
- function(results) { embedder.test.fail(); });
- }
- catch (e) {
- embedder.test.succeed();
- }
+ {code:'document.body.style.backgroundColor = "red";'},
+ function(results) {
+ embedder.test.fail();
+ });
+ setTimeout(function() {
+ embedder.test.succeed();
+ }, 0);
+ }, 0);
}
// This test verifies that the call of executeScript will fail and return null
« no previous file with comments | « extensions/renderer/resources/guest_view/web_view_experimental.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698