OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h" | 5 #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h" |
6 | 6 |
7 #include "chrome/browser/instant/instant_overlay_model.h" | |
8 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
11 #include "chrome/browser/ui/cocoa/browser_window_controller.h" | 10 #include "chrome/browser/ui/cocoa/browser_window_controller.h" |
12 #include "chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.h" | 11 #include "chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.h" |
13 #include "chrome/browser/ui/cocoa/tab_contents/overlay_drop_shadow_view.h" | 12 #include "chrome/browser/ui/cocoa/tab_contents/overlay_drop_shadow_view.h" |
| 13 #include "chrome/browser/ui/search/instant_overlay_model.h" |
14 #include "chrome/test/base/in_process_browser_test.h" | 14 #include "chrome/test/base/in_process_browser_test.h" |
15 #include "content/public/browser/notification_source.h" | 15 #include "content/public/browser/notification_source.h" |
16 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
17 #include "content/public/browser/web_contents_view.h" | 17 #include "content/public/browser/web_contents_view.h" |
18 #import "testing/gtest_mac.h" | 18 #import "testing/gtest_mac.h" |
19 | 19 |
20 class OverlayableContentsControllerTest : public InProcessBrowserTest, | 20 class OverlayableContentsControllerTest : public InProcessBrowserTest, |
21 public content::NotificationObserver { | 21 public content::NotificationObserver { |
22 public: | 22 public: |
23 OverlayableContentsControllerTest() : instant_overlay_model_(NULL), | 23 OverlayableContentsControllerTest() : instant_overlay_model_(NULL), |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 mode.mode = chrome::search::Mode::MODE_SEARCH_SUGGESTIONS; | 161 mode.mode = chrome::search::Mode::MODE_SEARCH_SUGGESTIONS; |
162 instant_overlay_model_.SetOverlayState(mode, 10, INSTANT_SIZE_PERCENT); | 162 instant_overlay_model_.SetOverlayState(mode, 10, INSTANT_SIZE_PERCENT); |
163 | 163 |
164 registrar_.Add(this, | 164 registrar_.Add(this, |
165 content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED, | 165 content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED, |
166 content::Source<content::WebContents>(web_contents_.get())); | 166 content::Source<content::WebContents>(web_contents_.get())); |
167 EXPECT_EQ(0, visibility_changed_count_); | 167 EXPECT_EQ(0, visibility_changed_count_); |
168 instant_overlay_model_.SetOverlayState(mode, 11, INSTANT_SIZE_PERCENT); | 168 instant_overlay_model_.SetOverlayState(mode, 11, INSTANT_SIZE_PERCENT); |
169 EXPECT_EQ(1, visibility_changed_count_); | 169 EXPECT_EQ(1, visibility_changed_count_); |
170 } | 170 } |
OLD | NEW |