Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: chrome/browser/tab_contents/web_contents_unittest.cc

Issue 7880003: content: Move constrained window code from TabContents to TabContentsWrapper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt to fix views merge part 2 Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/tab_contents/web_contents_unittest.cc
diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc
index d55bbe476c88594b17ed4a1814fd794408f3acc4..f9b7ef3e67015c8eab734b054af8efbf3abb369b 100644
--- a/chrome/browser/tab_contents/web_contents_unittest.cc
+++ b/chrome/browser/tab_contents/web_contents_unittest.cc
@@ -18,7 +18,6 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/site_instance.h"
-#include "content/browser/tab_contents/constrained_window.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/test_tab_contents.h"
@@ -1769,36 +1768,3 @@ TEST_F(TabContentsTest, CopyStateFromAndPruneTargetInterstitial) {
// And the interstitial should do a reload on don't proceed.
EXPECT_TRUE(other_contents->interstitial_page()->reload_on_dont_proceed());
}
-
-class ConstrainedWindowCloseTest : public ConstrainedWindow {
- public:
- explicit ConstrainedWindowCloseTest(TabContents* tab_contents)
- : tab_contents_(tab_contents) {
- }
-
- virtual void ShowConstrainedWindow() {}
- virtual void FocusConstrainedWindow() {}
- virtual ~ConstrainedWindowCloseTest() {}
-
- virtual void CloseConstrainedWindow() {
- tab_contents_->WillClose(this);
- close_count++;
- }
-
- int close_count;
- TabContents* tab_contents_;
-};
-
-TEST_F(TabContentsTest, ConstrainedWindows) {
- TabContents* tab_contents = CreateTestTabContents();
- ConstrainedWindowCloseTest window(tab_contents);
- window.close_count = 0;
-
- const int kWindowCount = 4;
- for (int i = 0; i < kWindowCount; i++) {
- tab_contents->AddConstrainedDialog(&window);
- }
- EXPECT_EQ(window.close_count, 0);
- delete tab_contents;
- EXPECT_EQ(window.close_count, kWindowCount);
-}

Powered by Google App Engine
This is Rietveld 408576698