Index: chrome/test/data/extensions/platform_apps/web_view/shim/main.js |
diff --git a/chrome/test/data/extensions/platform_apps/web_view/shim/main.js b/chrome/test/data/extensions/platform_apps/web_view/shim/main.js |
index fdc08a68871fa997184ba67d2074aaa8828a1de7..64102f698445a6fd2e0d4e41420579ea365e88b8 100644 |
--- a/chrome/test/data/extensions/platform_apps/web_view/shim/main.js |
+++ b/chrome/test/data/extensions/platform_apps/web_view/shim/main.js |
@@ -580,16 +580,19 @@ function testCannotMutateEventName() { |
function testPartitionRaisesException() { |
var webview = document.createElement('webview'); |
webview.setAttribute('partition', arguments.callee.name); |
- webview.setAttribute('src', 'data:text/html,trigger navigation'); |
- document.body.appendChild(webview); |
- setTimeout(function() { |
+ |
+ var loadstopHandler = function(e) { |
try { |
webview.partition = 'illegal'; |
embedder.test.fail(); |
} catch (e) { |
embedder.test.succeed(); |
} |
- }, 0); |
+ }; |
+ webview.addEventListener('loadstop', loadstopHandler); |
+ |
+ document.body.appendChild(webview); |
+ webview.setAttribute('src', 'data:text/html,trigger navigation'); |
} |
function testExecuteScriptFail() { |