Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: content/renderer/render_view_browsertest.cc

Issue 2193033004: Restore the collapsed spaces of the text when we copy it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test fails Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <tuple> 7 #include <tuple>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 view()->webview()->findFrameByName("frame"))); 1725 view()->webview()->findFrameByName("frame")));
1726 subframe->Navigate(common_params, StartNavigationParams(), request_params); 1726 subframe->Navigate(common_params, StartNavigationParams(), request_params);
1727 FrameLoadWaiter(subframe).Wait(); 1727 FrameLoadWaiter(subframe).Wait();
1728 1728
1729 // Copy the document content to std::wstring and compare with the 1729 // Copy the document content to std::wstring and compare with the
1730 // expected result. 1730 // expected result.
1731 const int kMaxOutputCharacters = 256; 1731 const int kMaxOutputCharacters = 256;
1732 std::string output = base::UTF16ToUTF8( 1732 std::string output = base::UTF16ToUTF8(
1733 base::StringPiece16(WebFrameContentDumper::dumpWebViewAsText( 1733 base::StringPiece16(WebFrameContentDumper::dumpWebViewAsText(
1734 view()->GetWebView(), kMaxOutputCharacters))); 1734 view()->GetWebView(), kMaxOutputCharacters)));
1735 EXPECT_EQ(output, "hello \n\nworld"); 1735 EXPECT_EQ(output, "hello \n\nworld");
1736 } 1736 }
1737 1737
1738 // This test ensures that a RenderFrame object is created for the top level 1738 // This test ensures that a RenderFrame object is created for the top level
1739 // frame in the RenderView. 1739 // frame in the RenderView.
1740 TEST_F(RenderViewImplTest, BasicRenderFrame) { 1740 TEST_F(RenderViewImplTest, BasicRenderFrame) {
1741 EXPECT_TRUE(view()->main_render_frame_); 1741 EXPECT_TRUE(view()->main_render_frame_);
1742 } 1742 }
1743 1743
1744 TEST_F(RenderViewImplTest, MessageOrderInDidChangeSelection) { 1744 TEST_F(RenderViewImplTest, MessageOrderInDidChangeSelection) {
1745 LoadHTML("<textarea id=\"test\"></textarea>"); 1745 LoadHTML("<textarea id=\"test\"></textarea>");
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
2480 ExpectPauseAndResume(3); 2480 ExpectPauseAndResume(3);
2481 blink::WebScriptSource source2( 2481 blink::WebScriptSource source2(
2482 WebString::fromUTF8("function func2() { func1(); }; func2();")); 2482 WebString::fromUTF8("function func2() { func1(); }; func2();"));
2483 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); 2483 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1);
2484 2484
2485 EXPECT_FALSE(IsPaused()); 2485 EXPECT_FALSE(IsPaused());
2486 Detach(); 2486 Detach();
2487 } 2487 }
2488 2488
2489 } // namespace content 2489 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698