diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 20:18:07 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 20:18:07 +0000 |
commit | a455d381543e773418e645b3192c8731430a646e (patch) | |
tree | f52ea9e8a6a2db06957637b8698d7c5007b2e4a5 /webkit/tools/test_shell | |
parent | 2eb312b025971ee1529b3a6c67d715055cb77906 (diff) | |
download | chromium_src-a455d381543e773418e645b3192c8731430a646e.zip chromium_src-a455d381543e773418e645b3192c8731430a646e.tar.gz chromium_src-a455d381543e773418e645b3192c8731430a646e.tar.bz2 |
Try #2 of "make JavaScript alerts reflect the URL of the frame they came from,
not the enclosing frame." The diffrence between this one and the previous version
of this patch is the addition of test_webview_delegate.
BUG=1686837
Review URL: http://codereview.chromium.org/39163
Review URL: http://codereview.chromium.org/40175
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11026 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell')
-rwxr-xr-x | webkit/tools/test_shell/test_webview_delegate.cc | 11 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.h | 6 |
2 files changed, 9 insertions, 8 deletions
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index 9097dbd..3358abc 100755 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -409,7 +409,7 @@ void TestWebViewDelegate::AddMessageToConsole(WebView* webview, } } -void TestWebViewDelegate::RunJavaScriptAlert(WebView* webview, +void TestWebViewDelegate::RunJavaScriptAlert(WebFrame* webframe, const std::wstring& message) { if (!shell_->layout_test_mode()) { ShowJavaScriptAlert(message); @@ -419,7 +419,7 @@ void TestWebViewDelegate::RunJavaScriptAlert(WebView* webview, } } -bool TestWebViewDelegate::RunJavaScriptConfirm(WebView* webview, +bool TestWebViewDelegate::RunJavaScriptConfirm(WebFrame* webframe, const std::wstring& message) { if (shell_->layout_test_mode()) { // When running tests, write to stdout. @@ -430,9 +430,10 @@ bool TestWebViewDelegate::RunJavaScriptConfirm(WebView* webview, return false; } -bool TestWebViewDelegate::RunJavaScriptPrompt(WebView* webview, - const std::wstring& message, const std::wstring& default_value, - std::wstring* result) { +bool TestWebViewDelegate::RunJavaScriptPrompt(WebFrame* webframe, + const std::wstring& message, + const std::wstring& default_value, + std::wstring* result) { if (shell_->layout_test_mode()) { // When running tests, write to stdout. std::string utf8_message = WideToUTF8(message); diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h index aa3e521..a0dcbf9 100644 --- a/webkit/tools/test_shell/test_webview_delegate.h +++ b/webkit/tools/test_shell/test_webview_delegate.h @@ -87,11 +87,11 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, const GURL& url, const GURL& referrer, WindowOpenDisposition disposition); - virtual void RunJavaScriptAlert(WebView* webview, + virtual void RunJavaScriptAlert(WebFrame* webframe, const std::wstring& message); - virtual bool RunJavaScriptConfirm(WebView* webview, + virtual bool RunJavaScriptConfirm(WebFrame* webframe, const std::wstring& message); - virtual bool RunJavaScriptPrompt(WebView* webview, + virtual bool RunJavaScriptPrompt(WebFrame* webframe, const std::wstring& message, const std::wstring& default_value, std::wstring* result); |