mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Specify a background color for tests so that they're easier to read when transparent rendering is enabled.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1428 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -438,7 +438,8 @@ void ClientHandler::OnLoadError(CefRefPtr<CefBrowser> browser,
|
||||
|
||||
// Display a load error message.
|
||||
std::stringstream ss;
|
||||
ss << "<html><body><h2>Failed to load URL " << std::string(failedUrl) <<
|
||||
ss << "<html><body bgcolor=\"white\">"
|
||||
"<h2>Failed to load URL " << std::string(failedUrl) <<
|
||||
" with error " << std::string(errorText) << " (" << errorCode <<
|
||||
").</h2></body></html>";
|
||||
frame->LoadString(ss.str(), failedUrl);
|
||||
@ -469,12 +470,14 @@ CefRefPtr<CefResourceHandler> ClientHandler::GetResourceHandler(
|
||||
// Show the request contents.
|
||||
std::string dump;
|
||||
DumpRequestContents(request, dump);
|
||||
std::string str = "<html><body bgcolor=\"white\"><pre>" + dump +
|
||||
"</pre></body></html>";
|
||||
CefRefPtr<CefStreamReader> stream =
|
||||
CefStreamReader::CreateForData(
|
||||
static_cast<void*>(const_cast<char*>(dump.c_str())),
|
||||
dump.size());
|
||||
static_cast<void*>(const_cast<char*>(str.c_str())),
|
||||
str.size());
|
||||
ASSERT(stream.get());
|
||||
return new CefStreamResourceHandler("text/plain", stream);
|
||||
return new CefStreamResourceHandler("text/html", stream);
|
||||
} else {
|
||||
// Load the resource from file.
|
||||
CefRefPtr<CefStreamReader> stream =
|
||||
|
Reference in New Issue
Block a user