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

Side by Side Diff: chrome/test/ppapi/ppapi_test.cc

Issue 2531413002: Reset the default value of touch event flag back to "Auto". (Closed)
Patch Set: Typo Created 4 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/test/ppapi/ppapi_test.h" 5 #include "chrome/test/ppapi/ppapi_test.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 19 matching lines...) Expand all
30 #include "components/nacl/common/nacl_switches.h" 30 #include "components/nacl/common/nacl_switches.h"
31 #include "content/public/browser/notification_service.h" 31 #include "content/public/browser/notification_service.h"
32 #include "content/public/browser/web_contents.h" 32 #include "content/public/browser/web_contents.h"
33 #include "content/public/common/content_switches.h" 33 #include "content/public/common/content_switches.h"
34 #include "content/public/test/ppapi_test_utils.h" 34 #include "content/public/test/ppapi_test_utils.h"
35 #include "media/base/media_switches.h" 35 #include "media/base/media_switches.h"
36 #include "net/base/filename_util.h" 36 #include "net/base/filename_util.h"
37 #include "net/test/spawned_test_server/spawned_test_server.h" 37 #include "net/test/spawned_test_server/spawned_test_server.h"
38 #include "net/test/test_data_directory.h" 38 #include "net/test/test_data_directory.h"
39 #include "ppapi/shared_impl/ppapi_switches.h" 39 #include "ppapi/shared_impl/ppapi_switches.h"
40 #include "ui/events/event_switches.h"
40 #include "ui/gl/gl_switches.h" 41 #include "ui/gl/gl_switches.h"
41 42
42 using content::RenderViewHost; 43 using content::RenderViewHost;
43 using content::TestMessageHandler; 44 using content::TestMessageHandler;
44 45
45 namespace { 46 namespace {
46 47
47 void AddPrivateSwitches(base::CommandLine* command_line) { 48 void AddPrivateSwitches(base::CommandLine* command_line) {
48 // For TestRequestOSFileHandle. 49 // For TestRequestOSFileHandle.
49 command_line->AppendSwitch(switches::kUnlimitedStorage); 50 command_line->AppendSwitch(switches::kUnlimitedStorage);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 InProcessBrowserTest::SetUp(); 137 InProcessBrowserTest::SetUp();
137 } 138 }
138 139
139 void PPAPITestBase::SetUpCommandLine(base::CommandLine* command_line) { 140 void PPAPITestBase::SetUpCommandLine(base::CommandLine* command_line) {
140 // Some stuff is hung off of the testing interface which is not enabled 141 // Some stuff is hung off of the testing interface which is not enabled
141 // by default. 142 // by default.
142 command_line->AppendSwitch(switches::kEnablePepperTesting); 143 command_line->AppendSwitch(switches::kEnablePepperTesting);
143 144
144 // Smooth scrolling confuses the scrollbar test. 145 // Smooth scrolling confuses the scrollbar test.
145 command_line->AppendSwitch(switches::kDisableSmoothScrolling); 146 command_line->AppendSwitch(switches::kDisableSmoothScrolling);
147
148 // Enable touche events api.
raymes 2016/11/30 02:14:41 nit: touche->touch
sunyunjia 2016/11/30 02:41:53 Done.
149 command_line->AppendSwitch(switches::kTouchEvents);
raymes 2016/11/30 02:14:41 Hmm, how come this is needed?
sunyunjia 2016/11/30 02:41:53 In the previous patch(https://codereview.chromium.
146 } 150 }
147 151
148 void PPAPITestBase::SetUpOnMainThread() { 152 void PPAPITestBase::SetUpOnMainThread() {
149 // Always allow access to the PPAPI broker. 153 // Always allow access to the PPAPI broker.
150 HostContentSettingsMapFactory::GetForProfile(browser()->profile()) 154 HostContentSettingsMapFactory::GetForProfile(browser()->profile())
151 ->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PPAPI_BROKER, 155 ->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PPAPI_BROKER,
152 CONTENT_SETTING_ALLOW); 156 CONTENT_SETTING_ALLOW);
153 } 157 }
154 158
155 GURL PPAPITestBase::GetTestFileUrl(const std::string& test_case) { 159 GURL PPAPITestBase::GetTestFileUrl(const std::string& test_case) {
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 const std::string& base, 434 const std::string& base,
431 const std::string& test_case) { 435 const std::string& test_case) {
432 return base::StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), 436 return base::StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(),
433 test_case.c_str()); 437 test_case.c_str());
434 } 438 }
435 439
436 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { 440 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() {
437 // The default content setting for the PPAPI broker is ASK. We purposefully 441 // The default content setting for the PPAPI broker is ASK. We purposefully
438 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. 442 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way.
439 } 443 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698