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

Unified Diff: chrome/test/data/panels/onbeforeunload.html

Issue 8505047: Fix panels being removed from PanelManager prematurely. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change test from using notification to timeout. Created 9 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 | « chrome/browser/ui/panels/panel_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/panels/onbeforeunload.html
diff --git a/chrome/test/data/panels/onbeforeunload.html b/chrome/test/data/panels/onbeforeunload.html
new file mode 100644
index 0000000000000000000000000000000000000000..5c36c45e4a40314a1e19afb541e4065ae49e135d
--- /dev/null
+++ b/chrome/test/data/panels/onbeforeunload.html
@@ -0,0 +1,26 @@
+<html>
+ <head>
+ <script>
+ var close_call_num = 1;
+ var title_first_close = "TitleFirstClose";
+ var title_second_close = "TitleSecondClose";
+
+ function changeTitle() {
+ if (close_call_num == 1)
+ document.title = title_first_close;
+ else if (close_call_num == 2)
+ document.title = title_second_close;
+ close_call_num++;
+ }
+
+ window.onbeforeunload = function() {
+ if (close_call_num <= 2)
+ setTimeout("changeTitle()", 0);
+ return "some random string";
+ }
+ </script>
+ </head>
+ <body>
+ OnBeforeUnloadHandler In Panels.
+ </body>
+</html>
« no previous file with comments | « chrome/browser/ui/panels/panel_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698