diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-08 02:06:42 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-08 02:06:42 +0000 |
commit | fc25aab270029d68109c4a1cc99bdc1e46f3c03b (patch) | |
tree | ed31e7a7898012fe968fd88580f6beeea5e77470 /views/view_unittest.cc | |
parent | ea2a98d772631f7a853875139f9147572f8f11eb (diff) | |
download | chromium_src-fc25aab270029d68109c4a1cc99bdc1e46f3c03b.zip chromium_src-fc25aab270029d68109c4a1cc99bdc1e46f3c03b.tar.gz chromium_src-fc25aab270029d68109c4a1cc99bdc1e46f3c03b.tar.bz2 |
A new DEPS file for views, designed to reduce dependencies. Removes some unnecessary includes too.
http://crbug.com/11387
Review URL: http://codereview.chromium.org/115114
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view_unittest.cc')
-rw-r--r-- | views/view_unittest.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/views/view_unittest.cc b/views/view_unittest.cc index d509940e..11d5821 100644 --- a/views/view_unittest.cc +++ b/views/view_unittest.cc @@ -6,8 +6,6 @@ #include "app/gfx/path.h" #include "base/clipboard.h" #include "base/message_loop.h" -#include "chrome/browser/browser_process.h" -#include "chrome/common/notification_service.h" #include "testing/gtest/include/gtest/gtest.h" #include "views/background.h" #include "views/controls/button/checkbox.h" @@ -601,7 +599,7 @@ TEST_F(ViewTest, TextFieldCutCopyPaste) { const std::wstring kReadOnlyText = L"Read only"; const std::wstring kPasswordText = L"Password! ** Secret stuff **"; - Clipboard* clipboard = g_browser_process->clipboard(); + Clipboard clipboard; WidgetWin* window = new WidgetWin; window->Init(NULL, gfx::Rect(0, 0, 100, 100), true); @@ -628,7 +626,7 @@ TEST_F(ViewTest, TextFieldCutCopyPaste) { ::SendMessage(normal->GetNativeComponent(), WM_CUT, 0, 0); string16 result; - clipboard->ReadText(&result); + clipboard.ReadText(&result); EXPECT_EQ(kNormalText, result); normal->SetText(kNormalText); // Let's revert to the original content. @@ -636,7 +634,7 @@ TEST_F(ViewTest, TextFieldCutCopyPaste) { read_only->SelectAll(); ::SendMessage(read_only->GetNativeComponent(), WM_CUT, 0, 0); result.clear(); - clipboard->ReadText(&result); + clipboard.ReadText(&result); // Cut should have failed, so the clipboard content should not have changed. EXPECT_EQ(kNormalText, result); @@ -644,7 +642,7 @@ TEST_F(ViewTest, TextFieldCutCopyPaste) { password->SelectAll(); ::SendMessage(password->GetNativeComponent(), WM_CUT, 0, 0); result.clear(); - clipboard->ReadText(&result); + clipboard.ReadText(&result); // Cut should have failed, so the clipboard content should not have changed. EXPECT_EQ(kNormalText, result); @@ -657,19 +655,19 @@ TEST_F(ViewTest, TextFieldCutCopyPaste) { read_only->SelectAll(); ::SendMessage(read_only->GetNativeComponent(), WM_COPY, 0, 0); result.clear(); - clipboard->ReadText(&result); + clipboard.ReadText(&result); EXPECT_EQ(kReadOnlyText, result); normal->SelectAll(); ::SendMessage(normal->GetNativeComponent(), WM_COPY, 0, 0); result.clear(); - clipboard->ReadText(&result); + clipboard.ReadText(&result); EXPECT_EQ(kNormalText, result); password->SelectAll(); ::SendMessage(password->GetNativeComponent(), WM_COPY, 0, 0); result.clear(); - clipboard->ReadText(&result); + clipboard.ReadText(&result); // We don't let you copy from a password field, clipboard should not have // changed. EXPECT_EQ(kNormalText, result); |