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

Side by Side Diff: chrome/browser/extensions/api/system_display/system_display_apitest.cc

Issue 366813007: Removed InProcessBrowserTest::CleanUpOnMainThread() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed superfluous override. Created 6 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/extensions/api/system_display/system_display_api.h" 5 #include "chrome/browser/extensions/api/system_display/system_display_api.h"
6 6
7 #include "base/debug/leak_annotations.h" 7 #include "base/debug/leak_annotations.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "chrome/browser/extensions/api/system_display/display_info_provider.h" 9 #include "chrome/browser/extensions/api/system_display/display_info_provider.h"
10 #include "chrome/browser/extensions/extension_apitest.h" 10 #include "chrome/browser/extensions/extension_apitest.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 virtual ~SystemDisplayApiTest() {} 175 virtual ~SystemDisplayApiTest() {}
176 176
177 virtual void SetUpOnMainThread() OVERRIDE { 177 virtual void SetUpOnMainThread() OVERRIDE {
178 ExtensionApiTest::SetUpOnMainThread(); 178 ExtensionApiTest::SetUpOnMainThread();
179 ANNOTATE_LEAKING_OBJECT_PTR( 179 ANNOTATE_LEAKING_OBJECT_PTR(
180 gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)); 180 gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE));
181 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); 181 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
182 DisplayInfoProvider::InitializeForTesting(provider_.get()); 182 DisplayInfoProvider::InitializeForTesting(provider_.get());
183 } 183 }
184 184
185 virtual void CleanUpOnMainThread() OVERRIDE { 185 virtual void TearDownOnMainThread() OVERRIDE {
186 #if defined(OS_CHROMEOS) 186 #if defined(OS_CHROMEOS)
187 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, 187 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE,
188 ash::Shell::GetScreen()); 188 ash::Shell::GetScreen());
189 #endif 189 #endif
190 ExtensionApiTest::CleanUpOnMainThread(); 190 ExtensionApiTest::TearDownOnMainThread();
191 } 191 }
192 192
193 protected: 193 protected:
194 scoped_ptr<MockDisplayInfoProvider> provider_; 194 scoped_ptr<MockDisplayInfoProvider> provider_;
195 scoped_ptr<gfx::Screen> screen_; 195 scoped_ptr<gfx::Screen> screen_;
196 196
197 DISALLOW_COPY_AND_ASSIGN(SystemDisplayApiTest); 197 DISALLOW_COPY_AND_ASSIGN(SystemDisplayApiTest);
198 }; 198 };
199 199
200 IN_PROC_BROWSER_TEST_F(SystemDisplayApiTest, GetDisplay) { 200 IN_PROC_BROWSER_TEST_F(SystemDisplayApiTest, GetDisplay) {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 EXPECT_EQ(1, utils::GetInteger(overscan, "left")); 295 EXPECT_EQ(1, utils::GetInteger(overscan, "left"));
296 EXPECT_EQ(2, utils::GetInteger(overscan, "top")); 296 EXPECT_EQ(2, utils::GetInteger(overscan, "top"));
297 EXPECT_EQ(3, utils::GetInteger(overscan, "right")); 297 EXPECT_EQ(3, utils::GetInteger(overscan, "right"));
298 EXPECT_EQ(4, utils::GetInteger(overscan, "bottom")); 298 EXPECT_EQ(4, utils::GetInteger(overscan, "bottom"));
299 299
300 EXPECT_EQ("display_id", provider_->GetSetInfoDisplayId()); 300 EXPECT_EQ("display_id", provider_->GetSetInfoDisplayId());
301 } 301 }
302 #endif // defined(OS_CHROMEOS) 302 #endif // defined(OS_CHROMEOS)
303 303
304 } // namespace extensions 304 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698