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

Unified Diff: ash/common/system/tray/system_tray_unittest.cc

Issue 2678343006: Remove non-MD test coverage from SystemTrayTest (Closed)
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/system_tray_unittest.cc
diff --git a/ash/common/system/tray/system_tray_unittest.cc b/ash/common/system/tray/system_tray_unittest.cc
index 6f7854ef914a91336548192151988f02fc8dddb8..0da4a4cb1fa4f257fa660d71f5b93416b72770cb 100644
--- a/ash/common/system/tray/system_tray_unittest.cc
+++ b/ash/common/system/tray/system_tray_unittest.cc
@@ -9,7 +9,6 @@
#include "ash/common/accelerators/accelerator_controller.h"
#include "ash/common/accessibility_delegate.h"
-#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/system/status_area_widget.h"
#include "ash/common/system/tray/system_tray_bubble.h"
@@ -538,15 +537,6 @@ TEST_F(SystemTrayTest, WithSystemModal) {
test::kAccessibilityTrayItemViewId);
ASSERT_TRUE(accessibility);
EXPECT_TRUE(accessibility->visible());
-
- // Settings row is not present in material design.
- if (!MaterialDesignController::IsSystemTrayMenuMaterial()) {
- const views::View* settings =
- tray->GetSystemBubble()->bubble_view()->GetViewByID(
- test::kSettingsTrayItemViewId);
- ASSERT_TRUE(settings);
- EXPECT_TRUE(settings->visible());
- }
}
// Tests that if SetVisible(true) is called while animating to hidden that the
@@ -569,60 +559,6 @@ TEST_F(SystemTrayTest, SetVisibleDuringHideAnimation) {
EXPECT_EQ(1.0f, tray->layer()->GetTargetOpacity());
}
-// Tests that touch on an item in the system bubble triggers it to become
-// active.
-TEST_F(SystemTrayTest, TrayPopupItemContainerTouchFeedback) {
- // Material design will use the ink drop ripple framework to show
- // active states.
- if (MaterialDesignController::IsSystemTrayMenuMaterial())
- return;
-
- SystemTray* tray = GetPrimarySystemTray();
- tray->ShowDefaultView(BUBBLE_CREATE_NEW);
-
- TrayPopupItemContainer* view = static_cast<TrayPopupItemContainer*>(
- tray->GetSystemBubble()->bubble_view()->child_at(0));
- EXPECT_FALSE(view->active());
-
- ui::test::EventGenerator& generator = GetEventGenerator();
- generator.set_current_location(view->GetBoundsInScreen().CenterPoint());
- generator.PressTouch();
- EXPECT_TRUE(view->active());
-
- generator.ReleaseTouch();
- EXPECT_FALSE(view->active());
-}
-
-// Tests that touch events on an item in the system bubble cause it to stop
-// being active.
-TEST_F(SystemTrayTest, TrayPopupItemContainerTouchFeedbackCancellation) {
- // Material design will use the ink drop ripple framework to show
- // active states.
- if (MaterialDesignController::IsSystemTrayMenuMaterial())
- return;
-
- SystemTray* tray = GetPrimarySystemTray();
- tray->ShowDefaultView(BUBBLE_CREATE_NEW);
-
- TrayPopupItemContainer* view = static_cast<TrayPopupItemContainer*>(
- tray->GetSystemBubble()->bubble_view()->child_at(0));
- EXPECT_FALSE(view->active());
-
- gfx::Rect view_bounds = view->GetBoundsInScreen();
- ui::test::EventGenerator& generator = GetEventGenerator();
- generator.set_current_location(view_bounds.CenterPoint());
- generator.PressTouch();
- EXPECT_TRUE(view->active());
-
- gfx::Point move_point(view_bounds.x(), view_bounds.CenterPoint().y());
- generator.MoveTouch(move_point);
- EXPECT_FALSE(view->active());
-
- generator.set_current_location(move_point);
- generator.ReleaseTouch();
- EXPECT_FALSE(view->active());
-}
-
TEST_F(SystemTrayTest, SystemTrayHeightWithBubble) {
SystemTray* tray = GetPrimarySystemTray();
WebNotificationTray* notification_tray =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698