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

Unified Diff: webkit/tools/test_shell/test_shell.cc

Issue 200054: Hook up WebFrameClient, replacing many WebViewDelegate methods.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « webkit/tools/test_shell/test_shell.h ('k') | webkit/tools/test_shell/test_shell_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell.cc
===================================================================
--- webkit/tools/test_shell/test_shell.cc (revision 25715)
+++ webkit/tools/test_shell/test_shell.cc (working copy)
@@ -26,6 +26,7 @@
#include "googleurl/src/url_util.h"
#include "grit/webkit_strings.h"
#include "net/base/mime_util.h"
+#include "net/base/net_util.h"
#include "net/url_request/url_request_file_job.h"
#include "net/url_request/url_request_filter.h"
#include "skia/ext/bitmap_platform_device.h"
@@ -131,7 +132,7 @@
// Navigate to an empty page to fire all the destruction logic for the
// current page.
- LoadURL(L"about:blank");
+ LoadURL(GURL("about:blank"));
// Call GC twice to clean up garbage.
CallJSGC();
@@ -160,10 +161,10 @@
}
}
-bool TestShell::CreateNewWindow(const std::wstring& startingURL,
+bool TestShell::CreateNewWindow(const GURL& starting_url,
TestShell** result) {
TestShell* shell = new TestShell();
- bool rv = shell->Initialize(startingURL);
+ bool rv = shell->Initialize(starting_url);
if (rv) {
if (result)
*result = shell;
@@ -486,12 +487,16 @@
return NULL;
TestShell* new_win;
- if (!CreateNewWindow(std::wstring(), &new_win))
+ if (!CreateNewWindow(GURL(), &new_win))
return NULL;
return new_win->webView();
}
+bool TestShell::IsSVGTestURL(const GURL& url) {
+ return url.is_valid() && url.spec().find("W3C-SVG-1.1") != std::string::npos;
+}
+
void TestShell::SizeToSVG() {
SizeTo(kSVGTestWindowWidth, kSVGTestWindowHeight);
}
@@ -506,10 +511,14 @@
delegate_->Reset();
}
-void TestShell::LoadURL(const wchar_t* url) {
- LoadURLForFrame(url, NULL);
+void TestShell::LoadFile(const FilePath& file) {
+ LoadURLForFrame(net::FilePathToFileURL(file), std::wstring());
}
+void TestShell::LoadURL(const GURL& url) {
+ LoadURLForFrame(url, std::wstring());
+}
+
bool TestShell::Navigate(const TestNavigationEntry& entry, bool reload) {
// Get the right target frame for the entry.
WebFrame* frame = webView()->GetMainFrame();
« no previous file with comments | « webkit/tools/test_shell/test_shell.h ('k') | webkit/tools/test_shell/test_shell_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698