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 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 5 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 #include "content/public/browser/render_process_host.h" | 39 #include "content/public/browser/render_process_host.h" |
40 #include "content/public/browser/web_contents.h" | 40 #include "content/public/browser/web_contents.h" |
41 #include "content/test/notification_observer_mock.h" | 41 #include "content/test/notification_observer_mock.h" |
42 #include "content/test/test_browser_thread.h" | 42 #include "content/test/test_browser_thread.h" |
43 #include "testing/gtest/include/gtest/gtest.h" | 43 #include "testing/gtest/include/gtest/gtest.h" |
44 | 44 |
45 using content::BrowserThread; | 45 using content::BrowserThread; |
46 using content::NavigationController; | 46 using content::NavigationController; |
47 using content::SiteInstance; | 47 using content::SiteInstance; |
48 using content::WebContents; | 48 using content::WebContents; |
| 49 using extensions::Extension; |
49 using testing::_; | 50 using testing::_; |
50 | 51 |
51 namespace { | 52 namespace { |
52 | 53 |
53 // Class used to delete a TabContentsWrapper when another TabContentsWrapper is | 54 // Class used to delete a TabContentsWrapper when another TabContentsWrapper is |
54 // destroyed. | 55 // destroyed. |
55 class DeleteTabContentsOnDestroyedObserver | 56 class DeleteTabContentsOnDestroyedObserver |
56 : public content::NotificationObserver { | 57 : public content::NotificationObserver { |
57 public: | 58 public: |
58 DeleteTabContentsOnDestroyedObserver(TabContentsWrapper* source, | 59 DeleteTabContentsOnDestroyedObserver(TabContentsWrapper* source, |
(...skipping 2381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2440 ASSERT_EQ(1, observer.GetStateCount()); | 2441 ASSERT_EQ(1, observer.GetStateCount()); |
2441 MockTabStripModelObserver::State s( | 2442 MockTabStripModelObserver::State s( |
2442 contents2, 1, MockTabStripModelObserver::SELECT); | 2443 contents2, 1, MockTabStripModelObserver::SELECT); |
2443 s.src_contents = contents2; | 2444 s.src_contents = contents2; |
2444 s.src_index = 1; | 2445 s.src_index = 1; |
2445 s.user_gesture = false; | 2446 s.user_gesture = false; |
2446 EXPECT_TRUE(observer.StateEquals(0, s)); | 2447 EXPECT_TRUE(observer.StateEquals(0, s)); |
2447 strip.RemoveObserver(&observer); | 2448 strip.RemoveObserver(&observer); |
2448 strip.CloseAllTabs(); | 2449 strip.CloseAllTabs(); |
2449 } | 2450 } |
OLD | NEW |