summaryrefslogtreecommitdiffstats
path: root/chrome/test/data/History/history_length_test2.html
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-16 07:58:05 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-16 07:58:05 +0000
commitf46aff6ee482e56eb3e885c65cd8d5989ac133af (patch)
tree256e4da27837872305dde8cc7ef668189439e4b1 /chrome/test/data/History/history_length_test2.html
parentddc5288912f95a6cc89e93db5ef2c779b4a88838 (diff)
downloadchromium_src-f46aff6ee482e56eb3e885c65cd8d5989ac133af.zip
chromium_src-f46aff6ee482e56eb3e885c65cd8d5989ac133af.tar.gz
chromium_src-f46aff6ee482e56eb3e885c65cd8d5989ac133af.tar.bz2
This fixes http://code.google.com/p/chromium/issues/detail?id=146&,
which was an issue with navigation attempts initiated by Flash not working correctly in Chrome. The plugin would initiate a navigation in response to a user click. This would eventually result in a call to a script on the page, which would query the history in a timer, and would end up resetting the selected URL to the original URL as the history length would not be updated as yet. The reason being the following:- 1. A Frame navigation is initiated by the renderer in response to the user click. 2. This is sent as an async message to the browser UI thread. 3. When the navigation in the browser completes we update the history info in render view asynchronously. The fix is to attempt to update the history count when we receive notifications from webkit. These include notifications for items being added to the history, navigations based on history (like history.back/forward/goto, etc). These counts continue to be updated as before from the browser as well. Added UI tests to test these cases. Bug=146 R=jam Review URL: http://codereview.chromium.org/7412 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3457 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data/History/history_length_test2.html')
-rw-r--r--chrome/test/data/History/history_length_test2.html33
1 files changed, 33 insertions, 0 deletions
diff --git a/chrome/test/data/History/history_length_test2.html b/chrome/test/data/History/history_length_test2.html
new file mode 100644
index 0000000..2bae3ac
--- /dev/null
+++ b/chrome/test/data/History/history_length_test2.html
@@ -0,0 +1,33 @@
+<html>
+<head><title>History test2</title>
+<script src="HistoryHelper.js"></script>
+</head>
+
+<body onload="onLoad();">
+<div id="statusPanel" style="border: 1px solid red; width: 100%">
+History test2....
+<div id="Div1" style="border: 1px solid red; width: 100%">
+</body>
+
+<SCRIPT type="text/javascript">
+function onLoad() {
+ setTimeout(OnValidateHistoryLength, 100);
+}
+
+function OnValidateHistoryLength() {
+ if (window.history.length != 3) {
+ onFailure("History_Length_Test", 1, "History length mismatch");
+ alert(window.history.length);
+ return false;
+ }
+
+ window.history.back();
+ return true;
+}
+
+function OnEchoHistory() {
+ alert(window.history.length);
+}
+
+</SCRIPT>
+</html> \ No newline at end of file