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

Side by Side Diff: chrome/browser/chromeos/certificate_provider/certificate_provider_service_unittest.cc

Issue 2094333002: Implementation for chrome.certificateProvider.requestPin/stopPinRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implemented review comments Created 4 years, 3 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 2015 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/chromeos/certificate_provider/certificate_provider_serv ice.h" 5 #include "chrome/browser/chromeos/certificate_provider/certificate_provider_serv ice.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 // unloaded. 478 // unloaded.
479 EXPECT_EQ(net::OK, error); 479 EXPECT_EQ(net::OK, error);
480 480
481 // Unload the extension. 481 // Unload the extension.
482 service_->OnExtensionUnloaded(kExtension1); 482 service_->OnExtensionUnloaded(kExtension1);
483 483
484 task_runner_->RunUntilIdle(); 484 task_runner_->RunUntilIdle();
485 EXPECT_EQ(net::ERR_FAILED, error); 485 EXPECT_EQ(net::ERR_FAILED, error);
486 } 486 }
487 487
488 TEST_F(CertificateProviderServiceTest, CloseDialogNoExtension) {
489 bool closed = service_->CloseDialog(std::string("extension_id"));
490 ASSERT_FALSE(closed);
emaxx 2016/09/06 15:02:11 nit: It's usually preferable to choose the EXPECT_
491 }
492
493 TEST_F(CertificateProviderServiceTest, LastDialogClosed) {
494 std::string extension_id("extension_id");
495 service_->OnPinDialogInput(extension_id, true);
496 ASSERT_TRUE(service_->LastPinDialogClosed(extension_id));
497 }
498
488 } // namespace chromeos 499 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698