Fix flakyness with TextfieldViewsModelTest.Clipboard.

Set the clipboard text initially rather than using
whatever happened to be in the clipboard at the time
of the test.

BUG=none
TEST=Copy some non-ASCII text before running TextfieldViewsModelTest.Clipboard.
Then, run the test. It should not fail.

Review URL: http://codereview.chromium.org/8486024

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110434 0039d316-1c4b-4281-b951-d872f2087c98
parent 1d37bd41
......@@ -510,8 +510,9 @@ TEST_F(TextfieldViewsModelTest, SetText) {
TEST_F(TextfieldViewsModelTest, MAYBE_Clipboard) {
ui::Clipboard* clipboard
= views::ViewsDelegate::views_delegate->GetClipboard();
string16 initial_clipboard_text;
clipboard->ReadText(ui::Clipboard::BUFFER_STANDARD, &initial_clipboard_text);
string16 initial_clipboard_text = ASCIIToUTF16("initial text");
ui::ScopedClipboardWriter(clipboard).WriteText(initial_clipboard_text);
string16 clipboard_text;
TextfieldViewsModel model(NULL);
model.Append(ASCIIToUTF16("HELLO WORLD"));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment