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

Unified Diff: chrome/browser/extensions/system/system_apitest.cc

Issue 12089062: Move API functions registrations out of ExtensionFunctionRegistry. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « chrome/browser/extensions/system/system_api.cc ('k') | chrome/browser/infobars/infobar_extension_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/system/system_apitest.cc
===================================================================
--- chrome/browser/extensions/system/system_apitest.cc (revision 181773)
+++ chrome/browser/extensions/system/system_apitest.cc (working copy)
@@ -1,72 +0,0 @@
-// Copyright (c) 2012 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 "base/prefs/pref_service.h"
-#include "chrome/browser/extensions/extension_apitest.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/browser.h"
-#include "chrome/common/pref_names.h"
-
-#if defined(OS_CHROMEOS)
-#include "chromeos/dbus/mock_dbus_thread_manager.h"
-#include "chromeos/dbus/mock_update_engine_client.h"
-
-using chromeos::UpdateEngineClient;
-using ::testing::Return;
-#endif
-
-IN_PROC_BROWSER_TEST_F(ExtensionApiTest, GetIncognitoModeAvailability) {
- PrefService* pref_service = browser()->profile()->GetPrefs();
- pref_service->SetInteger(prefs::kIncognitoModeAvailability, 1);
-
- EXPECT_TRUE(RunComponentExtensionTest(
- "system/get_incognito_mode_availability")) << message_;
-}
-
-#if defined(OS_CHROMEOS)
-
-class GetUpdateStatusApiTest : public ExtensionApiTest {
- public:
- GetUpdateStatusApiTest() : mock_update_engine_client_(NULL) {}
-
- virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
- ExtensionApiTest::SetUpInProcessBrowserTestFixture();
- chromeos::MockDBusThreadManager* mock_dbus_thread_manager =
- new chromeos::MockDBusThreadManager;
- chromeos::DBusThreadManager::InitializeForTesting(mock_dbus_thread_manager);
- mock_update_engine_client_ =
- mock_dbus_thread_manager->mock_update_engine_client();
- }
-
- virtual void TearDownInProcessBrowserTestFixture() OVERRIDE {
- chromeos::DBusThreadManager::Shutdown();
- ExtensionApiTest::TearDownInProcessBrowserTestFixture();
- }
-
- protected:
- chromeos::MockUpdateEngineClient* mock_update_engine_client_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GetUpdateStatusApiTest);
-};
-
-IN_PROC_BROWSER_TEST_F(GetUpdateStatusApiTest, Progress) {
- UpdateEngineClient::Status status_not_available;
- status_not_available.status = UpdateEngineClient::UPDATE_STATUS_IDLE;
- UpdateEngineClient::Status status_updating;
- status_updating.status = UpdateEngineClient::UPDATE_STATUS_DOWNLOADING;
- status_updating.download_progress = 0.5;
- UpdateEngineClient::Status status_boot_needed;
- status_boot_needed.status =
- UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT;
-
- EXPECT_CALL(*mock_update_engine_client_, GetLastStatus())
- .WillOnce(Return(status_not_available))
- .WillOnce(Return(status_updating))
- .WillOnce(Return(status_boot_needed));
- ASSERT_TRUE(RunComponentExtensionTest(
- "system/get_update_status")) << message_;
-}
-
-#endif
« no previous file with comments | « chrome/browser/extensions/system/system_api.cc ('k') | chrome/browser/infobars/infobar_extension_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698