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

Side by Side Diff: chrome/browser/extensions/content_verifier_browsertest.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 years, 8 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 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 <list> 5 #include <list>
6 #include <set> 6 #include <set>
7 #include <string> 7 #include <string>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/scoped_observer.h" 10 #include "base/scoped_observer.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 int reasons = prefs->GetDisableReasons(id); 299 int reasons = prefs->GetDisableReasons(id);
300 EXPECT_TRUE(reasons & Extension::DISABLE_CORRUPTED); 300 EXPECT_TRUE(reasons & Extension::DISABLE_CORRUPTED);
301 301
302 // This needs to happen before the ExtensionRegistry gets deleted, which 302 // This needs to happen before the ExtensionRegistry gets deleted, which
303 // happens before TearDownOnMainThread is called. 303 // happens before TearDownOnMainThread is called.
304 unload_observer_.reset(); 304 unload_observer_.reset();
305 } 305 }
306 306
307 protected: 307 protected:
308 JobDelegate delegate_; 308 JobDelegate delegate_;
309 scoped_ptr<UnloadObserver> unload_observer_; 309 std::unique_ptr<UnloadObserver> unload_observer_;
310 GURL page_url_; 310 GURL page_url_;
311 }; 311 };
312 312
313 IN_PROC_BROWSER_TEST_F(ContentVerifierTest, FailOnRead) { 313 IN_PROC_BROWSER_TEST_F(ContentVerifierTest, FailOnRead) {
314 EXPECT_EQ(0, delegate_.bytes_read_failed()); 314 EXPECT_EQ(0, delegate_.bytes_read_failed());
315 delegate_.fail_next_read(); 315 delegate_.fail_next_read();
316 OpenPageAndWaitForUnload(); 316 OpenPageAndWaitForUnload();
317 EXPECT_EQ(1, delegate_.bytes_read_failed()); 317 EXPECT_EQ(1, delegate_.bytes_read_failed());
318 } 318 }
319 319
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 job_observer.ExpectJobResult(id, 417 job_observer.ExpectJobResult(id,
418 base::FilePath(FILE_PATH_LITERAL("script.js")), 418 base::FilePath(FILE_PATH_LITERAL("script.js")),
419 JobObserver::Result::FAILURE); 419 JobObserver::Result::FAILURE);
420 EnableExtension(id); 420 EnableExtension(id);
421 EXPECT_TRUE(job_observer.WaitForExpectedJobs()); 421 EXPECT_TRUE(job_observer.WaitForExpectedJobs());
422 422
423 ContentVerifyJob::SetObserverForTests(NULL); 423 ContentVerifyJob::SetObserverForTests(NULL);
424 } 424 }
425 425
426 } // namespace extensions 426 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/content_script_apitest.cc ('k') | chrome/browser/extensions/context_menu_matcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698