~3v1n0/unity/scale-window-cast-protection

« back to all changes in this revision

Viewing changes to tests/test_unity_settings.cpp

  • Committer: Marco Trevisan (Treviño)
  • Date: 2016-03-07 18:51:47 UTC
  • mfrom: (4080 unity)
  • mto: This revision was merged to the branch mainline in revision 4085.
  • Revision ID: mail@3v1n0.net-20160307185147-0p1m89up4tqfb6w1
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
   , sig_receiver(unity_settings)
54
54
  {
55
55
    g_settings_set_enum(gsettings, "form-factor", static_cast<int>(unity::FormFactor::DESKTOP));
 
56
    g_settings_set_enum(gsettings, "desktop-type", static_cast<int>(unity::DesktopType::UBUNTU));
56
57
  }
57
58
 
58
59
  ~TestUnitySettings()
59
60
  {
60
61
    sig_receiver.notify_callbacks();
61
62
    g_settings_reset(gsettings, "form-factor");
 
63
    g_settings_reset(gsettings, "desktop-type");
62
64
  }
63
65
};
64
66
 
78
80
  EXPECT_EQ(unity_settings->form_factor(), unity::FormFactor::NETBOOK);
79
81
}
80
82
 
 
83
TEST_F(TestUnitySettings, GetDesktopType)
 
84
{
 
85
  ASSERT_NE(unity_settings->desktop_type(), unity::DesktopType::UBUNTUKYLIN);
 
86
 
 
87
  g_settings_set_enum(gsettings, "desktop-type", static_cast<int>(unity::DesktopType::UBUNTUKYLIN));
 
88
  EXPECT_EQ(unity_settings->desktop_type(), unity::DesktopType::UBUNTUKYLIN);
 
89
}
 
90
 
81
91
TEST_F(TestUnitySettings, FormFactorChangedSignal_Extern)
82
92
{
83
93
  EXPECT_CALL(sig_receiver, FormFactorChanged(unity::FormFactor::NETBOOK));