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

Unified Diff: ios/public/test/test_chrome_provider_initializer.cc

Issue 809333003: Upstream //ios/chrome/browser/translate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ios/public/test/test_chrome_provider_initializer.cc
diff --git a/ios/public/test/test_chrome_provider_initializer.cc b/ios/public/test/test_chrome_provider_initializer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..082a0a73bd2772bad672c0db717c75269d6d811d
--- /dev/null
+++ b/ios/public/test/test_chrome_provider_initializer.cc
@@ -0,0 +1,23 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ios/public/test/test_chrome_provider_initializer.h"
+
+#include "ios/public/test/test_chrome_browser_provider.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace ios {
+
+TestChromeProviderInitializer::TestChromeProviderInitializer() {
+ chrome_browser_provider_ = new TestChromeBrowserProvider();
+ ios::SetChromeBrowserProvider(chrome_browser_provider_);
+}
+
+TestChromeProviderInitializer::~TestChromeProviderInitializer() {
+ EXPECT_EQ(chrome_browser_provider_, ios::GetChromeBrowserProvider());
+ ios::SetChromeBrowserProvider(NULL);
+ delete chrome_browser_provider_;
Alexei Svitkine (slow) 2015/01/08 16:52:13 Nit: Maybe should be a scoped_ptr instead?
+}
+
+} // namespace ios

Powered by Google App Engine
This is Rietveld 408576698