Cleanup: Simplify some checks in tests.
Review URL: https://codereview.chromium.org/1123703005
Cr-Commit-Position: refs/heads/master@{#329200}
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index 1d731b3..e4c3d66 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -293,7 +293,7 @@
ui::Accelerator release(press);
release.set_type(ui::ET_KEY_RELEASED);
ExitWarningHandler* ewh = GetController()->GetExitWarningHandlerForTest();
- ASSERT_TRUE(!!ewh);
+ ASSERT_TRUE(ewh);
StubForTest(ewh);
EXPECT_TRUE(is_idle(ewh));
EXPECT_FALSE(is_ui_shown(ewh));
@@ -315,7 +315,7 @@
ui::Accelerator release(press);
release.set_type(ui::ET_KEY_RELEASED);
ExitWarningHandler* ewh = GetController()->GetExitWarningHandlerForTest();
- ASSERT_TRUE(!!ewh);
+ ASSERT_TRUE(ewh);
StubForTest(ewh);
EXPECT_TRUE(is_idle(ewh));
EXPECT_FALSE(is_ui_shown(ewh));
@@ -332,7 +332,7 @@
// Shutdown ash with exit warning bubble open should not crash.
TEST_F(AcceleratorControllerTest, LingeringExitWarningBubble) {
ExitWarningHandler* ewh = GetController()->GetExitWarningHandlerForTest();
- ASSERT_TRUE(!!ewh);
+ ASSERT_TRUE(ewh);
StubForTest(ewh);
// Trigger once to show the bubble.
@@ -921,7 +921,7 @@
#if !defined(OS_WIN)
// Exit
ExitWarningHandler* ewh = GetController()->GetExitWarningHandlerForTest();
- ASSERT_TRUE(!!ewh);
+ ASSERT_TRUE(ewh);
StubForTest(ewh);
EXPECT_TRUE(is_idle(ewh));
EXPECT_FALSE(is_ui_shown(ewh));
diff --git a/ash/desktop_background/desktop_background_controller_unittest.cc b/ash/desktop_background/desktop_background_controller_unittest.cc
index 5b97047..ecd1c3a 100644
--- a/ash/desktop_background/desktop_background_controller_unittest.cc
+++ b/ash/desktop_background/desktop_background_controller_unittest.cc
@@ -111,7 +111,7 @@
Shell::GetPrimaryRootWindowController()
->animating_wallpaper_controller()
->GetController(false);
- EXPECT_TRUE(!!controller);
+ EXPECT_TRUE(controller);
ASSERT_NO_FATAL_FAILURE(RunAnimationForWidget(controller->widget()));
}
diff --git a/ash/drag_drop/drag_drop_controller_unittest.cc b/ash/drag_drop/drag_drop_controller_unittest.cc
index 6ee3a59..bb3cc97 100644
--- a/ash/drag_drop/drag_drop_controller_unittest.cc
+++ b/ash/drag_drop/drag_drop_controller_unittest.cc
@@ -820,7 +820,7 @@
}
// Make sure the capture window won't handle mouse events.
aura::Window* capture_window = drag_drop_tracker()->capture_window();
- ASSERT_TRUE(!!capture_window);
+ ASSERT_TRUE(capture_window);
EXPECT_EQ("0x0", capture_window->bounds().size().ToString());
EXPECT_EQ(NULL,
capture_window->GetEventHandlerForPoint(gfx::Point()));
@@ -972,7 +972,7 @@
gfx::Point window_location_on_destroying_;
};
-}
+} // namespace
// Verifies the drag image moves back to the position where drag is started
// across displays when drag is cancelled.
@@ -1110,4 +1110,4 @@
}
} // namespace test
-} // namespace aura
+} // namespace ash
diff --git a/base/test/trace_event_analyzer_unittest.cc b/base/test/trace_event_analyzer_unittest.cc
index 4bdb941..cf85fd0 100644
--- a/base/test/trace_event_analyzer_unittest.cc
+++ b/base/test/trace_event_analyzer_unittest.cc
@@ -225,7 +225,7 @@
scoped_ptr<TraceAnalyzer>
analyzer(TraceAnalyzer::Create(output_.json_output));
- ASSERT_TRUE(!!analyzer.get());
+ ASSERT_TRUE(analyzer);
analyzer->SetIgnoreMetadataEvents(true);
TraceEventVector found;
diff --git a/base/trace_event/trace_event_unittest.cc b/base/trace_event/trace_event_unittest.cc
index 17953e76..d0322430 100644
--- a/base/trace_event/trace_event_unittest.cc
+++ b/base/trace_event/trace_event_unittest.cc
@@ -1527,7 +1527,7 @@
// See if this thread name is one of the threads we just created
for (int j = 0; j < kNumThreads; j++) {
- if(static_cast<int>(thread_ids[j]) != tmp_int)
+ if (static_cast<int>(thread_ids[j]) != tmp_int)
continue;
std::string expected_name = StringPrintf("Thread %d", j);
@@ -2214,7 +2214,7 @@
}
void TearDown() override {
TraceLog::GetInstance()->SetDisabled();
- ASSERT_TRUE(!!s_instance);
+ ASSERT_TRUE(s_instance);
s_instance = NULL;
TraceEventTestFixture::TearDown();
}
diff --git a/cc/resources/picture_unittest.cc b/cc/resources/picture_unittest.cc
index 488d7bf..a7d8618 100644
--- a/cc/resources/picture_unittest.cc
+++ b/cc/resources/picture_unittest.cc
@@ -50,7 +50,7 @@
// Reconstruct the picture.
scoped_refptr<Picture> one_rect_picture_check =
Picture::CreateFromValue(serialized_one_rect.get());
- EXPECT_TRUE(!!one_rect_picture_check.get());
+ EXPECT_TRUE(one_rect_picture_check);
// Check for equivalence.
unsigned char one_rect_buffer[4 * 100 * 100] = {0};
@@ -73,7 +73,7 @@
// Reconstruct the picture.
scoped_refptr<Picture> two_rect_picture_check =
Picture::CreateFromValue(serialized_two_rect.get());
- EXPECT_TRUE(!!two_rect_picture_check.get());
+ EXPECT_TRUE(two_rect_picture_check);
// Check for equivalence.
unsigned char two_rect_buffer[4 * 100 * 100] = {0};
@@ -125,7 +125,7 @@
// Reconstruct the picture.
scoped_refptr<Picture> one_rect_picture_check =
Picture::CreateFromSkpValue(skp_value);
- EXPECT_TRUE(!!one_rect_picture_check.get());
+ EXPECT_TRUE(one_rect_picture_check);
EXPECT_EQ(100, one_rect_picture_check->LayerRect().width());
EXPECT_EQ(200, one_rect_picture_check->LayerRect().height());
diff --git a/cc/resources/resource_provider_unittest.cc b/cc/resources/resource_provider_unittest.cc
index 6cebc56..3ca1ab4 100644
--- a/cc/resources/resource_provider_unittest.cc
+++ b/cc/resources/resource_provider_unittest.cc
@@ -665,7 +665,7 @@
{
ResourceProvider::ScopedWriteLockGpuMemoryBuffer lock(
child_resource_provider_.get(), id3);
- EXPECT_TRUE(!!lock.GetGpuMemoryBuffer());
+ EXPECT_TRUE(lock.GetGpuMemoryBuffer());
}
GLuint external_texture_id = child_context_->createExternalTexture();
@@ -921,7 +921,7 @@
// point.
ResourceProvider::ScopedWriteLockGpuMemoryBuffer lock(
child_resource_provider_.get(), id2);
- EXPECT_TRUE(!!lock.GetGpuMemoryBuffer());
+ EXPECT_TRUE(lock.GetGpuMemoryBuffer());
}
GLuint external_texture_id = child_context_->createExternalTexture();
@@ -3544,7 +3544,7 @@
{
ResourceProvider::ScopedWriteLockGpuMemoryBuffer lock(
resource_provider.get(), id);
- EXPECT_TRUE(!!lock.GetGpuMemoryBuffer());
+ EXPECT_TRUE(lock.GetGpuMemoryBuffer());
}
EXPECT_CALL(*context, NextTextureId())
@@ -3565,7 +3565,7 @@
{
ResourceProvider::ScopedWriteLockGpuMemoryBuffer lock(
resource_provider.get(), id);
- EXPECT_TRUE(!!lock.GetGpuMemoryBuffer());
+ EXPECT_TRUE(lock.GetGpuMemoryBuffer());
}
EXPECT_CALL(*context, bindTexture(GL_TEXTURE_2D, kTextureId)).Times(1)
@@ -3631,7 +3631,7 @@
{
ResourceProvider::ScopedWriteLockGpuMemoryBuffer lock(
resource_provider.get(), source_id);
- EXPECT_TRUE(!!lock.GetGpuMemoryBuffer());
+ EXPECT_TRUE(lock.GetGpuMemoryBuffer());
}
Mock::VerifyAndClearExpectations(context);
diff --git a/cc/surfaces/surface_unittest.cc b/cc/surfaces/surface_unittest.cc
index 7f2de361..42fd55f 100644
--- a/cc/surfaces/surface_unittest.cc
+++ b/cc/surfaces/surface_unittest.cc
@@ -18,7 +18,7 @@
SurfaceId surface_id(6);
{
factory.Create(surface_id);
- EXPECT_TRUE(!!manager.GetSurfaceForId(surface_id));
+ EXPECT_TRUE(manager.GetSurfaceForId(surface_id));
factory.Destroy(surface_id);
}
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index d8686e6..cc239da 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -2154,7 +2154,7 @@
EXPECT_TRUE(layer2->did_draw_called());
EXPECT_NE(root->render_surface(), layer1->render_surface());
- EXPECT_TRUE(!!layer1->render_surface());
+ EXPECT_TRUE(layer1->render_surface());
}
class MissingTextureAnimatingLayer : public DidDrawCheckLayer {
@@ -2630,13 +2630,13 @@
gfx::Size(10, 50), gfx::Size(10, 50), gfx::Size(10, 100));
DrawFrame();
- LayerImpl *inner_scroll =
+ LayerImpl* inner_scroll =
host_impl_->active_tree()->InnerViewportScrollLayer();
- LayerImpl *inner_container =
+ LayerImpl* inner_container =
host_impl_->active_tree()->InnerViewportContainerLayer();
- LayerImpl *outer_scroll =
+ LayerImpl* outer_scroll =
host_impl_->active_tree()->OuterViewportScrollLayer();
- LayerImpl *outer_container =
+ LayerImpl* outer_container =
host_impl_->active_tree()->OuterViewportContainerLayer();
// Need SetDrawsContent so ScrollBegin's hit test finds an actual layer.
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 8acc7db..51ea3d9 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -4453,7 +4453,7 @@
LayerInvalidateCausesDraw() : num_commits_(0), num_draws_(0) {}
void BeginTest() override {
- ASSERT_TRUE(!!invalidate_layer_.get())
+ ASSERT_TRUE(invalidate_layer_)
<< "Derived tests must set this in SetupTree";
// One initial commit.
diff --git a/chrome/browser/apps/guest_view/web_view_browsertest.cc b/chrome/browser/apps/guest_view/web_view_browsertest.cc
index 3b3d7bf..21a9e13 100644
--- a/chrome/browser/apps/guest_view/web_view_browsertest.cc
+++ b/chrome/browser/apps/guest_view/web_view_browsertest.cc
@@ -135,7 +135,7 @@
// context menu was shown.
class ContextMenuCallCountObserver {
public:
- ContextMenuCallCountObserver ()
+ ContextMenuCallCountObserver()
: num_times_shown_(0),
menu_observer_(chrome::NOTIFICATION_RENDER_VIEW_CONTEXT_MENU_SHOWN,
base::Bind(&ContextMenuCallCountObserver::OnMenuShown,
@@ -2778,7 +2778,7 @@
IN_PROC_BROWSER_TEST_F(WebViewTest, AllowTransparencyAndAllowScalingPropagate) {
LoadAppWithGuest("web_view/simple");
- ASSERT_TRUE(!!GetGuestWebContents());
+ ASSERT_TRUE(GetGuestWebContents());
extensions::WebViewGuest* guest =
extensions::WebViewGuest::FromWebContents(GetGuestWebContents());
ASSERT_TRUE(guest->allow_transparency());
diff --git a/chrome/browser/spellchecker/spelling_service_client_unittest.cc b/chrome/browser/spellchecker/spelling_service_client_unittest.cc
index 09f5cce..6c0d617 100644
--- a/chrome/browser/spellchecker/spelling_service_client_unittest.cc
+++ b/chrome/browser/spellchecker/spelling_service_client_unittest.cc
@@ -57,7 +57,7 @@
scoped_ptr<base::DictionaryValue> value(static_cast<base::DictionaryValue*>(
base::JSONReader::Read(upload_content,
base::JSON_ALLOW_TRAILING_COMMAS)));
- ASSERT_TRUE(!!value.get());
+ ASSERT_TRUE(value.get());
std::string method;
EXPECT_TRUE(value->GetString("method", &method));
EXPECT_EQ("spelling.check", method);
@@ -142,7 +142,7 @@
}
void CallOnURLFetchComplete() {
- ASSERT_TRUE(!!fetcher_);
+ ASSERT_TRUE(fetcher_);
fetcher_->delegate()->OnURLFetchComplete(fetcher_);
fetcher_ = NULL;
}
diff --git a/chrome/browser/sync/glue/local_device_info_provider_unittest.cc b/chrome/browser/sync/glue/local_device_info_provider_unittest.cc
index 48f154c1..d4402648 100644
--- a/chrome/browser/sync/glue/local_device_info_provider_unittest.cc
+++ b/chrome/browser/sync/glue/local_device_info_provider_unittest.cc
@@ -72,7 +72,7 @@
InitializeProvider();
const DeviceInfo* local_device_info = provider_->GetLocalDeviceInfo();
- EXPECT_TRUE(!!local_device_info);
+ EXPECT_TRUE(local_device_info);
EXPECT_EQ(std::string(kLocalDeviceGuid), local_device_info->guid());
EXPECT_EQ(std::string(kSigninScopedDeviceId),
local_device_info->signin_scoped_device_id());
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
index 3932837..4dbffce 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
@@ -1129,7 +1129,7 @@
EXPECT_CALL(*controller()->GetView(), ModelChanged());
ui::MenuModel* shipping_model =
controller()->MenuModelForSection(SECTION_SHIPPING);
- ASSERT_TRUE(!!shipping_model);
+ ASSERT_TRUE(shipping_model);
EXPECT_EQ(3, shipping_model->GetItemCount());
// Set up some variant data.
diff --git a/cloud_print/gcp20/prototype/printer_unittest.cc b/cloud_print/gcp20/prototype/printer_unittest.cc
index 04205ce..5c0acac 100644
--- a/cloud_print/gcp20/prototype/printer_unittest.cc
+++ b/cloud_print/gcp20/prototype/printer_unittest.cc
@@ -17,7 +17,7 @@
scoped_ptr<base::Value> value(
base::JSONReader::ReadAndReturnError(printer.GetRawCdd(), 0,
&error_code, &error_msg));
- ASSERT_TRUE(!!value) << error_msg;
+ ASSERT_TRUE(value) << error_msg;
base::DictionaryValue* dictionary_value = NULL;
EXPECT_TRUE(value->GetAsDictionary(&dictionary_value)) << "Not a dictionary";
diff --git a/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc b/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
index 8299325..ff913eca 100644
--- a/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
+++ b/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
@@ -318,7 +318,7 @@
std::istringstream in(delegate_->data_received());
std::string line;
- EXPECT_TRUE(!!std::getline(in, line));
+ EXPECT_TRUE(std::getline(in, line));
#if defined(OS_WIN)
EXPECT_EQ("<script>start(\"foo\\\\bar\");</script>", line);
@@ -326,10 +326,10 @@
EXPECT_EQ("<script>start(\"/foo/bar\");</script>", line);
#endif
- EXPECT_TRUE(!!std::getline(in, line));
+ EXPECT_TRUE(std::getline(in, line));
VerifyListingEntry(line, "hoge", "hoge", false, 10);
- EXPECT_TRUE(!!std::getline(in, line));
+ EXPECT_TRUE(std::getline(in, line));
VerifyListingEntry(line, "baz", "baz", true, 0);
EXPECT_FALSE(!!std::getline(in, line));
}
@@ -378,7 +378,7 @@
std::istringstream in(delegate_->data_received());
std::string line;
- EXPECT_TRUE(!!std::getline(in, line));
+ EXPECT_TRUE(std::getline(in, line));
EXPECT_FALSE(!!std::getline(in, line));
TestRequestWithContext(CreateFileSystemURL("foo"),
@@ -405,7 +405,7 @@
std::istringstream in(delegate_->data_received());
std::string line;
- EXPECT_TRUE(!!std::getline(in, line)); // |line| contains the temp dir path.
+ EXPECT_TRUE(std::getline(in, line)); // |line| contains the temp dir path.
// Result order is not guaranteed, so sort the results.
std::vector<std::string> listing_entries;
@@ -450,5 +450,5 @@
kValidExternalMountPoint));
}
-} // namespace (anonymous)
+} // namespace
} // namespace content
diff --git a/media/audio/audio_output_controller_unittest.cc b/media/audio/audio_output_controller_unittest.cc
index 6e98f0a..3e9229da 100644
--- a/media/audio/audio_output_controller_unittest.cc
+++ b/media/audio/audio_output_controller_unittest.cc
@@ -188,7 +188,7 @@
void ReadDivertedAudioData() {
scoped_ptr<AudioBus> dest = AudioBus::Create(params_);
- ASSERT_TRUE(!!mock_stream_.callback());
+ ASSERT_TRUE(mock_stream_.callback());
const int frames_read =
mock_stream_.callback()->OnMoreData(dest.get(), 0);
EXPECT_LT(0, frames_read);
diff --git a/media/audio/virtual_audio_input_stream_unittest.cc b/media/audio/virtual_audio_input_stream_unittest.cc
index 3ff07b8f..c960f36 100644
--- a/media/audio/virtual_audio_input_stream_unittest.cc
+++ b/media/audio/virtual_audio_input_stream_unittest.cc
@@ -116,12 +116,12 @@
void Start() {
EXPECT_CALL(input_callback_, OnData(_, NotNull(), _, _)).Times(AtLeast(1));
- ASSERT_TRUE(!!stream_);
+ ASSERT_TRUE(stream_);
stream_->Start(&input_callback_);
}
void CreateAndStartOneOutputStream() {
- ASSERT_TRUE(!!stream_);
+ ASSERT_TRUE(stream_);
AudioOutputStream* const output_stream = new VirtualAudioOutputStream(
kParams,
stream_,
@@ -133,12 +133,12 @@
}
void Stop() {
- ASSERT_TRUE(!!stream_);
+ ASSERT_TRUE(stream_);
stream_->Stop();
}
void Close() {
- ASSERT_TRUE(!!stream_);
+ ASSERT_TRUE(stream_);
stream_->Close();
stream_ = NULL;
closed_stream_.Signal();
@@ -163,7 +163,7 @@
void StopAndCloseOneOutputStream() {
ASSERT_TRUE(!output_streams_.empty());
AudioOutputStream* const output_stream = output_streams_.front();
- ASSERT_TRUE(!!output_stream);
+ ASSERT_TRUE(output_stream);
output_streams_.pop_front();
output_stream->Stop();
@@ -173,7 +173,7 @@
void StopFirstOutputStream() {
ASSERT_TRUE(!output_streams_.empty());
AudioOutputStream* const output_stream = output_streams_.front();
- ASSERT_TRUE(!!output_stream);
+ ASSERT_TRUE(output_stream);
output_streams_.pop_front();
output_stream->Stop();
stopped_output_streams_.push_back(output_stream);
diff --git a/media/cast/net/rtp/rtp_parser_unittest.cc b/media/cast/net/rtp/rtp_parser_unittest.cc
index 40822c89..1eca556 100644
--- a/media/cast/net/rtp/rtp_parser_unittest.cc
+++ b/media/cast/net/rtp/rtp_parser_unittest.cc
@@ -56,7 +56,7 @@
EXPECT_EQ(cast_header_.reference_frame_id,
parsed_header.reference_frame_id);
- EXPECT_TRUE(!!payload);
+ EXPECT_TRUE(payload);
EXPECT_NE(static_cast<size_t>(-1), payload_size);
}
diff --git a/media/cast/test/end2end_unittest.cc b/media/cast/test/end2end_unittest.cc
index 5473dc6..15fdf742 100644
--- a/media/cast/test/end2end_unittest.cc
+++ b/media/cast/test/end2end_unittest.cc
@@ -162,7 +162,7 @@
// PacketReceiverCallback.
class LoopBackPacketPipe : public test::PacketPipe {
public:
- LoopBackPacketPipe(const PacketReceiverCallback& packet_receiver)
+ explicit LoopBackPacketPipe(const PacketReceiverCallback& packet_receiver)
: packet_receiver_(packet_receiver) {}
~LoopBackPacketPipe() final {}
@@ -276,7 +276,7 @@
bool is_continuous) {
++num_called_;
- ASSERT_TRUE(!!audio_bus);
+ ASSERT_TRUE(audio_bus);
ASSERT_FALSE(expected_frames_.empty());
const scoped_ptr<ExpectedAudioFrame> expected_audio_frame(
expected_frames_.front());
@@ -306,7 +306,7 @@
}
void CheckCodedAudioFrame(scoped_ptr<EncodedFrame> audio_frame) {
- ASSERT_TRUE(!!audio_frame);
+ ASSERT_TRUE(audio_frame);
ASSERT_FALSE(expected_frames_.empty());
const ExpectedAudioFrame& expected_audio_frame =
*(expected_frames_.front());
@@ -375,7 +375,7 @@
bool is_continuous) {
++num_called_;
- ASSERT_TRUE(!!video_frame.get());
+ ASSERT_TRUE(video_frame.get());
ASSERT_FALSE(expected_frame_.empty());
ExpectedVideoFrame expected_video_frame = expected_frame_.front();
expected_frame_.pop_front();
diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc
index 9622b2f1..6efe2d2 100644
--- a/ui/compositor/layer_unittest.cc
+++ b/ui/compositor/layer_unittest.cc
@@ -216,7 +216,7 @@
// LayerDelegate that paints colors to the layer.
class TestLayerDelegate : public LayerDelegate {
public:
- explicit TestLayerDelegate() { reset(); }
+ TestLayerDelegate() { reset(); }
~TestLayerDelegate() override {}
void AddColor(SkColor color) {
@@ -642,12 +642,12 @@
layer->set_name(name);
scoped_refptr<base::trace_event::ConvertableToTraceFormat> debug_info =
layer->TakeDebugInfo();
- EXPECT_TRUE(!!debug_info.get());
+ EXPECT_TRUE(debug_info.get());
std::string json;
debug_info->AppendAsTraceFormat(&json);
base::JSONReader json_reader;
scoped_ptr<base::Value> debug_info_value(json_reader.ReadToValue(json));
- EXPECT_TRUE(!!debug_info_value);
+ EXPECT_TRUE(debug_info_value);
EXPECT_TRUE(debug_info_value->IsType(base::Value::TYPE_DICTIONARY));
base::DictionaryValue* dictionary = 0;
EXPECT_TRUE(debug_info_value->GetAsDictionary(&dictionary));
diff --git a/ui/events/gesture_detection/gesture_provider_unittest.cc b/ui/events/gesture_detection/gesture_provider_unittest.cc
index 5bd6688..d49efc8 100644
--- a/ui/events/gesture_detection/gesture_provider_unittest.cc
+++ b/ui/events/gesture_detection/gesture_provider_unittest.cc
@@ -868,7 +868,7 @@
// Now move up slowly, mostly vertically but with a (fractional) bit of
// horizontal motion.
- for(int i = 1; i <= 10; i++) {
+ for (int i = 1; i <= 10; i++) {
event = ObtainMotionEvent(event_time + kOneMicrosecond * i,
MotionEvent::ACTION_MOVE,
kFakeCoordX + delta_x * i,
@@ -925,7 +925,7 @@
EXPECT_TRUE(gesture_provider_->IsScrollInProgress());
const GestureEventData* scroll_begin_gesture = GetActiveScrollBeginEvent();
- ASSERT_TRUE(!!scroll_begin_gesture);
+ ASSERT_TRUE(scroll_begin_gesture);
EXPECT_EQ(delta_x, scroll_begin_gesture->details.scroll_x_hint());
EXPECT_EQ(delta_y, scroll_begin_gesture->details.scroll_y_hint());
}
diff --git a/ui/events/gesture_detection/velocity_tracker_unittest.cc b/ui/events/gesture_detection/velocity_tracker_unittest.cc
index 215d93e..564bcd95 100644
--- a/ui/events/gesture_detection/velocity_tracker_unittest.cc
+++ b/ui/events/gesture_detection/velocity_tracker_unittest.cc
@@ -34,7 +34,7 @@
case VelocityTracker::WLSQ2_RECENT: return "WLSQ2_RECENT";
case VelocityTracker::INT1: return "INT1";
case VelocityTracker::INT2: return "INT2";
- };
+ }
NOTREACHED() << "Invalid strategy";
return "";
}
@@ -62,7 +62,7 @@
TimeTicks t0,
TimeDelta t,
size_t samples) {
- EXPECT_TRUE(!!samples);
+ EXPECT_TRUE(samples);
if (!samples)
return;
const base::TimeDelta dt = t / samples;
@@ -77,7 +77,7 @@
TimeTicks t0,
TimeDelta t,
size_t samples) {
- EXPECT_TRUE(!!samples);
+ EXPECT_TRUE(samples);
if (!samples)
return;
const base::TimeDelta dt = t / samples;