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

Unified Diff: chrome/test/data/extensions/platform_apps/web_view/shim/main.js

Issue 316173003: Re-enable WebViewTest.Shim_TestDestroyOnEventListener. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove code for repeating test 200 times, ready for review Created 6 years, 6 months 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
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 64102f698445a6fd2e0d4e41420579ea365e88b8..78fb914f248ef3d3e979a90bd4c5b8e1c634623c 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
@@ -507,7 +507,9 @@ function testDestroyOnEventListener() {
if (url != e.url)
return;
++loadCommitCount;
- if (loadCommitCount == 1) {
+ if (loadCommitCount == 2) {
+ // Pass in a timeout so that we can catch if any additional loadcommit
+ // occurs.
setTimeout(function() {
embedder.test.succeed();
}, 0);
@@ -518,10 +520,12 @@ function testDestroyOnEventListener() {
// The test starts from here, by setting the src to |url|.
webview.addEventListener('loadcommit', function(e) {
+ window.console.log('loadcommit1');
webview.parentNode.removeChild(webview);
loadCommitCommon(e);
});
webview.addEventListener('loadcommit', function(e) {
+ window.console.log('loadcommit2');
loadCommitCommon(e);
});
webview.setAttribute('src', url);
« chrome/browser/apps/web_view_browsertest.cc ('K') | « chrome/browser/apps/web_view_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698