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

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

Issue 2270463003: Turn on enforce-in-pdf Clang plugin flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win clang Created 4 years, 4 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 | « build/config/clang/BUILD.gn ('k') | pdf/paint_aggregator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/files/file_enumerator.h" 10 #include "base/files/file_enumerator.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 LoadAllPdfsTest("pdf_private", GetParam()); 290 LoadAllPdfsTest("pdf_private", GetParam());
291 #endif 291 #endif
292 // Load public PDFs. 292 // Load public PDFs.
293 LoadAllPdfsTest("pdf", GetParam()); 293 LoadAllPdfsTest("pdf", GetParam());
294 } 294 }
295 295
296 class DisablePluginHelper : public content::DownloadManager::Observer, 296 class DisablePluginHelper : public content::DownloadManager::Observer,
297 public content::NotificationObserver { 297 public content::NotificationObserver {
298 public: 298 public:
299 DisablePluginHelper() {} 299 DisablePluginHelper() {}
300 300 ~DisablePluginHelper() override {}
301 virtual ~DisablePluginHelper() {}
302 301
303 void DisablePlugin(Profile* profile) { 302 void DisablePlugin(Profile* profile) {
304 registrar_.Add(this, chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, 303 registrar_.Add(this, chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED,
305 content::Source<Profile>(profile)); 304 content::Source<Profile>(profile));
306 scoped_refptr<PluginPrefs> prefs(PluginPrefs::GetForProfile(profile)); 305 scoped_refptr<PluginPrefs> prefs(PluginPrefs::GetForProfile(profile));
307 DCHECK(prefs.get()); 306 DCHECK(prefs.get());
308 prefs->EnablePluginGroup( 307 prefs->EnablePluginGroup(
309 false, base::UTF8ToUTF16(ChromeContentClient::kPDFPluginName)); 308 false, base::UTF8ToUTF16(ChromeContentClient::kPDFPluginName));
310 // Wait until the plugin has been disabled. 309 // Wait until the plugin has been disabled.
311 disable_run_loop_.Run(); 310 disable_run_loop_.Run();
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 int tab_count = browser()->tab_strip_model()->count(); 850 int tab_count = browser()->tab_strip_model()->count();
852 ASSERT_EQ(2, tab_count); 851 ASSERT_EQ(2, tab_count);
853 852
854 content::WebContents* active_web_contents = 853 content::WebContents* active_web_contents =
855 browser()->tab_strip_model()->GetActiveWebContents(); 854 browser()->tab_strip_model()->GetActiveWebContents();
856 ASSERT_NE(web_contents, active_web_contents); 855 ASSERT_NE(web_contents, active_web_contents);
857 856
858 const GURL& url = active_web_contents->GetURL(); 857 const GURL& url = active_web_contents->GetURL();
859 ASSERT_EQ(std::string("http://www.example.com/"), url.spec()); 858 ASSERT_EQ(std::string("http://www.example.com/"), url.spec());
860 } 859 }
OLDNEW
« no previous file with comments | « build/config/clang/BUILD.gn ('k') | pdf/paint_aggregator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698