summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/test_webview_delegate.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-13 19:44:20 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-13 19:44:20 +0000
commit72e6216d6db17ee1b67cf0110240f635c1bec38f (patch)
tree2af1169bc6cd973e98e4dd25f8cff01458be6042 /webkit/tools/test_shell/test_webview_delegate.cc
parentb1774f1af8852499efac6c358daf07c8d48b1f72 (diff)
downloadchromium_src-72e6216d6db17ee1b67cf0110240f635c1bec38f.zip
chromium_src-72e6216d6db17ee1b67cf0110240f635c1bec38f.tar.gz
chromium_src-72e6216d6db17ee1b67cf0110240f635c1bec38f.tar.bz2
Avoid flakiness related to progress notifications sometimes happening in a nested fashion. Due to the event sending controller, it is possible for the completion of one load to kick off another or lead to the cancelation of a third. These situations can easily result in DidStartLoading being called twice without a DidStopLoading in between, and vice versa.
Upstream DRT does not care about the progress notifications being ordered properly, and so I don't think we should either. R=tony Review URL: http://codereview.chromium.org/10888 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5356 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_webview_delegate.cc')
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc16
1 files changed, 2 insertions, 14 deletions
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 314f378..d3d4e0d 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -82,19 +82,11 @@ void TestWebViewDelegate::OpenURL(WebView* webview, const GURL& url,
}
void TestWebViewDelegate::DidStartLoading(WebView* webview) {
- if (page_is_loading_) {
- LOG(ERROR) << "DidStartLoading called while loading";
- return;
- }
- page_is_loading_ = true;
+ // Ignored
}
void TestWebViewDelegate::DidStopLoading(WebView* webview) {
- if (!page_is_loading_) {
- LOG(ERROR) << "DidStopLoading called while not loading";
- return;
- }
- page_is_loading_ = false;
+ // Ignored
}
void TestWebViewDelegate::WindowObjectCleared(WebFrame* webframe) {
@@ -212,8 +204,6 @@ void TestWebViewDelegate::DidFailProvisionalLoadWithError(
GetFrameDescription(frame).c_str());
}
- if (page_is_loading_)
- DidStopLoading(webview);
LocationChangeDone(frame->GetProvisionalDataSource());
// Don't display an error page if we're running layout tests, because
@@ -288,8 +278,6 @@ void TestWebViewDelegate::DidFailLoadWithError(WebView* webview,
GetFrameDescription(frame).c_str());
}
- if (page_is_loading_)
- DidStopLoading(webview);
LocationChangeDone(frame->GetDataSource());
}