OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/browser_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
6 | 6 |
7 #import "base/mac/mac_util.h" | 7 #import "base/mac/mac_util.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 | 482 |
483 NSView* bookmarkView = [[controller() bookmarkBarController] view]; | 483 NSView* bookmarkView = [[controller() bookmarkBarController] view]; |
484 NSView* contentView = [[controller() window] contentView]; | 484 NSView* contentView = [[controller() window] contentView]; |
485 NSPoint point = [bookmarkView convertPoint:NSMakePoint(1, 1) | 485 NSPoint point = [bookmarkView convertPoint:NSMakePoint(1, 1) |
486 toView:[contentView superview]]; | 486 toView:[contentView superview]]; |
487 | 487 |
488 EXPECT_FALSE([[contentView hitTest:point] isDescendantOf:bookmarkView]); | 488 EXPECT_FALSE([[contentView hitTest:point] isDescendantOf:bookmarkView]); |
489 EXPECT_TRUE([[contentView hitTest:point] | 489 EXPECT_TRUE([[contentView hitTest:point] |
490 isDescendantOf:[controller() tabContentArea]]); | 490 isDescendantOf:[controller() tabContentArea]]); |
491 } | 491 } |
| 492 |
| 493 // Verify that |currentInstantUIState| returns the correct value for search |
| 494 // results mode. |
| 495 IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest, InstantSearchResultsMode) { |
| 496 chrome::EnableInstantExtendedAPIForTesting(); |
| 497 SearchMode mode(SearchMode::MODE_SEARCH_RESULTS, SearchMode::ORIGIN_SEARCH); |
| 498 browser()->search_model()->SetMode(mode); |
| 499 browser()->search_model()->SetTopBarsVisible(false); |
| 500 EXPECT_TRUE(browser()->search_model()->mode().is_search_results()); |
| 501 EXPECT_EQ(browser_window_controller::kInstantUIFullPageResults, |
| 502 [controller() currentInstantUIState]); |
| 503 } |
OLD | NEW |