~ps-jenkins/unity/trusty-proposed

« back to all changes in this revision

Viewing changes to tests/test_unity_window_view.cpp

  • Committer: CI bot
  • Author(s): Chris Townsend, Andrea Azzarone, Alfred Neumayer, Brandon Schaefer, Marco Trevisan (Treviño)
  • Date: 2014-07-14 14:30:31 UTC
  • mfrom: (3797.1.35 unity.trusty-7.2.2)
  • Revision ID: ps-jenkins@lists.canonical.com-20140714143031-f5ky7acxlp761352
Prepare for upstream micro-release 7.2.2 that includes fixes for the following bugs:
Bug #607796: Launcher, Window management - Dragging and holding a selection over an entry in the Launcher should spread out windows belonging to that application
Bug #727902: Launcher icon highlighting should not switch off as soon the cursor moves after the app spread appears.
Bug #741869: Unity/compiz intercepts Super and Alt keypresses from grabbed windows like VMs.
Bug #754580: Cannot move tabs between multiple Firefox or Chromium windows while using Unity unless windows are both unmaximized, unminimized, and visible.
Bug #839728: Launcher - dragging a item on top of a launcher tile that is a valid drop receptacle in the Launcher should cause that launcher tile to glow
Bug #924840: Keyboard shortcuts overlay text too long
Bug #1281058: [UIFe] The system shutdowns when multiple accounts are open
Bug #1283775: Launcher: icon pips are not always updated properly
Bug #1304882: [Regression] Launcher doesn't reappear fully after hiding from DND
Bug #1305586: Lock screen is unusable when some windows have a keyboard/mouse grab
Bug #1307738: Lockscreen caps lock icon drawn under text entry, should be a white icon.
Bug #1308288: Lockscreen warning icon has no tooltip
Bug #1308323: Shutdown/reboot/login/logout dialogs not scaled after toggling UI scale Edit
Bug #1308911: Clipboard contents are accessible within lockscreen
Bug #1309739: Unity launcher icon edge illumination is offset
Bug #1310200: Indicators disappear at the panel (clementine, dropbox, skype etc)
Bug #1313280: Fullscreen window set to "Always on Top" in single-monitor will hide the lockscreen
Bug #1316005: Panel shadow appears over full screen applications w/ locally integrated menus enabled
Bug #1317348: Switcher (Alt-Tab) does not respect monitor-defined scaling factor
Bug #1317356: Shortcut hint does not respect monitor scaling factor
Bug #1317869: Keyboard shortcuts overlay does not show up when workspaces are enabled at 1366x768
Bug #1320438: Unity launcher auto hide fails on screen unlock using "Super+L"
Bug #1321043: [regression] lock screen bypass with touchpad Fixes: 607796, 727902, 741869, 754580, 839728, 924840, 1281058, 1283775, 1304882, 1305586, 1307738, 1308288, 1308323, 1308911, 1309739, 1310200, 1313280, 1316005, 1317348, 1317356, 1317869, 1320438, 1321043
Approved by: Marco Trevisan (Treviño)

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
  view.closable = true;
83
83
  ASSERT_NE(view.close_button_, nullptr);
84
84
 
85
 
  EXPECT_EQ(view.close_button_->texture(), view.style()->GetCloseIcon());
 
85
  EXPECT_EQ(view.close_button_->texture(), view.style()->GetTexture(view.scale, WindowTextureType::CLOSE_ICON));
86
86
  EXPECT_EQ(view.close_button_->GetParentObject(), &view);
87
87
 
88
 
  int padding = view.style()->GetCloseButtonPadding();
 
88
  int padding = view.style()->GetCloseButtonPadding(view.scale);
89
89
  EXPECT_EQ(view.close_button_->GetBaseX(), padding);
90
90
  EXPECT_EQ(view.close_button_->GetBaseY(), padding);
91
91
}
96
96
  ASSERT_NE(view.close_button_, nullptr);
97
97
 
98
98
  view.close_button_->mouse_enter.emit(0, 0, 0, 0);
99
 
  EXPECT_EQ(view.close_button_->texture(), view.style()->GetCloseIconHighligted());
 
99
  EXPECT_EQ(view.close_button_->texture(), view.style()->GetTexture(view.scale, WindowTextureType::CLOSE_ICON_HIGHLIGHTED));
100
100
 
101
101
  view.close_button_->mouse_leave.emit(0, 0, 0, 0);
102
 
  EXPECT_EQ(view.close_button_->texture(), view.style()->GetCloseIcon());
 
102
  EXPECT_EQ(view.close_button_->texture(), view.style()->GetTexture(view.scale, WindowTextureType::CLOSE_ICON));
103
103
 
104
104
  view.close_button_->mouse_down.emit(0, 0, 0, 0);
105
 
  EXPECT_EQ(view.close_button_->texture(), view.style()->GetCloseIconPressed());
 
105
  EXPECT_EQ(view.close_button_->texture(), view.style()->GetTexture(view.scale, WindowTextureType::CLOSE_ICON_PRESSED));
106
106
 
107
107
  view.close_button_->mouse_up.emit(0, 0, 0, 0);
108
 
  EXPECT_EQ(view.close_button_->texture(), view.style()->GetCloseIcon());
 
108
  EXPECT_EQ(view.close_button_->texture(), view.style()->GetTexture(view.scale, WindowTextureType::CLOSE_ICON));
109
109
}
110
110
 
111
111
TEST_F(TestUnityWindowView, CloseButtonClicksRequestsClose)
185
185
  view.SetLayout(layout);
186
186
  view.ComputeContentSize();
187
187
 
188
 
  int offset = view.style()->GetInternalOffset();
 
188
  int offset = view.style()->GetInternalOffset(view.scale);
189
189
  EXPECT_EQ(layout->GetBaseX(), offset);
190
190
  EXPECT_EQ(layout->GetBaseY(), offset);
191
191
}
199
199
 
200
200
TEST_F(TestUnityWindowView, GetInternalBackground)
201
201
{
202
 
  int offset = view.style()->GetInternalOffset();
 
202
  int offset = view.style()->GetInternalOffset(view.scale);
203
203
  view.background_geo_.Set(g_random_int(), g_random_int(), g_random_int(), g_random_int());
204
204
  EXPECT_EQ(view.GetInternalBackground(), view.background_geo_.GetExpand(-offset, -offset));
205
205
}
240
240
}
241
241
 
242
242
} // ui
243
 
} // unity
 
 
b'\\ No newline at end of file'
 
243
} // unity