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

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

Issue 120513004: Don't expose DocumentWriter to embedding layer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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/WebPagePopupImpl.cpp ('k') | no next file » | 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, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 WebViewImpl* webViewImpl = m_webViewHelper.initialize(true, 0, &client); 1207 WebViewImpl* webViewImpl = m_webViewHelper.initialize(true, 0, &client);
1208 1208
1209 WebFrameImpl* frame = toWebFrameImpl(webViewImpl->mainFrame()); 1209 WebFrameImpl* frame = toWebFrameImpl(webViewImpl->mainFrame());
1210 client.setWebFrameClient(frame->client()); 1210 client.setWebFrameClient(frame->client());
1211 1211
1212 WebHelperPluginImpl* helperPlugin = webViewImpl->createHelperPlugin("dummy-p lugin-type", frame->document()); 1212 WebHelperPluginImpl* helperPlugin = webViewImpl->createHelperPlugin("dummy-p lugin-type", frame->document());
1213 EXPECT_TRUE(helperPlugin); 1213 EXPECT_TRUE(helperPlugin);
1214 EXPECT_EQ(0, helperPlugin->getPlugin()); // Invalid plugin type means no plu gin. 1214 EXPECT_EQ(0, helperPlugin->getPlugin()); // Invalid plugin type means no plu gin.
1215 1215
1216 webViewImpl->closeHelperPluginSoon(helperPlugin); 1216 webViewImpl->closeHelperPluginSoon(helperPlugin);
1217 runPendingTasks();
1217 1218
1218 m_webViewHelper.reset(); // Explicitly reset to break dependency on locally scoped client. 1219 m_webViewHelper.reset(); // Explicitly reset to break dependency on locally scoped client.
1219 } 1220 }
1220 1221
1221 1222
1222 class ViewCreatingWebViewClient : public WebViewClient { 1223 class ViewCreatingWebViewClient : public WebViewClient {
1223 public: 1224 public:
1224 ViewCreatingWebViewClient() 1225 ViewCreatingWebViewClient()
1225 : m_didFocusCalled(false) 1226 : m_didFocusCalled(false)
1226 { 1227 {
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "smartclip. html"); 1404 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "smartclip. html");
1404 webView->resize(WebSize(500, 500)); 1405 webView->resize(WebSize(500, 500));
1405 webView->layout(); 1406 webView->layout();
1406 WebRect cropRect(300, 125, 100, 50); 1407 WebRect cropRect(300, 125, 100, 50);
1407 1408
1408 // FIXME: We should test the structure of the data we get back. 1409 // FIXME: We should test the structure of the data we get back.
1409 EXPECT_FALSE(webView->getSmartClipData(cropRect).isEmpty()); 1410 EXPECT_FALSE(webView->getSmartClipData(cropRect).isEmpty());
1410 } 1411 }
1411 1412
1412 } 1413 }
OLDNEW
« no previous file with comments | « Source/web/WebPagePopupImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698