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: third_party/WebKit/Source/web/tests/sim/SimTest.cpp

Issue 2140523002: Remove WebURLRequest::initialize() and simplify WebURLRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mutable ref Created 4 years, 5 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 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 "web/tests/sim/SimTest.h" 5 #include "web/tests/sim/SimTest.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "platform/LayoutTestSupport.h" 8 #include "platform/LayoutTestSupport.h"
9 #include "platform/scroll/ScrollbarTheme.h" 9 #include "platform/scroll/ScrollbarTheme.h"
10 #include "public/platform/WebSecurityOrigin.h" 10 #include "public/platform/WebSecurityOrigin.h"
(...skipping 23 matching lines...) Expand all
34 { 34 {
35 Document::setThreadedParsingEnabledForTesting(true); 35 Document::setThreadedParsingEnabledForTesting(true);
36 LayoutTestSupport::setMockThemeEnabledForTest(false); 36 LayoutTestSupport::setMockThemeEnabledForTest(false);
37 ScrollbarTheme::setMockScrollbarsEnabled(false); 37 ScrollbarTheme::setMockScrollbarsEnabled(false);
38 WebCache::clear(); 38 WebCache::clear();
39 } 39 }
40 40
41 void SimTest::loadURL(const String& url) 41 void SimTest::loadURL(const String& url)
42 { 42 {
43 WebURLRequest request; 43 WebURLRequest request;
44 request.initialize();
45 request.setURL(KURL(ParsedURLString, url)); 44 request.setURL(KURL(ParsedURLString, url));
46 request.setRequestorOrigin(WebSecurityOrigin::createUnique()); 45 request.setRequestorOrigin(WebSecurityOrigin::createUnique());
47 webView().mainFrameImpl()->loadRequest(request); 46 webView().mainFrameImpl()->loadRequest(request);
48 } 47 }
49 48
50 Document& SimTest::document() 49 Document& SimTest::document()
51 { 50 {
52 return *webView().mainFrameImpl()->frame()->document(); 51 return *webView().mainFrameImpl()->frame()->document();
53 } 52 }
54 53
55 WebViewImpl& SimTest::webView() 54 WebViewImpl& SimTest::webView()
56 { 55 {
57 return *m_webViewHelper.webViewImpl(); 56 return *m_webViewHelper.webViewImpl();
58 } 57 }
59 58
60 const SimWebViewClient& SimTest::webViewClient() const 59 const SimWebViewClient& SimTest::webViewClient() const
61 { 60 {
62 return m_webViewClient; 61 return m_webViewClient;
63 } 62 }
64 63
65 SimCompositor& SimTest::compositor() 64 SimCompositor& SimTest::compositor()
66 { 65 {
67 return m_compositor; 66 return m_compositor;
68 } 67 }
69 68
70 } // namespace blink 69 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebViewTest.cpp ('k') | third_party/WebKit/public/platform/WebURLRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698