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

Unified Diff: ash/mus_property_mirror_ash_unittest.cc

Issue 2847283002: chromeos: convert remaining AshTest usage to AshTestBase (Closed)
Patch Set: comment Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/mus/window_manager_application.h ('k') | ash/system/audio/tray_audio_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus_property_mirror_ash_unittest.cc
diff --git a/ash/mus_property_mirror_ash_unittest.cc b/ash/mus_property_mirror_ash_unittest.cc
index 30a5b8e4dfef2ef07c9c821b73df4e4d88f8a676..81020af2652a64f541dc2b9fa586c2ea56dacc58 100644
--- a/ash/mus_property_mirror_ash_unittest.cc
+++ b/ash/mus_property_mirror_ash_unittest.cc
@@ -7,8 +7,7 @@
#include <string>
#include "ash/public/cpp/window_properties.h"
-#include "ash/test/ash_test.h"
-#include "ash/wm_window.h"
+#include "ash/test/ash_test_base.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/aura/client/aura_constants.h"
@@ -16,22 +15,20 @@
namespace ash {
-using MusPropertyMirrorAshTest = AshTest;
+using MusPropertyMirrorAshTest = test::AshTestBase;
// Ensure the property mirror can copy primitive properties between windows.
TEST_F(MusPropertyMirrorAshTest, PrimitiveProperties) {
MusPropertyMirrorAsh mus_property_mirror_ash;
- std::unique_ptr<WindowOwner> window_owner_1(CreateTestWindow());
- std::unique_ptr<WindowOwner> window_owner_2(CreateTestWindow());
- aura::Window* window_1 = window_owner_1->window()->aura_window();
- aura::Window* window_2 = window_owner_2->window()->aura_window();
+ std::unique_ptr<aura::Window> window_1(CreateTestWindow());
+ std::unique_ptr<aura::Window> window_2(CreateTestWindow());
EXPECT_EQ(TYPE_UNDEFINED, window_1->GetProperty(kShelfItemTypeKey));
EXPECT_EQ(TYPE_UNDEFINED, window_2->GetProperty(kShelfItemTypeKey));
window_1->SetProperty(kShelfItemTypeKey, static_cast<int32_t>(TYPE_APP));
EXPECT_EQ(TYPE_APP, window_1->GetProperty(kShelfItemTypeKey));
mus_property_mirror_ash.MirrorPropertyFromWidgetWindowToRootWindow(
- window_1, window_2, kShelfItemTypeKey);
+ window_1.get(), window_2.get(), kShelfItemTypeKey);
EXPECT_EQ(TYPE_APP, window_2->GetProperty(kShelfItemTypeKey));
EXPECT_FALSE(window_1->GetProperty(aura::client::kDrawAttentionKey));
@@ -39,24 +36,22 @@ TEST_F(MusPropertyMirrorAshTest, PrimitiveProperties) {
window_1->SetProperty(aura::client::kDrawAttentionKey, true);
EXPECT_TRUE(window_1->GetProperty(aura::client::kDrawAttentionKey));
mus_property_mirror_ash.MirrorPropertyFromWidgetWindowToRootWindow(
- window_1, window_2, aura::client::kDrawAttentionKey);
+ window_1.get(), window_2.get(), aura::client::kDrawAttentionKey);
EXPECT_TRUE(window_2->GetProperty(aura::client::kDrawAttentionKey));
}
// Ensure the property mirror can copy owned object properties between windows.
TEST_F(MusPropertyMirrorAshTest, OwnedProperties) {
MusPropertyMirrorAsh mus_property_mirror_ash;
- std::unique_ptr<WindowOwner> window_owner_1(CreateTestWindow());
- std::unique_ptr<WindowOwner> window_owner_2(CreateTestWindow());
- aura::Window* window_1 = window_owner_1->window()->aura_window();
- aura::Window* window_2 = window_owner_2->window()->aura_window();
+ std::unique_ptr<aura::Window> window_1(CreateTestWindow());
+ std::unique_ptr<aura::Window> window_2(CreateTestWindow());
EXPECT_EQ(nullptr, window_1->GetProperty(aura::client::kAppIdKey));
EXPECT_EQ(nullptr, window_2->GetProperty(aura::client::kAppIdKey));
window_1->SetProperty(aura::client::kAppIdKey, new std::string("abc"));
EXPECT_EQ("abc", *window_1->GetProperty(aura::client::kAppIdKey));
mus_property_mirror_ash.MirrorPropertyFromWidgetWindowToRootWindow(
- window_1, window_2, aura::client::kAppIdKey);
+ window_1.get(), window_2.get(), aura::client::kAppIdKey);
EXPECT_EQ("abc", *window_2->GetProperty(aura::client::kAppIdKey));
EXPECT_NE(window_1->GetProperty(aura::client::kAppIdKey),
window_2->GetProperty(aura::client::kAppIdKey));
@@ -68,7 +63,7 @@ TEST_F(MusPropertyMirrorAshTest, OwnedProperties) {
EXPECT_EQ(base::ASCIIToUTF16("def"),
*window_1->GetProperty(aura::client::kTitleKey));
mus_property_mirror_ash.MirrorPropertyFromWidgetWindowToRootWindow(
- window_1, window_2, aura::client::kTitleKey);
+ window_1.get(), window_2.get(), aura::client::kTitleKey);
EXPECT_EQ(base::ASCIIToUTF16("def"),
*window_2->GetProperty(aura::client::kTitleKey));
EXPECT_NE(window_1->GetProperty(aura::client::kTitleKey),
@@ -81,7 +76,7 @@ TEST_F(MusPropertyMirrorAshTest, OwnedProperties) {
window_1->SetProperty(aura::client::kWindowIconKey, new gfx::ImageSkia());
EXPECT_NE(nullptr, window_1->GetProperty(aura::client::kWindowIconKey));
mus_property_mirror_ash.MirrorPropertyFromWidgetWindowToRootWindow(
- window_1, window_2, aura::client::kWindowIconKey);
+ window_1.get(), window_2.get(), aura::client::kWindowIconKey);
EXPECT_NE(nullptr, window_2->GetProperty(aura::client::kWindowIconKey));
EXPECT_NE(window_1->GetProperty(aura::client::kWindowIconKey),
window_2->GetProperty(aura::client::kWindowIconKey));
« no previous file with comments | « ash/mus/window_manager_application.h ('k') | ash/system/audio/tray_audio_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698