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

Side by Side Diff: trunk/src/chrome/test/gpu/webgl_infobar_browsertest.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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/infobars/confirm_infobar_delegate.h" 9 #include "chrome/browser/infobars/confirm_infobar_delegate.h"
10 #include "chrome/browser/infobars/infobar_service.h" 10 #include "chrome/browser/infobars/infobar_service.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 content::PAGE_TRANSITION_TYPED | 44 content::PAGE_TRANSITION_TYPED |
45 content::PAGE_TRANSITION_FROM_ADDRESS_BAR)); 45 content::PAGE_TRANSITION_FROM_ADDRESS_BAR));
46 params.disposition = NEW_BACKGROUND_TAB; 46 params.disposition = NEW_BACKGROUND_TAB;
47 chrome::Navigate(&params); 47 chrome::Navigate(&params);
48 } 48 }
49 49
50 } // namespace 50 } // namespace
51 51
52 class WebGLInfobarTest : public InProcessBrowserTest { 52 class WebGLInfobarTest : public InProcessBrowserTest {
53 protected: 53 protected:
54 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
55 // GPU tests require gpu acceleration.
56 #if !defined(OS_MACOSX)
57 command_line->AppendSwitchASCII(
58 switches::kUseGL, gfx::kGLImplementationOSMesaName);
59 #endif
60 }
54 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 61 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
55 base::FilePath test_dir; 62 base::FilePath test_dir;
56 ASSERT_TRUE(PathService::Get(content::DIR_TEST_DATA, &test_dir)); 63 ASSERT_TRUE(PathService::Get(content::DIR_TEST_DATA, &test_dir));
57 gpu_test_dir_ = test_dir.AppendASCII("gpu"); 64 gpu_test_dir_ = test_dir.AppendASCII("gpu");
58 } 65 }
59 base::FilePath gpu_test_dir_; 66 base::FilePath gpu_test_dir_;
60 }; 67 };
61 68
62 IN_PROC_BROWSER_TEST_F(WebGLInfobarTest, ContextLossRaisesInfobar) { 69 IN_PROC_BROWSER_TEST_F(WebGLInfobarTest, ContextLossRaisesInfobar) {
63 #if defined(OS_WIN) && defined(USE_ASH) 70 #if defined(OS_WIN) && defined(USE_ASH)
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // The page should reload and another message sent to the 141 // The page should reload and another message sent to the
135 // DomAutomationController. 142 // DomAutomationController.
136 m.clear(); 143 m.clear();
137 ASSERT_TRUE(message_queue.WaitForMessage(&m)); 144 ASSERT_TRUE(message_queue.WaitForMessage(&m));
138 EXPECT_EQ("\"LOADED\"", m); 145 EXPECT_EQ("\"LOADED\"", m);
139 } 146 }
140 147
141 // There isn't any point in adding a test which calls Accept() on the 148 // There isn't any point in adding a test which calls Accept() on the
142 // ThreeDAPIInfoBarDelegate; doing so doesn't remove the infobar, and 149 // ThreeDAPIInfoBarDelegate; doing so doesn't remove the infobar, and
143 // there's no concrete event that could be observed in response. 150 // there's no concrete event that could be observed in response.
OLDNEW
« no previous file with comments | « trunk/src/chrome/test/gpu/gpu_feature_browsertest.cc ('k') | trunk/src/chrome/test/ppapi/ppapi_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698