mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-17 04:30:46 +01: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:
parent
97dd8beb4f
commit
e7ae14435b
@ -84,7 +84,8 @@ void RunGetSourceTest(CefRefPtr<CefBrowser> browser) {
|
||||
std::string source = StringReplace(string, "<", "<");
|
||||
source = StringReplace(source, ">", ">");
|
||||
std::stringstream ss;
|
||||
ss << "<html><body>Source:<pre>" << source << "</pre></body></html>";
|
||||
ss << "<html><body bgcolor=\"white\">Source:<pre>" << source <<
|
||||
"</pre></body></html>";
|
||||
browser_->GetMainFrame()->LoadString(ss.str(), "http://tests/getsource");
|
||||
}
|
||||
private:
|
||||
@ -103,7 +104,8 @@ void RunGetTextTest(CefRefPtr<CefBrowser> browser) {
|
||||
std::string text = StringReplace(string, "<", "<");
|
||||
text = StringReplace(text, ">", ">");
|
||||
std::stringstream ss;
|
||||
ss << "<html><body>Text:<pre>" << text << "</pre></body></html>";
|
||||
ss << "<html><body bgcolor=\"white\">Text:<pre>" << text <<
|
||||
"</pre></body></html>";
|
||||
browser_->GetMainFrame()->LoadString(ss.str(), "http://tests/gettext");
|
||||
}
|
||||
private:
|
||||
@ -150,7 +152,8 @@ void RunPluginInfoTest(CefRefPtr<CefBrowser> browser) {
|
||||
public:
|
||||
explicit Visitor(CefRefPtr<CefBrowser> browser)
|
||||
: browser_(browser) {
|
||||
html_ = "<html><head><title>Plugin Info Test</title></head><body>"
|
||||
html_ = "<html><head><title>Plugin Info Test</title></head>"
|
||||
"<body bgcolor=\"white\">"
|
||||
"\n<b>Installed plugins:</b>";
|
||||
}
|
||||
~Visitor() {
|
||||
|
@ -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 =
|
||||
|
@ -16,7 +16,7 @@ function sendMessage() {
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<body bgcolor="white">
|
||||
<form>
|
||||
Message: <input type="text" id="message" value="My Message">
|
||||
<br/><input type="button" onclick="sendMessage();" value="Send Message">
|
||||
|
@ -48,7 +48,7 @@ function show_file_dialog(element, test) {
|
||||
window.addEventListener('load', setup, false);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<body bgcolor="white">
|
||||
<form>
|
||||
Click a button to show the associated dialog type.
|
||||
<br/><input type="button" onclick="show_alert();" value="Show Alert">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
<body bgcolor="white">
|
||||
<p id="instructions">Select some portion of the below page content and click the "Describe Selection" button. The selected region will then be described below.</p>
|
||||
<p id="p1">This is p1</p>
|
||||
<p id="p2">This is p2</p>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
<body bgcolor="white">
|
||||
<script language="JavaScript">
|
||||
var val = window.localStorage.getItem('val');
|
||||
function addLine() {
|
||||
|
@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>Other Tests</title>
|
||||
</head>
|
||||
<body>
|
||||
<body bgcolor="white">
|
||||
<h3>Various other internal and external tests.</h3>
|
||||
<ul>
|
||||
<li><a href="http://mudcu.be/labs/JS1k/BreathingGalaxies.html">Accelerated 2D Canvas</a></li>
|
||||
|
@ -6,7 +6,7 @@
|
||||
body { font-family: Tahoma, Serif; font-size: 9pt; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<body bgcolor="white">
|
||||
<h1>Performance Tests</h1>
|
||||
<input type="button" value="Run Tests" onClick="run();" id="run"/> Filter: <input type="text" size="50" id="filters"/>
|
||||
<div><span id="statusBox"></span> <progress id="progressBox" value="0" style="display:none"></progress></div>
|
||||
|
@ -38,7 +38,7 @@
|
||||
.hide { display: none; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<body bgcolor="white">
|
||||
<h1>Performance Tests (2)</h1>
|
||||
|
||||
<form id="sForm" onsubmit="runTestSuite();return false">
|
||||
|
@ -32,7 +32,7 @@ function position() {
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<body bgcolor="white">
|
||||
<form>
|
||||
Click a button to perform the associated window action.
|
||||
<br/><input type="button" onclick="minimize();" value="Minimize">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
<body bgcolor="white">
|
||||
<script language="JavaScript">
|
||||
function execXMLHttpRequest()
|
||||
{
|
||||
|
@ -41,7 +41,8 @@ class ClientSchemeHandler : public CefResourceHandler {
|
||||
std::string url = request->GetURL();
|
||||
if (strstr(url.c_str(), "handler.html") != NULL) {
|
||||
// Build the response html
|
||||
data_ = "<html><head><title>Client Scheme Handler</title></head><body>"
|
||||
data_ = "<html><head><title>Client Scheme Handler</title></head>"
|
||||
"<body bgcolor=\"white\">"
|
||||
"This contents of this page page are served by the "
|
||||
"ClientSchemeHandler class handling the client:// protocol."
|
||||
"<br/>You should see an image:"
|
||||
|
Loading…
x
Reference in New Issue
Block a user