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

Side by Side Diff: chrome/test/gpu/webgl_infobar_browsertest.cc

Issue 22293003: Clean up compositor initialization/destruction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanupcompositor: UseRealGLBindings in NetInternalsTest 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 }
61 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 54 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
62 base::FilePath test_dir; 55 base::FilePath test_dir;
63 ASSERT_TRUE(PathService::Get(content::DIR_TEST_DATA, &test_dir)); 56 ASSERT_TRUE(PathService::Get(content::DIR_TEST_DATA, &test_dir));
64 gpu_test_dir_ = test_dir.AppendASCII("gpu"); 57 gpu_test_dir_ = test_dir.AppendASCII("gpu");
65 } 58 }
66 base::FilePath gpu_test_dir_; 59 base::FilePath gpu_test_dir_;
67 }; 60 };
68 61
69 IN_PROC_BROWSER_TEST_F(WebGLInfobarTest, ContextLossRaisesInfobar) { 62 IN_PROC_BROWSER_TEST_F(WebGLInfobarTest, ContextLossRaisesInfobar) {
70 #if defined(OS_WIN) && defined(USE_ASH) 63 #if defined(OS_WIN) && defined(USE_ASH)
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // The page should reload and another message sent to the 134 // The page should reload and another message sent to the
142 // DomAutomationController. 135 // DomAutomationController.
143 m.clear(); 136 m.clear();
144 ASSERT_TRUE(message_queue.WaitForMessage(&m)); 137 ASSERT_TRUE(message_queue.WaitForMessage(&m));
145 EXPECT_EQ("\"LOADED\"", m); 138 EXPECT_EQ("\"LOADED\"", m);
146 } 139 }
147 140
148 // There isn't any point in adding a test which calls Accept() on the 141 // There isn't any point in adding a test which calls Accept() on the
149 // ThreeDAPIInfoBarDelegate; doing so doesn't remove the infobar, and 142 // ThreeDAPIInfoBarDelegate; doing so doesn't remove the infobar, and
150 // there's no concrete event that could be observed in response. 143 // there's no concrete event that could be observed in response.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698