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

Unified Diff: ash/sticky_keys/sticky_keys_overlay_unittest.cc

Issue 757433005: Revert of Speculative fix for sticky keys overlay crash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « ash/sticky_keys/sticky_keys_overlay.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/sticky_keys/sticky_keys_overlay_unittest.cc
diff --git a/ash/sticky_keys/sticky_keys_overlay_unittest.cc b/ash/sticky_keys/sticky_keys_overlay_unittest.cc
index 9a19e09434e90dc6716ec662c45611c87bed730c..b6078255bb72b2d8ed6a4efe022721518e5430e2 100644
--- a/ash/sticky_keys/sticky_keys_overlay_unittest.cc
+++ b/ash/sticky_keys/sticky_keys_overlay_unittest.cc
@@ -8,11 +8,14 @@
#include "ash/sticky_keys/sticky_keys_controller.h"
#include "ash/test/ash_test_base.h"
#include "ui/events/event.h"
-#include "ui/views/widget/widget.h"
namespace ash {
-using StickyKeysOverlayTest = test::AshTestBase;
+class StickyKeysOverlayTest : public test::AshTestBase {
+ public:
+ StickyKeysOverlayTest() {}
+ virtual ~StickyKeysOverlayTest() {}
+};
TEST_F(StickyKeysOverlayTest, OverlayVisibility) {
StickyKeysOverlay overlay;
@@ -38,27 +41,6 @@
overlay.GetModifierKeyState(ui::EF_COMMAND_DOWN));
}
-// This test attempts to simulate a crash report (see //crbug.com/435600).
-// The crash is speculated to be caused by the native window of the sticky keys
-// overlay widget being destroyed before the overlay object is. This test case
-// tests that the overlay object maintains full ownership of the widget and view
-// regardless.
-TEST_F(StickyKeysOverlayTest, OverlayViewOwnership) {
- StickyKeysOverlay overlay;
- views::Widget* widget = overlay.GetWidgetForTesting();
- ASSERT_TRUE(widget);
- delete widget->GetNativeWindow();
-
- // States should still be valid even after the native window associated with
- // the Widget is destroyed.
- overlay.SetModifierKeyState(ui::EF_SHIFT_DOWN, STICKY_KEY_STATE_ENABLED);
- EXPECT_EQ(STICKY_KEY_STATE_ENABLED,
- overlay.GetModifierKeyState(ui::EF_SHIFT_DOWN));
- overlay.SetModifierKeyState(ui::EF_SHIFT_DOWN, STICKY_KEY_STATE_DISABLED);
- EXPECT_EQ(STICKY_KEY_STATE_DISABLED,
- overlay.GetModifierKeyState(ui::EF_SHIFT_DOWN));
-}
-
// Additional sticky key overlay tests that depend on chromeos::EventRewriter
// are now in chrome/browser/chromeos/events/event_rewriter_unittest.cc .
« no previous file with comments | « ash/sticky_keys/sticky_keys_overlay.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698