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

Side by Side Diff: content/public/test/browser_test_utils.cc

Issue 2562713002: [DO NOT SUBMIT] Support allowpaymentrequest with out-of-process iframes (Closed)
Patch Set: Created 4 years 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 (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 "content/public/test/browser_test_utils.h" 5 #include "content/public/test/browser_test_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <tuple> 8 #include <tuple>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 } // namespace 421 } // namespace
422 422
423 bool NavigateIframeToURL(WebContents* web_contents, 423 bool NavigateIframeToURL(WebContents* web_contents,
424 std::string iframe_id, 424 std::string iframe_id,
425 const GURL& url) { 425 const GURL& url) {
426 std::string script = base::StringPrintf( 426 std::string script = base::StringPrintf(
427 "setTimeout(\"" 427 "setTimeout(\""
428 "var iframes = document.getElementById('%s');iframes.src='%s';" 428 "var iframes = document.getElementById('%s');iframes.src='%s';"
429 "\",0)", 429 "\",0)",
430 iframe_id.c_str(), url.spec().c_str()); 430 iframe_id.c_str(), url.spec().c_str());
431 LOG(ERROR) << script;
431 TestNavigationObserver load_observer(web_contents); 432 TestNavigationObserver load_observer(web_contents);
432 bool result = ExecuteScript(web_contents, script); 433 bool result = ExecuteScript(web_contents, script);
433 load_observer.Wait(); 434 load_observer.Wait();
434 return result; 435 return result;
435 } 436 }
436 437
437 GURL GetFileUrlWithQuery(const base::FilePath& path, 438 GURL GetFileUrlWithQuery(const base::FilePath& path,
438 const std::string& query_string) { 439 const std::string& query_string) {
439 GURL url = net::FilePathToFileURL(path); 440 GURL url = net::FilePathToFileURL(path);
440 if (!query_string.empty()) { 441 if (!query_string.empty()) {
(...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1836 IPC::IpcSecurityTestUtil::PwnMessageReceived( 1837 IPC::IpcSecurityTestUtil::PwnMessageReceived(
1837 process->GetChannel(), 1838 process->GetChannel(),
1838 FileSystemHostMsg_Write(request_id, file_path, blob_uuid, position)); 1839 FileSystemHostMsg_Write(request_id, file_path, blob_uuid, position));
1839 1840
1840 // If this started an async operation, wait for it to complete. 1841 // If this started an async operation, wait for it to complete.
1841 if (waiter.did_start_update()) 1842 if (waiter.did_start_update())
1842 waiter.WaitForEndUpdate(); 1843 waiter.WaitForEndUpdate();
1843 } 1844 }
1844 1845
1845 } // namespace content 1846 } // namespace content
OLDNEW
« no previous file with comments | « content/common/frame_owner_properties.cc ('k') | third_party/WebKit/Source/core/frame/FrameOwner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698