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

Unified Diff: ui/aura/mus/property_converter_unittest.cc

Issue 2694213003: mash: wires up shadows for mash (Closed)
Patch Set: defaults test Created 3 years, 10 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 | « ui/aura/mus/property_converter.cc ('k') | ui/views/mus/desktop_window_tree_host_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/property_converter_unittest.cc
diff --git a/ui/aura/mus/property_converter_unittest.cc b/ui/aura/mus/property_converter_unittest.cc
index ad01a8a4d37ba6a80c9a3668a90d4ea59ca49ea0..e39c827a37427e5328f714eb8539e7fe202a41fb 100644
--- a/ui/aura/mus/property_converter_unittest.cc
+++ b/ui/aura/mus/property_converter_unittest.cc
@@ -80,6 +80,7 @@ void TestPrimitiveProperty(PropertyConverter* property_converter,
property_converter->RegisterProperty(key, transport_name);
EXPECT_EQ(transport_name,
property_converter->GetTransportNameForPropertyKey(key));
+ EXPECT_TRUE(property_converter->IsTransportNameRegistered(transport_name));
window->SetProperty(key, value_1);
EXPECT_EQ(value_1, window->GetProperty(key));
@@ -120,6 +121,9 @@ TEST_F(PropertyConverterTest, PrimitiveProperties) {
PropertyConverter property_converter;
std::unique_ptr<Window> window(CreateNormalWindow(1, root_window(), nullptr));
+ EXPECT_FALSE(
+ property_converter.IsTransportNameRegistered(kTestPropertyServerKey0));
+
const bool value_0a = true, value_0b = false;
TestPrimitiveProperty(&property_converter, window.get(), kTestPropertyKey0,
kTestPropertyServerKey0, value_0a, value_0b);
@@ -169,6 +173,8 @@ TEST_F(PropertyConverterTest, ImageSkiaProperty) {
EXPECT_EQ(
kTestImagePropertyServerKey,
property_converter.GetTransportNameForPropertyKey(kTestImagePropertyKey));
+ EXPECT_TRUE(property_converter.IsTransportNameRegistered(
+ kTestImagePropertyServerKey));
SkBitmap bitmap_1;
bitmap_1.allocN32Pixels(16, 32);
@@ -209,6 +215,8 @@ TEST_F(PropertyConverterTest, RectProperty) {
EXPECT_EQ(
kTestRectPropertyServerKey,
property_converter.GetTransportNameForPropertyKey(kTestRectPropertyKey));
+ EXPECT_TRUE(
+ property_converter.IsTransportNameRegistered(kTestRectPropertyServerKey));
gfx::Rect value_1(1, 2, 3, 4);
std::unique_ptr<Window> window(CreateNormalWindow(1, root_window(), nullptr));
@@ -240,6 +248,8 @@ TEST_F(PropertyConverterTest, SizeProperty) {
EXPECT_EQ(
kTestSizePropertyServerKey,
property_converter.GetTransportNameForPropertyKey(kTestSizePropertyKey));
+ EXPECT_TRUE(
+ property_converter.IsTransportNameRegistered(kTestSizePropertyServerKey));
gfx::Size value_1(1, 2);
std::unique_ptr<Window> window(CreateNormalWindow(1, root_window(), nullptr));
@@ -271,6 +281,8 @@ TEST_F(PropertyConverterTest, StringProperty) {
EXPECT_EQ(kTestStringPropertyServerKey,
property_converter.GetTransportNameForPropertyKey(
kTestStringPropertyKey));
+ EXPECT_TRUE(property_converter.IsTransportNameRegistered(
+ kTestStringPropertyServerKey));
std::string value_1 = "test value";
std::unique_ptr<Window> window(CreateNormalWindow(1, root_window(), nullptr));
@@ -302,6 +314,8 @@ TEST_F(PropertyConverterTest, String16Property) {
EXPECT_EQ(kTestString16PropertyServerKey,
property_converter.GetTransportNameForPropertyKey(
kTestString16PropertyKey));
+ EXPECT_TRUE(property_converter.IsTransportNameRegistered(
+ kTestString16PropertyServerKey));
base::string16 value_1 = base::ASCIIToUTF16("test value");
std::unique_ptr<Window> window(CreateNormalWindow(1, root_window(), nullptr));
« no previous file with comments | « ui/aura/mus/property_converter.cc ('k') | ui/views/mus/desktop_window_tree_host_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698