Fix style issues from commit de1bd28

This commit is contained in:
Marshall Greenblatt 2018-02-12 18:13:23 -05:00
parent de1bd286f8
commit c3f2c2e91c
3 changed files with 12 additions and 18 deletions

View File

@ -990,8 +990,8 @@ class FrameNavExpectationsBrowserTestSingleNav
V_DECLARE(); V_DECLARE();
// When browser-side navigation is enabled this method will be called // When browser-side navigation is enabled this method will be called
// before the frame is created. // before the frame is created.
V_EXPECT_TRUE(VerifySingleBrowserFrames( V_EXPECT_TRUE(
browser, frame, false, std::string())); VerifySingleBrowserFrames(browser, frame, false, std::string()));
V_EXPECT_TRUE(parent::OnBeforeBrowse(browser, frame, url)); V_EXPECT_TRUE(parent::OnBeforeBrowse(browser, frame, url));
V_RETURN(); V_RETURN();
} }
@ -1001,8 +1001,8 @@ class FrameNavExpectationsBrowserTestSingleNav
V_DECLARE(); V_DECLARE();
// When browser-side navigation is enabled this method will be called // When browser-side navigation is enabled this method will be called
// before the frame is created. // before the frame is created.
V_EXPECT_TRUE(VerifySingleBrowserFrames( V_EXPECT_TRUE(
browser, frame, false, std::string())); VerifySingleBrowserFrames(browser, frame, false, std::string()));
V_EXPECT_TRUE(parent::GetResourceHandler(browser, frame)); V_EXPECT_TRUE(parent::GetResourceHandler(browser, frame));
V_RETURN(); V_RETURN();
} }
@ -1504,8 +1504,7 @@ class FrameNavExpectationsBrowserTestMultiNav
// When browser-side navigation is enabled this method will be called // When browser-side navigation is enabled this method will be called
// before the frame is created for the first navigation. // before the frame is created for the first navigation.
V_EXPECT_TRUE(VerifySingleBrowserFrames( V_EXPECT_TRUE(VerifySingleBrowserFrames(
browser, frame, nav() == 0 ? false : true, browser, frame, nav() == 0 ? false : true, expected_url));
expected_url));
V_EXPECT_TRUE(parent::OnBeforeBrowse(browser, frame, url)); V_EXPECT_TRUE(parent::OnBeforeBrowse(browser, frame, url));
V_RETURN(); V_RETURN();
} }
@ -1519,8 +1518,7 @@ class FrameNavExpectationsBrowserTestMultiNav
// When browser-side navigation is enabled this method will be called // When browser-side navigation is enabled this method will be called
// before the frame is created for the first navigation. // before the frame is created for the first navigation.
V_EXPECT_TRUE(VerifySingleBrowserFrames( V_EXPECT_TRUE(VerifySingleBrowserFrames(
browser, frame, nav() == 0 ? false : true, browser, frame, nav() == 0 ? false : true, expected_url));
expected_url));
V_EXPECT_TRUE(parent::GetResourceHandler(browser, frame)); V_EXPECT_TRUE(parent::GetResourceHandler(browser, frame));
V_RETURN(); V_RETURN();
} }

View File

@ -3252,9 +3252,8 @@ class CancelAfterNavTestHandler : public TestHandler {
got_get_resource_handler_.yes(); got_get_resource_handler_.yes();
// The required delay is longer when browser-side navigation is enabled. // The required delay is longer when browser-side navigation is enabled.
CefPostDelayedTask(TID_UI, CefPostDelayedTask(
base::Bind(&CancelAfterNavTestHandler::CancelLoad, this), TID_UI, base::Bind(&CancelAfterNavTestHandler::CancelLoad, this), 1000);
1000);
return new StalledSchemeHandler(); return new StalledSchemeHandler();
} }

View File

@ -313,7 +313,7 @@ const char kTypeTestOrigin[] = "http://tests-requesttt.com/";
static struct TypeExpected { static struct TypeExpected {
const char* file; const char* file;
bool navigation; // True if this expectation represents a navigation. bool navigation; // True if this expectation represents a navigation.
cef_transition_type_t transition_type; cef_transition_type_t transition_type;
cef_resource_type_t resource_type; cef_resource_type_t resource_type;
int expected_count; int expected_count;
@ -342,8 +342,7 @@ static struct TypeExpected {
class TypeExpectations { class TypeExpectations {
public: public:
explicit TypeExpectations(bool navigation) explicit TypeExpectations(bool navigation) : navigation_(navigation) {
: navigation_(navigation) {
// Build the map of relevant requests. // Build the map of relevant requests.
for (int i = 0; for (int i = 0;
i < static_cast<int>(sizeof(g_type_expected) / sizeof(TypeExpected)); i < static_cast<int>(sizeof(g_type_expected) / sizeof(TypeExpected));
@ -378,8 +377,7 @@ class TypeExpectations {
const int actual_count = ++it->second; const int actual_count = ++it->second;
const int expected_count = g_type_expected[index].expected_count; const int expected_count = g_type_expected[index].expected_count;
EXPECT_LE(actual_count, expected_count) EXPECT_LE(actual_count, expected_count)
<< "File: " << file.c_str() << "File: " << file.c_str() << "; Navigation: " << navigation_
<< "; Navigation: " << navigation_
<< "; Transition Type: " << transition_type << "; Transition Type: " << transition_type
<< "; Resource Type: " << resource_type; << "; Resource Type: " << resource_type;
@ -513,8 +511,7 @@ class TypeTestHandler : public TestHandler {
get_expectations_.IsDone(false)) { get_expectations_.IsDone(false)) {
completed_browser_side_ = true; completed_browser_side_ = true;
// Destroy the test on the UI thread. // Destroy the test on the UI thread.
CefPostTask(TID_UI, CefPostTask(TID_UI, base::Bind(&TypeTestHandler::DestroyTest, this));
base::Bind(&TypeTestHandler::DestroyTest, this));
} }
return TestHandler::GetResourceHandler(browser, frame, request); return TestHandler::GetResourceHandler(browser, frame, request);