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

Unified Diff: ash/frame/caption_buttons/frame_size_button_unittest.cc

Issue 1505223004: Do not use assets for Ash window control button backgrounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ash layout constants file added Created 5 years 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
Index: ash/frame/caption_buttons/frame_size_button_unittest.cc
diff --git a/ash/frame/caption_buttons/frame_size_button_unittest.cc b/ash/frame/caption_buttons/frame_size_button_unittest.cc
index 3c950c1f71ec53536b0fc075893be5c1489d1dce..f67304a6bdbd40032d8b9c8d19cf54d4fd407706 100644
--- a/ash/frame/caption_buttons/frame_size_button_unittest.cc
+++ b/ash/frame/caption_buttons/frame_size_button_unittest.cc
@@ -4,6 +4,7 @@
#include "ash/frame/caption_buttons/frame_size_button.h"
+#include "ash/ash_layout_constants.h"
#include "ash/frame/caption_buttons/frame_caption_button.h"
#include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
#include "ash/shell.h"
@@ -57,14 +58,14 @@ class TestWidgetDelegate : public views::WidgetDelegateView {
caption_button_container_ =
new FrameCaptionButtonContainerView(GetWidget());
- // Set arbitrary images for the container's buttons so that the buttons
- // have non-empty sizes.
+ // Set arbitrary images for the button icons and assign the default
+ // header button size.
+ caption_button_container_->SetButtonSize(
+ GetAshLayoutSize(DEFAULT_HEADER_BUTTON));
for (int icon = 0; icon < CAPTION_BUTTON_ICON_COUNT; ++icon) {
- caption_button_container_->SetButtonImages(
+ caption_button_container_->SetButtonImage(
static_cast<CaptionButtonIcon>(icon),
- IDR_AURA_WINDOW_CONTROL_ICON_CLOSE,
- IDR_AURA_WINDOW_CONTROL_BACKGROUND_H,
- IDR_AURA_WINDOW_CONTROL_BACKGROUND_P);
+ IDR_AURA_WINDOW_CONTROL_ICON_CLOSE);
}
AddChildView(caption_button_container_);

Powered by Google App Engine
This is Rietveld 408576698