diff options
-rw-r--r-- | chrome/browser/tab_contents/navigation_controller_unittest.cc | 8 | ||||
-rw-r--r-- | chrome/browser/task_manager_unittest.cc | 15 | ||||
-rwxr-xr-x | chrome/chrome_tests.gypi | 3 |
3 files changed, 14 insertions, 12 deletions
diff --git a/chrome/browser/tab_contents/navigation_controller_unittest.cc b/chrome/browser/tab_contents/navigation_controller_unittest.cc index 86b6da1..ea6a8c3 100644 --- a/chrome/browser/tab_contents/navigation_controller_unittest.cc +++ b/chrome/browser/tab_contents/navigation_controller_unittest.cc @@ -142,8 +142,6 @@ void RegisterForAllNavNotifications(TestNotificationTracker* tracker, Source<NavigationController>(controller)); } -} // namespace - // ----------------------------------------------------------------------------- TEST_F(NavigationControllerTest, Defaults) { @@ -1106,8 +1104,6 @@ TEST_F(NavigationControllerTest, InPage) { controller().GetActiveEntry()->url()); } -namespace { - // NotificationObserver implementation used in verifying we've received the // NotificationType::NAV_LIST_PRUNED method. class PrunedListener : public NotificationObserver { @@ -1139,8 +1135,6 @@ class PrunedListener : public NotificationObserver { DISALLOW_COPY_AND_ASSIGN(PrunedListener); }; -} // namespace - // Tests that we limit the number of navigation entries created correctly. TEST_F(NavigationControllerTest, EnforceMaxNavigationCount) { size_t original_count = NavigationController::max_entry_count(); @@ -1617,3 +1611,5 @@ TEST_F(NavigationControllerHistoryTest, NavigationPruning) { windows_[0]->tabs[0]->navigations[1]); } */ + +} // namespace diff --git a/chrome/browser/task_manager_unittest.cc b/chrome/browser/task_manager_unittest.cc index 0961b6d..d586a5c 100644 --- a/chrome/browser/task_manager_unittest.cc +++ b/chrome/browser/task_manager_unittest.cc @@ -16,6 +16,15 @@ namespace { +#if defined(OS_MACOSX) +// From task_manager.cc: +// Activity Monitor shows %cpu with one decimal digit -- be +// consistent with that. +const wchar_t *kZeroCPUUsage = L"0.0"; +#else +const wchar_t *kZeroCPUUsage = L"0"; +#endif + class TestResource : public TaskManager::Resource { public: TestResource() : refresh_called_(false) {} @@ -60,7 +69,7 @@ TEST_F(TaskManagerTest, Resources) { EXPECT_STREQ(L"test title", model->GetResourceTitle(0).c_str()); EXPECT_STREQ(l10n_util::GetString(IDS_TASK_MANAGER_NA_CELL_TEXT).c_str(), model->GetResourceNetworkUsage(0).c_str()); - EXPECT_STREQ(L"0", model->GetResourceCPUUsage(0).c_str()); + EXPECT_STREQ(kZeroCPUUsage, model->GetResourceCPUUsage(0).c_str()); task_manager.AddResource(&resource2); // Will be in the same group. ASSERT_EQ(2, model->ResourceCount()); @@ -69,7 +78,7 @@ TEST_F(TaskManagerTest, Resources) { EXPECT_STREQ(L"test title", model->GetResourceTitle(1).c_str()); EXPECT_STREQ(l10n_util::GetString(IDS_TASK_MANAGER_NA_CELL_TEXT).c_str(), model->GetResourceNetworkUsage(1).c_str()); - EXPECT_STREQ(L"0", model->GetResourceCPUUsage(1).c_str()); + EXPECT_STREQ(kZeroCPUUsage, model->GetResourceCPUUsage(1).c_str()); task_manager.RemoveResource(&resource1); // Now resource2 will be first in group. @@ -78,7 +87,7 @@ TEST_F(TaskManagerTest, Resources) { EXPECT_STREQ(L"test title", model->GetResourceTitle(0).c_str()); EXPECT_STREQ(l10n_util::GetString(IDS_TASK_MANAGER_NA_CELL_TEXT).c_str(), model->GetResourceNetworkUsage(0).c_str()); - EXPECT_STREQ(L"0", model->GetResourceCPUUsage(0).c_str()); + EXPECT_STREQ(kZeroCPUUsage, model->GetResourceCPUUsage(0).c_str()); task_manager.RemoveResource(&resource2); EXPECT_EQ(0, model->ResourceCount()); diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index e77daa5..3b8f6c0 100755 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -950,11 +950,8 @@ ], 'sources!': [ 'browser/views/bookmark_context_menu_test.cc', - 'browser/back_forward_menu_model_unittest.cc', 'browser/gtk/go_button_gtk_unittest.cc', 'browser/gtk/tabs/tab_renderer_gtk_unittest.cc', - 'browser/tab_contents/navigation_controller_unittest.cc', - 'browser/task_manager_unittest.cc', '../third_party/hunspell/google/hunspell_tests.cc', ], # TODO(mark): We really want this for all non-static library targets, |