| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/prefs/pref_service.h" | |
| 9 #include "chrome/browser/devtools/devtools_window_testing.h" | 8 #include "chrome/browser/devtools/devtools_window_testing.h" |
| 10 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 11 #include "chrome/browser/ui/browser_tabstrip.h" | 10 #include "chrome/browser/ui/browser_tabstrip.h" |
| 12 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 11 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 13 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" | 12 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" |
| 14 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view_observer.h" | 13 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view_observer.h" |
| 15 #include "chrome/common/url_constants.h" | 14 #include "chrome/common/url_constants.h" |
| 16 #include "chrome/test/base/in_process_browser_test.h" | 15 #include "chrome/test/base/in_process_browser_test.h" |
| 17 #include "chrome/test/base/ui_test_utils.h" | 16 #include "chrome/test/base/ui_test_utils.h" |
| 18 #include "components/bookmarks/common/bookmark_pref_names.h" | 17 #include "components/bookmarks/common/bookmark_pref_names.h" |
| 18 #include "components/prefs/pref_service.h" |
| 19 #include "content/public/browser/invalidate_type.h" | 19 #include "content/public/browser/invalidate_type.h" |
| 20 #include "content/public/browser/web_contents.h" | 20 #include "content/public/browser/web_contents.h" |
| 21 #include "content/public/browser/web_contents_observer.h" | 21 #include "content/public/browser/web_contents_observer.h" |
| 22 | 22 |
| 23 class BrowserViewTest : public InProcessBrowserTest { | 23 class BrowserViewTest : public InProcessBrowserTest { |
| 24 public: | 24 public: |
| 25 BrowserViewTest() : InProcessBrowserTest(), devtools_(nullptr) {} | 25 BrowserViewTest() : InProcessBrowserTest(), devtools_(nullptr) {} |
| 26 | 26 |
| 27 protected: | 27 protected: |
| 28 BrowserView* browser_view() { | 28 BrowserView* browser_view() { |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 EXPECT_EQ(0, observer.change_count()); | 231 EXPECT_EQ(0, observer.change_count()); |
| 232 observer.clear_change_count(); | 232 observer.clear_change_count(); |
| 233 | 233 |
| 234 browser()->tab_strip_model()->ActivateTabAt(1, true); | 234 browser()->tab_strip_model()->ActivateTabAt(1, true); |
| 235 EXPECT_TRUE(bookmark_bar->visible()); | 235 EXPECT_TRUE(bookmark_bar->visible()); |
| 236 EXPECT_EQ(0, observer.change_count()); | 236 EXPECT_EQ(0, observer.change_count()); |
| 237 observer.clear_change_count(); | 237 observer.clear_change_count(); |
| 238 | 238 |
| 239 browser_view()->bookmark_bar()->RemoveObserver(&observer); | 239 browser_view()->bookmark_bar()->RemoveObserver(&observer); |
| 240 } | 240 } |
| OLD | NEW |