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

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

Issue 22603007: Revert 216278 "Clean up compositor initialization/destruction." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
13 #include "base/test/test_timeouts.h" 13 #include "base/test/test_timeouts.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "chrome/browser/chrome_notification_types.h" 15 #include "chrome/browser/chrome_notification_types.h"
16 #include "chrome/browser/content_settings/host_content_settings_map.h" 16 #include "chrome/browser/content_settings/host_content_settings_map.h"
17 #include "chrome/browser/infobars/confirm_infobar_delegate.h" 17 #include "chrome/browser/infobars/confirm_infobar_delegate.h"
18 #include "chrome/browser/infobars/infobar.h" 18 #include "chrome/browser/infobars/infobar.h"
19 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/ui/browser.h" 20 #include "chrome/browser/ui/browser.h"
21 #include "chrome/browser/ui/browser_tabstrip.h" 21 #include "chrome/browser/ui/browser_tabstrip.h"
22 #include "chrome/browser/ui/tabs/tab_strip_model.h" 22 #include "chrome/browser/ui/tabs/tab_strip_model.h"
23 #include "chrome/common/chrome_paths.h" 23 #include "chrome/common/chrome_paths.h"
24 #include "chrome/common/chrome_switches.h" 24 #include "chrome/common/chrome_switches.h"
25 #include "chrome/test/base/test_launcher_utils.h"
25 #include "chrome/test/base/ui_test_utils.h" 26 #include "chrome/test/base/ui_test_utils.h"
26 #include "content/public/browser/dom_operation_notification_details.h" 27 #include "content/public/browser/dom_operation_notification_details.h"
27 #include "content/public/browser/notification_service.h" 28 #include "content/public/browser/notification_service.h"
28 #include "content/public/browser/notification_types.h" 29 #include "content/public/browser/notification_types.h"
29 #include "content/public/browser/web_contents.h" 30 #include "content/public/browser/web_contents.h"
30 #include "content/public/common/content_paths.h" 31 #include "content/public/common/content_paths.h"
31 #include "content/public/common/content_switches.h" 32 #include "content/public/common/content_switches.h"
32 #include "content/public/test/browser_test_utils.h" 33 #include "content/public/test/browser_test_utils.h"
33 #include "content/public/test/test_renderer_host.h" 34 #include "content/public/test/test_renderer_host.h"
34 #include "net/base/net_util.h" 35 #include "net/base/net_util.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 110
110 void PPAPITestBase::InfoBarObserver::ExpectInfoBarAndAccept( 111 void PPAPITestBase::InfoBarObserver::ExpectInfoBarAndAccept(
111 bool should_accept) { 112 bool should_accept) {
112 expected_infobars_.push_back(should_accept); 113 expected_infobars_.push_back(should_accept);
113 } 114 }
114 115
115 PPAPITestBase::PPAPITestBase() { 116 PPAPITestBase::PPAPITestBase() {
116 } 117 }
117 118
118 void PPAPITestBase::SetUpCommandLine(CommandLine* command_line) { 119 void PPAPITestBase::SetUpCommandLine(CommandLine* command_line) {
120 // Do not use mesa if real GPU is required.
121 if (!command_line->HasSwitch(switches::kUseGpuInTests)) {
122 #if !defined(OS_MACOSX)
123 CHECK(test_launcher_utils::OverrideGLImplementation(
124 command_line, gfx::kGLImplementationOSMesaName)) <<
125 "kUseGL must not be set by test framework code!";
126 #endif
127 }
128
119 // The test sends us the result via a cookie. 129 // The test sends us the result via a cookie.
120 command_line->AppendSwitch(switches::kEnableFileCookies); 130 command_line->AppendSwitch(switches::kEnableFileCookies);
121 131
122 // Some stuff is hung off of the testing interface which is not enabled 132 // Some stuff is hung off of the testing interface which is not enabled
123 // by default. 133 // by default.
124 command_line->AppendSwitch(switches::kEnablePepperTesting); 134 command_line->AppendSwitch(switches::kEnablePepperTesting);
125 135
126 // Smooth scrolling confuses the scrollbar test. 136 // Smooth scrolling confuses the scrollbar test.
127 command_line->AppendSwitch(switches::kDisableSmoothScrolling); 137 command_line->AppendSwitch(switches::kDisableSmoothScrolling);
128 138
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 const std::string& base, 384 const std::string& base,
375 const std::string& test_case) { 385 const std::string& test_case) {
376 return base::StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), 386 return base::StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(),
377 test_case.c_str()); 387 test_case.c_str());
378 } 388 }
379 389
380 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { 390 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() {
381 // The default content setting for the PPAPI broker is ASK. We purposefully 391 // The default content setting for the PPAPI broker is ASK. We purposefully
382 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. 392 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way.
383 } 393 }
OLDNEW
« no previous file with comments | « trunk/src/chrome/test/gpu/webgl_infobar_browsertest.cc ('k') | trunk/src/chrome/test/ui/ui_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698