| 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 <tuple> | 7 #include <tuple> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 233 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
| 234 } | 234 } |
| 235 | 235 |
| 236 private: | 236 private: |
| 237 std::unique_ptr<InterstitialPageImpl> interstitial_; | 237 std::unique_ptr<InterstitialPageImpl> interstitial_; |
| 238 scoped_refptr<ClipboardMessageWatcher> clipboard_message_watcher_; | 238 scoped_refptr<ClipboardMessageWatcher> clipboard_message_watcher_; |
| 239 | 239 |
| 240 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImplTest); | 240 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImplTest); |
| 241 }; | 241 }; |
| 242 | 242 |
| 243 IN_PROC_BROWSER_TEST_F(InterstitialPageImplTest, Cut) { | 243 // Has errors on TSan. See https://crbug.com/631322. |
| 244 #if defined(THREAD_SANITIZER) |
| 245 #define MAYBE_Cut DISABLED_Cut |
| 246 #else |
| 247 #define MAYBE_Cut Cut |
| 248 #endif |
| 249 IN_PROC_BROWSER_TEST_F(InterstitialPageImplTest, MAYBE_Cut) { |
| 244 SetUpInterstitialPage(); | 250 SetUpInterstitialPage(); |
| 245 | 251 |
| 246 ASSERT_TRUE(CreateInputAndSetText("text-to-cut")); | 252 ASSERT_TRUE(CreateInputAndSetText("text-to-cut")); |
| 247 ASSERT_TRUE(FocusInputAndSelectText()); | 253 ASSERT_TRUE(FocusInputAndSelectText()); |
| 248 | 254 |
| 249 std::string clipboard_text = PerformCut(); | 255 std::string clipboard_text = PerformCut(); |
| 250 EXPECT_EQ("text-to-cut", clipboard_text); | 256 EXPECT_EQ("text-to-cut", clipboard_text); |
| 251 | 257 |
| 252 std::string input_text; | 258 std::string input_text; |
| 253 ASSERT_TRUE(GetInputText(&input_text)); | 259 ASSERT_TRUE(GetInputText(&input_text)); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 | 306 |
| 301 PerformSelectAll(); | 307 PerformSelectAll(); |
| 302 | 308 |
| 303 ASSERT_TRUE(GetSelection(&input_text)); | 309 ASSERT_TRUE(GetSelection(&input_text)); |
| 304 EXPECT_EQ("original body text", input_text); | 310 EXPECT_EQ("original body text", input_text); |
| 305 | 311 |
| 306 TearDownInterstitialPage(); | 312 TearDownInterstitialPage(); |
| 307 } | 313 } |
| 308 | 314 |
| 309 } // namespace content | 315 } // namespace content |
| OLD | NEW |