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

Side by Side Diff: content/browser/renderer_host/input/touch_action_browsertest.cc

Issue 616603004: Replacing the OVERRIDE with override and FINAL with final in content/browser/renderer_host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased the patch Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/auto_reset.h" 5 #include "base/auto_reset.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/browser/renderer_host/input/synthetic_gesture.h" 10 #include "content/browser/renderer_host/input/synthetic_gesture.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 RenderWidgetHostImpl* host = GetWidgetHost(); 91 RenderWidgetHostImpl* host = GetWidgetHost();
92 host->GetView()->SetSize(gfx::Size(400, 400)); 92 host->GetView()->SetSize(gfx::Size(400, 400));
93 93
94 base::string16 ready_title(base::ASCIIToUTF16("ready")); 94 base::string16 ready_title(base::ASCIIToUTF16("ready"));
95 TitleWatcher watcher(shell()->web_contents(), ready_title); 95 TitleWatcher watcher(shell()->web_contents(), ready_title);
96 ignore_result(watcher.WaitAndGetTitle()); 96 ignore_result(watcher.WaitAndGetTitle());
97 } 97 }
98 98
99 // ContentBrowserTest: 99 // ContentBrowserTest:
100 virtual void SetUpCommandLine(CommandLine* cmd) OVERRIDE { 100 virtual void SetUpCommandLine(CommandLine* cmd) override {
101 cmd->AppendSwitchASCII(switches::kTouchEvents, 101 cmd->AppendSwitchASCII(switches::kTouchEvents,
102 switches::kTouchEventsEnabled); 102 switches::kTouchEventsEnabled);
103 // TODO(rbyers): Remove this switch once touch-action ships. 103 // TODO(rbyers): Remove this switch once touch-action ships.
104 // http://crbug.com/241964 104 // http://crbug.com/241964
105 cmd->AppendSwitch(switches::kEnableExperimentalWebPlatformFeatures); 105 cmd->AppendSwitch(switches::kEnableExperimentalWebPlatformFeatures);
106 } 106 }
107 107
108 int ExecuteScriptAndExtractInt(const std::string& script) { 108 int ExecuteScriptAndExtractInt(const std::string& script) {
109 int value = 0; 109 int value = 0;
110 EXPECT_TRUE(content::ExecuteScriptAndExtractInt( 110 EXPECT_TRUE(content::ExecuteScriptAndExtractInt(
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 bool scrolled = DoTouchScroll(gfx::Point(50, 150), gfx::Vector2d(0, 45)); 199 bool scrolled = DoTouchScroll(gfx::Point(50, 150), gfx::Vector2d(0, 45));
200 EXPECT_FALSE(scrolled); 200 EXPECT_FALSE(scrolled);
201 201
202 EXPECT_EQ(1, ExecuteScriptAndExtractInt("eventCounts.touchstart")); 202 EXPECT_EQ(1, ExecuteScriptAndExtractInt("eventCounts.touchstart"));
203 EXPECT_GT(ExecuteScriptAndExtractInt("eventCounts.touchmove"), 1); 203 EXPECT_GT(ExecuteScriptAndExtractInt("eventCounts.touchmove"), 1);
204 EXPECT_EQ(1, ExecuteScriptAndExtractInt("eventCounts.touchend")); 204 EXPECT_EQ(1, ExecuteScriptAndExtractInt("eventCounts.touchend"));
205 EXPECT_EQ(0, ExecuteScriptAndExtractInt("eventCounts.touchcancel")); 205 EXPECT_EQ(0, ExecuteScriptAndExtractInt("eventCounts.touchcancel"));
206 } 206 }
207 207
208 } // namespace content 208 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698