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

Unified Diff: ios/chrome/app/safe_mode/safe_mode_coordinator_unittest.mm

Issue 2580363002: Upstream Chrome on iOS source code [1/11]. (Closed)
Patch Set: Created 4 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 | « ios/chrome/app/safe_mode/safe_mode_coordinator.mm ('k') | ios/chrome/app/safe_mode/safe_mode_egtest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/app/safe_mode/safe_mode_coordinator_unittest.mm
diff --git a/ios/chrome/app/safe_mode/safe_mode_coordinator_unittest.mm b/ios/chrome/app/safe_mode/safe_mode_coordinator_unittest.mm
new file mode 100644
index 0000000000000000000000000000000000000000..246c9778d208f9bef633016095c4300c481e1d51
--- /dev/null
+++ b/ios/chrome/app/safe_mode/safe_mode_coordinator_unittest.mm
@@ -0,0 +1,22 @@
+// Copyright 2016 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 "ios/chrome/app/safe_mode/safe_mode_coordinator.h"
+
+#include <UIKit/UIKit.h>
+
+#include "base/mac/scoped_nsobject.h"
+#include "testing/gtest_mac.h"
+
+TEST(SafeModeCoordinatorTest, RootVC) {
+ // Expect that starting a safe mode coordinator will populate the root view
+ // controller.
+ base::scoped_nsobject<UIWindow> window(
+ [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]);
+ EXPECT_TRUE([window rootViewController] == nil);
+ base::scoped_nsobject<SafeModeCoordinator> safe_mode_coordinator(
+ [[SafeModeCoordinator alloc] initWithWindow:window]);
+ [safe_mode_coordinator start];
+ EXPECT_FALSE([window rootViewController] == nil);
+}
« no previous file with comments | « ios/chrome/app/safe_mode/safe_mode_coordinator.mm ('k') | ios/chrome/app/safe_mode/safe_mode_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698