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

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

Issue 2469353003: Skip base::string16 if not necessary for WebString <-> ASCII conversion (Closed)
Patch Set: minor fix Created 4 years, 1 month 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
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after
1808 common_params.navigation_type = FrameMsg_Navigate_Type::NORMAL; 1808 common_params.navigation_type = FrameMsg_Navigate_Type::NORMAL;
1809 common_params.url = GURL("data:text/html,test data"); 1809 common_params.url = GURL("data:text/html,test data");
1810 TestRenderFrame* main_frame = static_cast<TestRenderFrame*>(frame()); 1810 TestRenderFrame* main_frame = static_cast<TestRenderFrame*>(frame());
1811 main_frame->Navigate(common_params, StartNavigationParams(), 1811 main_frame->Navigate(common_params, StartNavigationParams(),
1812 RequestNavigationParams()); 1812 RequestNavigationParams());
1813 1813
1814 // An error occurred. 1814 // An error occurred.
1815 main_frame->didFailProvisionalLoad(web_frame, error, 1815 main_frame->didFailProvisionalLoad(web_frame, error,
1816 blink::WebStandardCommit); 1816 blink::WebStandardCommit);
1817 const int kMaxOutputCharacters = 22; 1817 const int kMaxOutputCharacters = 22;
1818 EXPECT_EQ("", base::UTF16ToASCII(base::StringPiece16( 1818 EXPECT_EQ("", WebFrameContentDumper::dumpWebViewAsText(view()->GetWebView(),
1819 WebFrameContentDumper::dumpWebViewAsText( 1819 kMaxOutputCharacters)
1820 view()->GetWebView(), kMaxOutputCharacters)))); 1820 .ascii());
1821 } 1821 }
1822 1822
1823 #if defined(OS_ANDROID) 1823 #if defined(OS_ANDROID)
1824 // Crashing on Android: http://crbug.com/311341 1824 // Crashing on Android: http://crbug.com/311341
1825 #define MAYBE_DoesNotSuppress DISABLED_DoesNotSuppress 1825 #define MAYBE_DoesNotSuppress DISABLED_DoesNotSuppress
1826 #else 1826 #else
1827 #define MAYBE_DoesNotSuppress DoesNotSuppress 1827 #define MAYBE_DoesNotSuppress DoesNotSuppress
1828 #endif 1828 #endif
1829 1829
1830 TEST_F(RendererErrorPageTest, MAYBE_DoesNotSuppress) { 1830 TEST_F(RendererErrorPageTest, MAYBE_DoesNotSuppress) {
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
2513 ExpectPauseAndResume(3); 2513 ExpectPauseAndResume(3);
2514 blink::WebScriptSource source2( 2514 blink::WebScriptSource source2(
2515 WebString::fromUTF8("function func2() { func1(); }; func2();")); 2515 WebString::fromUTF8("function func2() { func1(); }; func2();"));
2516 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); 2516 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1);
2517 2517
2518 EXPECT_FALSE(IsPaused()); 2518 EXPECT_FALSE(IsPaused());
2519 Detach(); 2519 Detach();
2520 } 2520 }
2521 2521
2522 } // namespace content 2522 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698