Index: ios/chrome/browser/ui/commands/set_up_for_testing_command_unittest.mm |
diff --git a/ios/chrome/browser/ui/commands/set_up_for_testing_command_unittest.mm b/ios/chrome/browser/ui/commands/set_up_for_testing_command_unittest.mm |
index 143631ff23417d4b861fc0daf61b05293db80c1d..508f7bcdea1dbd6d57f293c56108a84d05847eb7 100644 |
--- a/ios/chrome/browser/ui/commands/set_up_for_testing_command_unittest.mm |
+++ b/ios/chrome/browser/ui/commands/set_up_for_testing_command_unittest.mm |
@@ -20,6 +20,7 @@ TEST_F(SetUpForTestingCommandTest, InitNoArguments) { |
[[SetUpForTestingCommand alloc] initWithURL:url]); |
EXPECT_FALSE([command clearBrowsingData]); |
EXPECT_FALSE([command closeTabs]); |
+ EXPECT_EQ(0, [command numberOfNewTabs]); |
} |
TEST_F(SetUpForTestingCommandTest, InitClearBrowsingData) { |
@@ -58,6 +59,15 @@ TEST_F(SetUpForTestingCommandTest, InitWithBadNumberOfNewTabs) { |
EXPECT_EQ(0, [command numberOfNewTabs]); |
} |
+TEST_F(SetUpForTestingCommandTest, InitWithNegativeNumberOfNewTabs) { |
+ GURL url("chrome://setupfortesting?numberOfNewTabs=-3"); |
+ base::scoped_nsobject<SetUpForTestingCommand> command( |
+ [[SetUpForTestingCommand alloc] initWithURL:url]); |
+ EXPECT_FALSE([command clearBrowsingData]); |
+ EXPECT_FALSE([command closeTabs]); |
+ EXPECT_EQ(0, [command numberOfNewTabs]); |
+} |
+ |
TEST_F(SetUpForTestingCommandTest, InitWithArguments) { |
GURL url( |
"chrome://setupfortesting?clearBrowsingData&closeTabs&numberOfNewTabs=5"); |
@@ -74,6 +84,7 @@ TEST_F(SetUpForTestingCommandTest, InitWithBadArguments) { |
[[SetUpForTestingCommand alloc] initWithURL:url]); |
EXPECT_FALSE([command clearBrowsingData]); |
EXPECT_FALSE([command closeTabs]); |
+ EXPECT_EQ(0, [command numberOfNewTabs]); |
} |
} // namespace |