| OLD | NEW | 
|    1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2011 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/history/history.h" |   10 #include "chrome/browser/history/history.h" | 
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   66     EXPECT_EQ(c, model->GetChapterStopCount(h)); |   66     EXPECT_EQ(c, model->GetChapterStopCount(h)); | 
|   67     if (h > 0) |   67     if (h > 0) | 
|   68       h += 2;  // Separator and View History link. |   68       h += 2;  // Separator and View History link. | 
|   69     if (c > 0) |   69     if (c > 0) | 
|   70       ++c; |   70       ++c; | 
|   71     EXPECT_EQ(h + c, model->GetItemCount()); |   71     EXPECT_EQ(h + c, model->GetItemCount()); | 
|   72   } |   72   } | 
|   73  |   73  | 
|   74   void LoadURLAndUpdateState(const char* url, const char* title) { |   74   void LoadURLAndUpdateState(const char* url, const char* title) { | 
|   75     NavigateAndCommit(GURL(url)); |   75     NavigateAndCommit(GURL(url)); | 
|   76     controller().GetLastCommittedEntry()->set_title(UTF8ToUTF16(title)); |   76     controller().GetLastCommittedEntry()->set_title( | 
 |   77         base::i18n::String16WithDirection(UTF8ToUTF16(title), | 
 |   78                                           base::i18n::LEFT_TO_RIGHT)); | 
|   77   } |   79   } | 
|   78  |   80  | 
|   79   // Navigate back or forward the given amount and commits the entry (which |   81   // Navigate back or forward the given amount and commits the entry (which | 
|   80   // will be pending after we ask to navigate there). |   82   // will be pending after we ask to navigate there). | 
|   81   void NavigateToOffset(int offset) { |   83   void NavigateToOffset(int offset) { | 
|   82     controller().GoToOffset(offset); |   84     controller().GoToOffset(offset); | 
|   83     contents()->CommitPendingNavigation(); |   85     contents()->CommitPendingNavigation(); | 
|   84   } |   86   } | 
|   85  |   87  | 
|   86   // Same as NavigateToOffset but goes to an absolute index. |   88   // Same as NavigateToOffset but goes to an absolute index. | 
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  548   // Verify we did get the expected favicon. |  550   // Verify we did get the expected favicon. | 
|  549   EXPECT_EQ(0, memcmp(new_icon.getPixels(), valid_icon.getPixels(), |  551   EXPECT_EQ(0, memcmp(new_icon.getPixels(), valid_icon.getPixels(), | 
|  550               new_icon.getSize())); |  552               new_icon.getSize())); | 
|  551  |  553  | 
|  552   // Make sure the browser deconstructor doesn't have problems. |  554   // Make sure the browser deconstructor doesn't have problems. | 
|  553   browser.CloseAllTabs(); |  555   browser.CloseAllTabs(); | 
|  554   // This is required to prevent the message loop from hanging. |  556   // This is required to prevent the message loop from hanging. | 
|  555   profile()->DestroyHistoryService(); |  557   profile()->DestroyHistoryService(); | 
|  556 } |  558 } | 
|  557  |  559  | 
| OLD | NEW |