Make CEF compliant with Google/Chromium style (issue #473).

- Add a new check_style tool based on Google's cpplint that can be used to verify compliance of pending changes and specific files/directories.
- Update existing CEF source code to be compliant with the style requirements.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@463 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-01-09 23:46:23 +00:00
parent 9cc61f448b
commit 1073577d03
558 changed files with 9002 additions and 10977 deletions

View File

@@ -7,13 +7,12 @@
namespace {
void VerifyCommandLine(CefRefPtr<CefCommandLine> command_line)
{
void VerifyCommandLine(CefRefPtr<CefCommandLine> command_line) {
std::string program = command_line->GetProgram();
EXPECT_EQ("test.exe", program);
EXPECT_TRUE(command_line->HasSwitches());
EXPECT_TRUE(command_line->HasSwitch("switch1"));
std::string switch1 = command_line->GetSwitchValue("switch1");
EXPECT_EQ("", switch1);
@@ -60,7 +59,7 @@ void VerifyCommandLine(CefRefPtr<CefCommandLine> command_line)
EXPECT_TRUE(has4);
EXPECT_TRUE(command_line->HasArguments());
CefCommandLine::ArgumentList args;
command_line->GetArguments(args);
EXPECT_EQ((size_t)2, args.size());
@@ -70,11 +69,10 @@ void VerifyCommandLine(CefRefPtr<CefCommandLine> command_line)
EXPECT_EQ("arg 2", arg1);
}
}
} // namespace
// Test creating a command line from argc/argv or string.
TEST(CommandLineTest, Init)
{
TEST(CommandLineTest, Init) {
CefRefPtr<CefCommandLine> command_line = CefCommandLine::CreateCommandLine();
EXPECT_TRUE(command_line.get() != NULL);
@@ -98,8 +96,7 @@ TEST(CommandLineTest, Init)
}
// Test creating a command line using set and append methods.
TEST(CommandLineTest, Manual)
{
TEST(CommandLineTest, Manual) {
CefRefPtr<CefCommandLine> command_line = CefCommandLine::CreateCommandLine();
EXPECT_TRUE(command_line.get() != NULL);