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

Unified Diff: chrome/test/webdriver/session.cc

Issue 3915004: Convert LOG(INFO) to VLOG(1) - chrome/test/. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 2 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 | « chrome/test/webdriver/server.cc ('k') | chrome/test/webdriver/session_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/session.cc
===================================================================
--- chrome/test/webdriver/session.cc (revision 63075)
+++ chrome/test/webdriver/session.cc (working copy)
@@ -69,8 +69,8 @@
// Create a temp directory for the new profile.
if (!CreateTemporaryProfileDirectory()) {
LOG(ERROR) << "Could not make a temp profile directory, "
- << tmp_profile_dir() << std::endl
- << "Need to quit, the issue must be fixed";
+ << tmp_profile_dir()
+ << "\nNeed to quit, the issue must be fixed";
exit(-1);
}
@@ -163,7 +163,7 @@
return false;
}
#endif
- LOG(INFO) << "Using temporary profile directory: " << tmp_profile_dir_;
+ VLOG(1) << "Using temporary profile directory: " << tmp_profile_dir_;
return true;
}
@@ -174,10 +174,8 @@
#elif OS_WIN
FilePath del_dir = FilePath(ASCIIToWide(tmp_profile_dir()));
#endif
- if (file_util::PathExists(del_dir) && !file_util::Delete(del_dir, true)) {
- LOG(ERROR) << "Could not clean up temp directory: "
- << tmp_profile_dir() << std::endl;
- }
+ if (file_util::PathExists(del_dir) && !file_util::Delete(del_dir, true))
+ LOG(ERROR) << "Could not clean up temp directory: " << tmp_profile_dir();
}
ErrorCode Session::ExecuteScript(const std::wstring& script,
@@ -188,21 +186,17 @@
/*pretty_print=*/false,
&args_as_json);
- std::wstring jscript = L"window.domAutomationController.send(";
- jscript.append(L"(function(){")
- // Every injected script is fed through the executeScript atom. This atom
- // will catch any errors that are thrown and convert them to the
- // appropriate JSON structure.
- .append(build_atom(EXECUTE_SCRIPT, sizeof EXECUTE_SCRIPT))
- .append(L"var result = executeScript(function(){")
- .append(script)
- .append(L"},")
- .append(ASCIIToWide(args_as_json))
- .append(L");return JSON.stringify(result);})());");
+ std::wstring jscript = L"window.domAutomationController.send((function(){" +
+ // Every injected script is fed through the executeScript atom. This atom
+ // will catch any errors that are thrown and convert them to the
+ // appropriate JSON structure.
+ build_atom(EXECUTE_SCRIPT, sizeof EXECUTE_SCRIPT) +
+ L"var result = executeScript(function(){" + script + L"}," +
+ ASCIIToWide(args_as_json) + L");return JSON.stringify(result);})());";
// Should we also log the script that's being executed? It could be several KB
// in size and will add lots of noise to the logs.
- LOG(INFO) << "Executing script in frame: " << current_frame_xpath_;
+ VLOG(1) << "Executing script in frame: " << current_frame_xpath_;
std::wstring result;
scoped_refptr<TabProxy> tab = ActiveTab();
@@ -212,7 +206,7 @@
return kUnknownError;
}
- LOG(INFO) << "...script result: " << result;
+ VLOG(1) << "...script result: " << result;
std::string temp = WideToASCII(result);
scoped_ptr<Value> r(base::JSONReader::ReadAndReturnError(
temp, true, NULL, NULL));
@@ -225,9 +219,8 @@
if (r->GetType() != Value::TYPE_DICTIONARY) {
std::ostringstream stream;
stream << "Internal script execution error: script result must be a "
- << print_valuetype(Value::TYPE_DICTIONARY)
- << ", but was "
- << print_valuetype(r->GetType()) << ": " << result;
+ << print_valuetype(Value::TYPE_DICTIONARY) << ", but was "
+ << print_valuetype(r->GetType()) << ": " << result;
*value = Value::CreateStringValue(stream.str());
return kUnknownError;
}
« no previous file with comments | « chrome/test/webdriver/server.cc ('k') | chrome/test/webdriver/session_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698