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

Side by Side Diff: chrome/browser/pdf/pdf_extension_test_util.cc

Issue 1237343002: Fix nested GuestView's container bounds calculation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix type mismatch for win_x64 compile Created 5 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
« no previous file with comments | « chrome/browser/pdf/pdf_extension_test_util.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/pdf/pdf_extension_test_util.h"
6
7 #include "content/public/test/browser_test_utils.h"
8 #include "grit/component_extension_resources.h"
9 #include "ui/base/resource/resource_bundle.h"
10
11 namespace pdf_extension_test_util {
12
13 bool EnsurePDFHasLoaded(content::WebContents* web_contents) {
14 std::string scripting_api_js =
15 ResourceBundle::GetSharedInstance()
16 .GetRawDataResource(IDR_PDF_PDF_SCRIPTING_API_JS)
17 .as_string();
18 CHECK(content::ExecuteScript(web_contents, scripting_api_js));
19
20 bool load_success = false;
21 CHECK(content::ExecuteScriptAndExtractBool(
22 web_contents,
23 "var scriptingAPI = new PDFScriptingAPI(window, "
24 " document.getElementsByTagName('embed')[0]);"
25 "scriptingAPI.setLoadCallback(function(success) {"
26 " window.domAutomationController.send(success);"
27 "});",
28 &load_success));
29 return load_success;
30 }
31
32 } // namespace pdf_extension_test_util
OLDNEW
« no previous file with comments | « chrome/browser/pdf/pdf_extension_test_util.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698