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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_error_bubble_controller_unittest.mm

Issue 49063012: [rAC, OSX] Use bubble windows for error messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix failing tests. Created 7 years, 1 month 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: chrome/browser/ui/cocoa/autofill/autofill_error_bubble_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_error_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/autofill/autofill_error_bubble_controller_unittest.mm
new file mode 100644
index 0000000000000000000000000000000000000000..9674805d34c526d01812b5a4a2223c65ede54219
--- /dev/null
+++ b/chrome/browser/ui/cocoa/autofill/autofill_error_bubble_controller_unittest.mm
@@ -0,0 +1,26 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "chrome/browser/ui/cocoa/autofill/autofill_error_bubble_controller.h"
+
+#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
+#include "chrome/browser/ui/cocoa/run_loop_testing.h"
+
+class AutofillErrorBubbleControllerTest : public CocoaTest {
+};
+
+TEST_F(AutofillErrorBubbleControllerTest, ShowAndClose) {
+ AutofillErrorBubbleController* controller =
+ [[AutofillErrorBubbleController alloc] initWithParentWindow:test_window()
+ message:@"test msg"];
+ EXPECT_FALSE([[controller window] isVisible]);
+
+ [controller showWindow:nil];
+ EXPECT_TRUE([[controller window] isVisible]);
+
+ // Close will self-delete, but all pending messages must be processed so the
+ // deallocation happens.
+ [controller close];
+ chrome::testing::NSRunLoopRunAllPending();
+}

Powered by Google App Engine
This is Rietveld 408576698