summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/webui/constrained_web_dialog_ui_browsertest.cc
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-13 15:46:40 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-13 15:46:40 +0000
commitfb0728cf1761403db3e2ded2c4cc9426b981b09b (patch)
tree2a540280f7fb5ae5a54fee827e1899b1b59a3985 /chrome/browser/ui/webui/constrained_web_dialog_ui_browsertest.cc
parent237c404691c13d4932e8b29198c6183b51479c09 (diff)
downloadchromium_src-fb0728cf1761403db3e2ded2c4cc9426b981b09b.zip
chromium_src-fb0728cf1761403db3e2ded2c4cc9426b981b09b.tar.gz
chromium_src-fb0728cf1761403db3e2ded2c4cc9426b981b09b.tar.bz2
TabContentsWrapper -> TabContents, part 56.
That's almost all. BUG=131026 TEST=no change Review URL: https://chromiumcodereview.appspot.com/10551002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141891 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/webui/constrained_web_dialog_ui_browsertest.cc')
-rw-r--r--chrome/browser/ui/webui/constrained_web_dialog_ui_browsertest.cc27
1 files changed, 14 insertions, 13 deletions
diff --git a/chrome/browser/ui/webui/constrained_web_dialog_ui_browsertest.cc b/chrome/browser/ui/webui/constrained_web_dialog_ui_browsertest.cc
index f7b4a23..10e43b9 100644
--- a/chrome/browser/ui/webui/constrained_web_dialog_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/constrained_web_dialog_ui_browsertest.cc
@@ -7,7 +7,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/constrained_window_tab_helper.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/webui/test_web_dialog_delegate.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
@@ -48,8 +48,9 @@ class ConstrainedWebDialogBrowserTest : public InProcessBrowserTest {
ConstrainedWebDialogBrowserTest() {}
protected:
- size_t GetConstrainedWindowCount(TabContentsWrapper* wrapper) const {
- return wrapper->constrained_window_tab_helper()->constrained_window_count();
+ size_t GetConstrainedWindowCount(TabContents* tab_contents) const {
+ return tab_contents->
+ constrained_window_tab_helper()->constrained_window_count();
}
};
@@ -58,17 +59,17 @@ IN_PROC_BROWSER_TEST_F(ConstrainedWebDialogBrowserTest, BasicTest) {
// The delegate deletes itself.
WebDialogDelegate* delegate = new test::TestWebDialogDelegate(
GURL(chrome::kChromeUIConstrainedHTMLTestURL));
- TabContentsWrapper* wrapper = browser()->GetSelectedTabContentsWrapper();
- ASSERT_TRUE(wrapper);
+ TabContents* tab_contents = browser()->GetActiveTabContents();
+ ASSERT_TRUE(tab_contents);
ConstrainedWebDialogDelegate* dialog_delegate =
ui::CreateConstrainedWebDialog(browser()->profile(),
delegate,
NULL,
- wrapper);
+ tab_contents);
ASSERT_TRUE(dialog_delegate);
EXPECT_TRUE(dialog_delegate->window());
- EXPECT_EQ(1U, GetConstrainedWindowCount(wrapper));
+ EXPECT_EQ(1U, GetConstrainedWindowCount(tab_contents));
}
// Tests that ReleaseTabContentsOnDialogClose() works.
@@ -77,25 +78,25 @@ IN_PROC_BROWSER_TEST_F(ConstrainedWebDialogBrowserTest,
// The delegate deletes itself.
WebDialogDelegate* delegate = new test::TestWebDialogDelegate(
GURL(chrome::kChromeUIConstrainedHTMLTestURL));
- TabContentsWrapper* wrapper = browser()->GetSelectedTabContentsWrapper();
- ASSERT_TRUE(wrapper);
+ TabContents* tab_contents = browser()->GetActiveTabContents();
+ ASSERT_TRUE(tab_contents);
ConstrainedWebDialogDelegate* dialog_delegate =
ui::CreateConstrainedWebDialog(browser()->profile(),
delegate,
NULL,
- wrapper);
+ tab_contents);
ASSERT_TRUE(dialog_delegate);
- scoped_ptr<TabContentsWrapper> new_tab(dialog_delegate->tab());
+ scoped_ptr<TabContents> new_tab(dialog_delegate->tab());
ASSERT_TRUE(new_tab.get());
- ASSERT_EQ(1U, GetConstrainedWindowCount(wrapper));
+ ASSERT_EQ(1U, GetConstrainedWindowCount(tab_contents));
ConstrainedWebDialogBrowserTestObserver observer(new_tab->web_contents());
dialog_delegate->ReleaseTabContentsOnDialogClose();
dialog_delegate->OnDialogCloseFromWebUI();
ASSERT_FALSE(observer.tab_destroyed());
- EXPECT_EQ(0U, GetConstrainedWindowCount(wrapper));
+ EXPECT_EQ(0U, GetConstrainedWindowCount(tab_contents));
new_tab.reset();
EXPECT_TRUE(observer.tab_destroyed());
}