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

Side by Side Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 2356053002: [HBD] Only use Plugin Content Settings for Flash. (Closed)
Patch Set: fix Created 4 years, 2 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 (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 <stddef.h> 5 #include <stddef.h>
6 #include <deque> 6 #include <deque>
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <unordered_map> 9 #include <unordered_map>
10 #include <utility> 10 #include <utility>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 #include "content/public/browser/render_frame_host.h" 84 #include "content/public/browser/render_frame_host.h"
85 #include "content/public/browser/render_process_host.h" 85 #include "content/public/browser/render_process_host.h"
86 #include "content/public/browser/render_view_host.h" 86 #include "content/public/browser/render_view_host.h"
87 #include "content/public/browser/site_instance.h" 87 #include "content/public/browser/site_instance.h"
88 #include "content/public/browser/web_contents.h" 88 #include "content/public/browser/web_contents.h"
89 #include "content/public/browser/web_contents_observer.h" 89 #include "content/public/browser/web_contents_observer.h"
90 #include "content/public/common/content_switches.h" 90 #include "content/public/common/content_switches.h"
91 #include "content/public/common/resource_request_body.h" 91 #include "content/public/common/resource_request_body.h"
92 #include "content/public/common/url_constants.h" 92 #include "content/public/common/url_constants.h"
93 #include "content/public/test/browser_test_utils.h" 93 #include "content/public/test/browser_test_utils.h"
94 #include "content/public/test/ppapi_test_utils.h"
94 #include "content/public/test/test_navigation_observer.h" 95 #include "content/public/test/test_navigation_observer.h"
95 #include "content/public/test/test_utils.h" 96 #include "content/public/test/test_utils.h"
96 #include "extensions/common/constants.h" 97 #include "extensions/common/constants.h"
97 #include "extensions/common/extension_urls.h" 98 #include "extensions/common/extension_urls.h"
98 #include "extensions/common/manifest_handlers/mime_types_handler.h" 99 #include "extensions/common/manifest_handlers/mime_types_handler.h"
99 #include "extensions/common/switches.h" 100 #include "extensions/common/switches.h"
100 #include "extensions/test/result_catcher.h" 101 #include "extensions/test/result_catcher.h"
101 #include "net/base/escape.h" 102 #include "net/base/escape.h"
102 #include "net/cert/x509_certificate.h" 103 #include "net/cert/x509_certificate.h"
103 #include "net/dns/mock_host_resolver.h" 104 #include "net/dns/mock_host_resolver.h"
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 : call_javascript_(true), 598 : call_javascript_(true),
598 check_load_events_(true), 599 check_load_events_(true),
599 loader_path_("/prerender/prerender_loader.html") {} 600 loader_path_("/prerender/prerender_loader.html") {}
600 601
601 ~PrerenderBrowserTest() override {} 602 ~PrerenderBrowserTest() override {}
602 603
603 void SetUpCommandLine(base::CommandLine* command_line) override { 604 void SetUpCommandLine(base::CommandLine* command_line) override {
604 PrerenderInProcessBrowserTest::SetUpCommandLine(command_line); 605 PrerenderInProcessBrowserTest::SetUpCommandLine(command_line);
605 command_line->AppendSwitchASCII(switches::kPrerenderMode, 606 command_line->AppendSwitchASCII(switches::kPrerenderMode,
606 switches::kPrerenderModeSwitchValueEnabled); 607 switches::kPrerenderModeSwitchValueEnabled);
608 ASSERT_TRUE(ppapi::RegisterPowerSaverTestPlugin(command_line));
raymes 2016/09/26 08:18:29 Hmm why is this needed?
raymes 2016/09/27 01:31:18 Just in case you missed this - it wasn't clear why
tommycli 2016/09/27 18:51:06 Done. The line in PrerenderTestUtils already cover
607 } 609 }
608 610
609 void NavigateToDestURL() const { 611 void NavigateToDestURL() const {
610 NavigateToDestURLWithDisposition(WindowOpenDisposition::CURRENT_TAB, true); 612 NavigateToDestURLWithDisposition(WindowOpenDisposition::CURRENT_TAB, true);
611 } 613 }
612 614
613 // Opens the url in a new tab, with no opener. 615 // Opens the url in a new tab, with no opener.
614 void NavigateToDestURLWithDisposition( 616 void NavigateToDestURLWithDisposition(
615 WindowOpenDisposition disposition, 617 WindowOpenDisposition disposition,
616 bool expect_swap_to_succeed) const { 618 bool expect_swap_to_succeed) const {
(...skipping 2744 matching lines...) Expand 10 before | Expand all | Expand 10 after
3361 browser()->tab_strip_model()->GetActiveWebContents(); 3363 browser()->tab_strip_model()->GetActiveWebContents();
3362 bool display_test_result = false; 3364 bool display_test_result = false;
3363 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents, 3365 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents,
3364 "DidDisplayReallyPass()", 3366 "DidDisplayReallyPass()",
3365 &display_test_result)); 3367 &display_test_result));
3366 ASSERT_TRUE(display_test_result); 3368 ASSERT_TRUE(display_test_result);
3367 } 3369 }
3368 #endif // !defined(DISABLE_NACL) 3370 #endif // !defined(DISABLE_NACL)
3369 3371
3370 } // namespace prerender 3372 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698