| OLD | NEW |
| 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 "base/string_util.h" | 5 #include "base/string_util.h" |
| 6 #include "chrome/browser/automation/ui_controls.h" | 6 #include "chrome/browser/automation/ui_controls.h" |
| 7 #include "chrome/browser/bookmarks/bookmark_model.h" | 7 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 8 #include "chrome/browser/page_navigator.h" | 8 #include "chrome/browser/page_navigator.h" |
| 9 #include "chrome/browser/profile.h" | 9 #include "chrome/browser/profile.h" |
| 10 #include "chrome/browser/views/bookmark_bar_view.h" | 10 #include "chrome/browser/views/bookmark_bar_view.h" |
| 11 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
| 12 #include "chrome/common/pref_service.h" | 12 #include "chrome/common/pref_service.h" |
| 13 #include "chrome/test/testing_profile.h" | 13 #include "chrome/test/testing_profile.h" |
| 14 #include "chrome/test/interactive_ui/view_event_test_base.h" | 14 #include "chrome/test/interactive_ui/view_event_test_base.h" |
| 15 #include "chrome/views/chrome_menu.h" | 15 #include "chrome/views/chrome_menu.h" |
| 16 #include "chrome/views/text_button.h" | 16 #include "chrome/views/text_button.h" |
| 17 #include "chrome/views/window.h" | 17 #include "chrome/views/window.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // PageNavigator implementation that records the URL. | 21 // PageNavigator implementation that records the URL. |
| 22 class TestingPageNavigator : public PageNavigator { | 22 class TestingPageNavigator : public PageNavigator { |
| 23 public: | 23 public: |
| 24 virtual void OpenURL(const GURL& url, | 24 virtual void OpenURL(const GURL& url, const GURL& referrer, |
| 25 WindowOpenDisposition disposition, | 25 WindowOpenDisposition disposition, |
| 26 PageTransition::Type transition) { | 26 PageTransition::Type transition) { |
| 27 url_ = url; | 27 url_ = url; |
| 28 } | 28 } |
| 29 | 29 |
| 30 GURL url_; | 30 GURL url_; |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 } // namespace | 33 } // namespace |
| 34 | 34 |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 | 817 |
| 818 void Step8() { | 818 void Step8() { |
| 819 ASSERT_TRUE( | 819 ASSERT_TRUE( |
| 820 model_->GetBookmarkBarNode()->GetChild(0)->GetChild(0)->GetURL() == | 820 model_->GetBookmarkBarNode()->GetChild(0)->GetChild(0)->GetURL() == |
| 821 navigator_.url_); | 821 navigator_.url_); |
| 822 Done(); | 822 Done(); |
| 823 } | 823 } |
| 824 }; | 824 }; |
| 825 | 825 |
| 826 VIEW_TEST(BookmarkBarViewTest10, KeyEvents) | 826 VIEW_TEST(BookmarkBarViewTest10, KeyEvents) |
| OLD | NEW |