From c104c17c8adeec50388831fc0fa92a6d70f751e1 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 3 Sep 2013 22:00:50 +0000 Subject: [PATCH] Merge revision 1428 changes: - 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/branches/1547@1429 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- tests/cefclient/cefclient.cpp | 9 +- tests/cefclient/client_handler.cpp | 11 +- tests/cefclient/res/binding.html | 2 +- tests/cefclient/res/dialogs.html | 2 +- tests/cefclient/res/domaccess.html | 2 +- tests/cefclient/res/localstorage.html | 2 +- tests/cefclient/res/other_tests.html | 64 +- tests/cefclient/res/performance.html | 2 +- tests/cefclient/res/performance2.html | 884 ++++++++++++------------ tests/cefclient/res/window.html | 2 +- tests/cefclient/res/xmlhttprequest.html | 2 +- tests/cefclient/scheme_test.cpp | 3 +- 12 files changed, 496 insertions(+), 489 deletions(-) diff --git a/tests/cefclient/cefclient.cpp b/tests/cefclient/cefclient.cpp index e41e993c0..abd33dc34 100644 --- a/tests/cefclient/cefclient.cpp +++ b/tests/cefclient/cefclient.cpp @@ -84,7 +84,8 @@ void RunGetSourceTest(CefRefPtr browser) { std::string source = StringReplace(string, "<", "<"); source = StringReplace(source, ">", ">"); std::stringstream ss; - ss << "Source:
" << source << "
"; + ss << "Source:
" << source <<
+            "
"; browser_->GetMainFrame()->LoadString(ss.str(), "http://tests/getsource"); } private: @@ -103,7 +104,8 @@ void RunGetTextTest(CefRefPtr browser) { std::string text = StringReplace(string, "<", "<"); text = StringReplace(text, ">", ">"); std::stringstream ss; - ss << "Text:
" << text << "
"; + ss << "Text:
" << text <<
+            "
"; browser_->GetMainFrame()->LoadString(ss.str(), "http://tests/gettext"); } private: @@ -150,7 +152,8 @@ void RunPluginInfoTest(CefRefPtr browser) { public: explicit Visitor(CefRefPtr browser) : browser_(browser) { - html_ = "Plugin Info Test" + html_ = "Plugin Info Test" + "" "\nInstalled plugins:"; } ~Visitor() { diff --git a/tests/cefclient/client_handler.cpp b/tests/cefclient/client_handler.cpp index e9f8f067b..8e66bf886 100644 --- a/tests/cefclient/client_handler.cpp +++ b/tests/cefclient/client_handler.cpp @@ -438,7 +438,8 @@ void ClientHandler::OnLoadError(CefRefPtr browser, // Display a load error message. std::stringstream ss; - ss << "

Failed to load URL " << std::string(failedUrl) << + ss << "" + "

Failed to load URL " << std::string(failedUrl) << " with error " << std::string(errorText) << " (" << errorCode << ").

"; frame->LoadString(ss.str(), failedUrl); @@ -469,12 +470,14 @@ CefRefPtr ClientHandler::GetResourceHandler( // Show the request contents. std::string dump; DumpRequestContents(request, dump); + std::string str = "
" + dump +
+                          "
"; CefRefPtr stream = CefStreamReader::CreateForData( - static_cast(const_cast(dump.c_str())), - dump.size()); + static_cast(const_cast(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 stream = diff --git a/tests/cefclient/res/binding.html b/tests/cefclient/res/binding.html index edb1f4a00..f32db3924 100644 --- a/tests/cefclient/res/binding.html +++ b/tests/cefclient/res/binding.html @@ -16,7 +16,7 @@ function sendMessage() { - +
Message:
diff --git a/tests/cefclient/res/dialogs.html b/tests/cefclient/res/dialogs.html index c31dff165..b815a5e42 100644 --- a/tests/cefclient/res/dialogs.html +++ b/tests/cefclient/res/dialogs.html @@ -48,7 +48,7 @@ function show_file_dialog(element, test) { window.addEventListener('load', setup, false); - + Click a button to show the associated dialog type.
diff --git a/tests/cefclient/res/domaccess.html b/tests/cefclient/res/domaccess.html index 68ff69647..87bd23e38 100644 --- a/tests/cefclient/res/domaccess.html +++ b/tests/cefclient/res/domaccess.html @@ -1,5 +1,5 @@ - +

Select some portion of the below page content and click the "Describe Selection" button. The selected region will then be described below.

This is p1

This is p2

diff --git a/tests/cefclient/res/localstorage.html b/tests/cefclient/res/localstorage.html index a794305b7..87c6e68cb 100644 --- a/tests/cefclient/res/localstorage.html +++ b/tests/cefclient/res/localstorage.html @@ -1,5 +1,5 @@ - + - - - + + + + Performance Tests (2) + + + +

Performance Tests (2)

+ + + + + + + + + + + + + + + + + + + + + +
Settings:
Iterations:
Samples:
Mode:Asynchronous + Synchronous +
+
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + +
EnabledNameSamples x IterationsMin, msAvg, msMax, msAverage calls/secMeasuring InacurracyMemory, MBMemory delta, MBDescription
+
+ + + + + diff --git a/tests/cefclient/res/window.html b/tests/cefclient/res/window.html index c901cb620..4521ccb5f 100644 --- a/tests/cefclient/res/window.html +++ b/tests/cefclient/res/window.html @@ -32,7 +32,7 @@ function position() { } - +
Click a button to perform the associated window action.
diff --git a/tests/cefclient/res/xmlhttprequest.html b/tests/cefclient/res/xmlhttprequest.html index 638c63c82..051f81486 100644 --- a/tests/cefclient/res/xmlhttprequest.html +++ b/tests/cefclient/res/xmlhttprequest.html @@ -1,5 +1,5 @@ - +