OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/browser/frame_host/interstitial_page_impl.h" | 5 #include "content/browser/frame_host/interstitial_page_impl.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "base/synchronization/waitable_event.h" | 8 #include "base/synchronization/waitable_event.h" |
9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
10 #include "content/common/clipboard_messages.h" | 10 #include "content/common/clipboard_messages.h" |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 std::string clipboard_text = PerformCopy(); | 342 std::string clipboard_text = PerformCopy(); |
343 EXPECT_EQ("text-to-copy", clipboard_text); | 343 EXPECT_EQ("text-to-copy", clipboard_text); |
344 | 344 |
345 std::string input_text; | 345 std::string input_text; |
346 ASSERT_TRUE(GetInputText(&input_text)); | 346 ASSERT_TRUE(GetInputText(&input_text)); |
347 EXPECT_EQ("text-to-copy", input_text); | 347 EXPECT_EQ("text-to-copy", input_text); |
348 | 348 |
349 TearDownInterstitialPage(); | 349 TearDownInterstitialPage(); |
350 } | 350 } |
351 | 351 |
352 IN_PROC_BROWSER_TEST_F(InterstitialPageImplTest, Paste) { | 352 // Failing on msan bot: crbug.com/506921 |
| 353 #if defined(MEMORY_SANITIZER) |
| 354 #define MAYBE_Paste DISABLED_Paste |
| 355 #else |
| 356 #define MAYBE_Paste Paste |
| 357 #endif |
| 358 |
| 359 IN_PROC_BROWSER_TEST_F(InterstitialPageImplTest, MAYBE_Paste) { |
353 SetUpTestClipboard(); | 360 SetUpTestClipboard(); |
354 SetUpInterstitialPage(); | 361 SetUpInterstitialPage(); |
355 | 362 |
356 SetClipboardText("text-to-paste"); | 363 SetClipboardText("text-to-paste"); |
357 | 364 |
358 ASSERT_TRUE(SetInputText(std::string())); | 365 ASSERT_TRUE(SetInputText(std::string())); |
359 ASSERT_TRUE(FocusInputAndSelectText()); | 366 ASSERT_TRUE(FocusInputAndSelectText()); |
360 | 367 |
361 PerformPaste(); | 368 PerformPaste(); |
362 | 369 |
363 std::string input_text; | 370 std::string input_text; |
364 ASSERT_TRUE(GetInputText(&input_text)); | 371 ASSERT_TRUE(GetInputText(&input_text)); |
365 EXPECT_EQ("text-to-paste", input_text); | 372 EXPECT_EQ("text-to-paste", input_text); |
366 | 373 |
367 TearDownInterstitialPage(); | 374 TearDownInterstitialPage(); |
368 TearDownTestClipboard(); | 375 TearDownTestClipboard(); |
369 } | 376 } |
370 | 377 |
371 } // namespace content | 378 } // namespace content |
OLD | NEW |