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

Side by Side Diff: Source/web/tests/FrameTestHelpers.cpp

Issue 1132133009: Plumb whether or not a frame is in shadow DOM to the embedder. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebRemoteFrameImpl.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 #include "platform/testing/UnitTestHelpers.h" 35 #include "platform/testing/UnitTestHelpers.h"
36 #include "public/platform/Platform.h" 36 #include "public/platform/Platform.h"
37 #include "public/platform/WebData.h" 37 #include "public/platform/WebData.h"
38 #include "public/platform/WebString.h" 38 #include "public/platform/WebString.h"
39 #include "public/platform/WebThread.h" 39 #include "public/platform/WebThread.h"
40 #include "public/platform/WebURLRequest.h" 40 #include "public/platform/WebURLRequest.h"
41 #include "public/platform/WebURLResponse.h" 41 #include "public/platform/WebURLResponse.h"
42 #include "public/platform/WebUnitTestSupport.h" 42 #include "public/platform/WebUnitTestSupport.h"
43 #include "public/web/WebRemoteFrame.h" 43 #include "public/web/WebRemoteFrame.h"
44 #include "public/web/WebSettings.h" 44 #include "public/web/WebSettings.h"
45 #include "public/web/WebTreeScopeType.h"
45 #include "public/web/WebViewClient.h" 46 #include "public/web/WebViewClient.h"
46 #include "web/WebLocalFrameImpl.h" 47 #include "web/WebLocalFrameImpl.h"
47 #include "wtf/StdLibExtras.h" 48 #include "wtf/StdLibExtras.h"
48 49
49 namespace blink { 50 namespace blink {
50 namespace FrameTestHelpers { 51 namespace FrameTestHelpers {
51 52
52 namespace { 53 namespace {
53 54
54 // The frame test helpers coordinate frame loads in a carefully choreographed 55 // The frame test helpers coordinate frame loads in a carefully choreographed
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 if (!webViewClient) 248 if (!webViewClient)
248 webViewClient = defaultWebViewClient(); 249 webViewClient = defaultWebViewClient();
249 m_webView = WebViewImpl::create(webViewClient); 250 m_webView = WebViewImpl::create(webViewClient);
250 m_webView->settings()->setJavaScriptEnabled(enableJavascript); 251 m_webView->settings()->setJavaScriptEnabled(enableJavascript);
251 if (updateSettingsFunc) 252 if (updateSettingsFunc)
252 updateSettingsFunc(m_webView->settings()); 253 updateSettingsFunc(m_webView->settings());
253 else 254 else
254 m_webView->settings()->setDeviceSupportsMouse(false); 255 m_webView->settings()->setDeviceSupportsMouse(false);
255 256
256 m_webView->setDefaultPageScaleLimits(1, 4); 257 m_webView->setDefaultPageScaleLimits(1, 4);
257 m_webView->setMainFrame(WebLocalFrameImpl::create(webFrameClient)); 258 m_webView->setMainFrame(WebLocalFrameImpl::create(WebTreeScopeType::Document , webFrameClient));
258 259
259 return m_webView; 260 return m_webView;
260 } 261 }
261 262
262 WebViewImpl* WebViewHelper::initializeAndLoad(const std::string& url, bool enabl eJavascript, TestWebFrameClient* webFrameClient, WebViewClient* webViewClient, v oid (*updateSettingsFunc)(WebSettings*)) 263 WebViewImpl* WebViewHelper::initializeAndLoad(const std::string& url, bool enabl eJavascript, TestWebFrameClient* webFrameClient, WebViewClient* webViewClient, v oid (*updateSettingsFunc)(WebSettings*))
263 { 264 {
264 initialize(enableJavascript, webFrameClient, webViewClient, updateSettingsFu nc); 265 initialize(enableJavascript, webFrameClient, webViewClient, updateSettingsFu nc);
265 266
266 loadFrame(webView()->mainFrame(), url); 267 loadFrame(webView()->mainFrame(), url);
267 268
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 } 335 }
335 336
336 void TestWebViewClient::initializeLayerTreeView() 337 void TestWebViewClient::initializeLayerTreeView()
337 { 338 {
338 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay erTreeViewForTesting()); 339 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay erTreeViewForTesting());
339 ASSERT(m_layerTreeView); 340 ASSERT(m_layerTreeView);
340 } 341 }
341 342
342 } // namespace FrameTestHelpers 343 } // namespace FrameTestHelpers
343 } // namespace blink 344 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebRemoteFrameImpl.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698