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

Side by Side Diff: chrome/browser/back_forward_menu_model_unittest.cc

Issue 155071: Do some refactoring of renderer_host.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/back_forward_menu_model.h" 5 #include "chrome/browser/back_forward_menu_model.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "chrome/browser/profile_manager.h" 11 #include "chrome/browser/profile_manager.h"
12 #include "chrome/browser/renderer_host/test_render_view_host.h" 12 #include "chrome/browser/renderer_host/test/test_render_view_host.h"
13 #include "chrome/browser/tab_contents/navigation_controller.h" 13 #include "chrome/browser/tab_contents/navigation_controller.h"
14 #include "chrome/browser/tab_contents/navigation_entry.h" 14 #include "chrome/browser/tab_contents/navigation_entry.h"
15 #include "chrome/browser/tab_contents/tab_contents.h" 15 #include "chrome/browser/tab_contents/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:
21 void ValidateModel(BackForwardMenuModel* model, int history_items, 21 void ValidateModel(BackForwardMenuModel* model, int history_items,
22 int chapter_stops) { 22 int chapter_stops) {
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 EXPECT_EQ(1, back_model->GetIndexOfNextChapterStop(0, true)); 397 EXPECT_EQ(1, back_model->GetIndexOfNextChapterStop(0, true));
398 EXPECT_EQ(3, back_model->GetIndexOfNextChapterStop(1, true)); 398 EXPECT_EQ(3, back_model->GetIndexOfNextChapterStop(1, true));
399 EXPECT_EQ(3, back_model->GetIndexOfNextChapterStop(2, true)); 399 EXPECT_EQ(3, back_model->GetIndexOfNextChapterStop(2, true));
400 EXPECT_EQ(4, back_model->GetIndexOfNextChapterStop(3, true)); 400 EXPECT_EQ(4, back_model->GetIndexOfNextChapterStop(3, true));
401 // And try backwards as well. 401 // And try backwards as well.
402 EXPECT_EQ(3, back_model->GetIndexOfNextChapterStop(4, false)); 402 EXPECT_EQ(3, back_model->GetIndexOfNextChapterStop(4, false));
403 EXPECT_EQ(1, back_model->GetIndexOfNextChapterStop(3, false)); 403 EXPECT_EQ(1, back_model->GetIndexOfNextChapterStop(3, false));
404 EXPECT_EQ(1, back_model->GetIndexOfNextChapterStop(2, false)); 404 EXPECT_EQ(1, back_model->GetIndexOfNextChapterStop(2, false));
405 EXPECT_EQ(-1, back_model->GetIndexOfNextChapterStop(1, false)); 405 EXPECT_EQ(-1, back_model->GetIndexOfNextChapterStop(1, false));
406 } 406 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698