OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" | 5 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" |
6 | 6 |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/profile_manager.h" | 10 #include "chrome/browser/profiles/profile_manager.h" |
11 #include "chrome/browser/renderer_host/test/test_render_view_host.h" | 11 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
12 #include "chrome/browser/tab_contents/navigation_controller.h" | 12 #include "chrome/browser/tab_contents/navigation_controller.h" |
13 #include "chrome/browser/tab_contents/navigation_entry.h" | 13 #include "chrome/browser/tab_contents/navigation_entry.h" |
14 #include "chrome/browser/tab_contents/tab_contents.h" | 14 #include "chrome/browser/tab_contents/tab_contents.h" |
15 #include "chrome/browser/tab_contents/test_tab_contents.h" | 15 #include "chrome/browser/tab_contents/test_tab_contents.h" |
16 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 class BackFwdMenuModelTest : public RenderViewHostTestHarness { | 19 class BackFwdMenuModelTest : public RenderViewHostTestHarness { |
20 public: | 20 public: |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 EXPECT_EQ(1, back_model->GetIndexOfNextChapterStop(0, true)); | 413 EXPECT_EQ(1, back_model->GetIndexOfNextChapterStop(0, true)); |
414 EXPECT_EQ(3, back_model->GetIndexOfNextChapterStop(1, true)); | 414 EXPECT_EQ(3, back_model->GetIndexOfNextChapterStop(1, true)); |
415 EXPECT_EQ(3, back_model->GetIndexOfNextChapterStop(2, true)); | 415 EXPECT_EQ(3, back_model->GetIndexOfNextChapterStop(2, true)); |
416 EXPECT_EQ(4, back_model->GetIndexOfNextChapterStop(3, true)); | 416 EXPECT_EQ(4, back_model->GetIndexOfNextChapterStop(3, true)); |
417 // And try backwards as well. | 417 // And try backwards as well. |
418 EXPECT_EQ(3, back_model->GetIndexOfNextChapterStop(4, false)); | 418 EXPECT_EQ(3, back_model->GetIndexOfNextChapterStop(4, false)); |
419 EXPECT_EQ(1, back_model->GetIndexOfNextChapterStop(3, false)); | 419 EXPECT_EQ(1, back_model->GetIndexOfNextChapterStop(3, false)); |
420 EXPECT_EQ(1, back_model->GetIndexOfNextChapterStop(2, false)); | 420 EXPECT_EQ(1, back_model->GetIndexOfNextChapterStop(2, false)); |
421 EXPECT_EQ(-1, back_model->GetIndexOfNextChapterStop(1, false)); | 421 EXPECT_EQ(-1, back_model->GetIndexOfNextChapterStop(1, false)); |
422 } | 422 } |
OLD | NEW |