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

Side by Side Diff: chrome/browser/chromeos/first_run/drive_first_run_browsertest.cc

Issue 2539623002: [Extensions] Move [Chrome]ExtensionTestNotificationObserver into extensions:: (Closed)
Patch Set: Created 4 years 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 | « no previous file | chrome/browser/chromeos/login/signin/oauth2_browsertest.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <memory> 5 #include <memory>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 controller_->SetAppInfoForTest(kTestAppId, endpoint_url_); 122 controller_->SetAppInfoForTest(kTestAppId, endpoint_url_);
123 } 123 }
124 124
125 void DriveFirstRunTest::InstallApp() { 125 void DriveFirstRunTest::InstallApp() {
126 ExtensionService* extension_service = extensions::ExtensionSystem::Get( 126 ExtensionService* extension_service = extensions::ExtensionSystem::Get(
127 browser()->profile())->extension_service(); 127 browser()->profile())->extension_service();
128 scoped_refptr<extensions::CrxInstaller> installer = 128 scoped_refptr<extensions::CrxInstaller> installer =
129 extensions::CrxInstaller::CreateSilent(extension_service); 129 extensions::CrxInstaller::CreateSilent(extension_service);
130 130
131 installer->InstallCrx(test_data_dir_.AppendASCII(kTestAppCrxName)); 131 installer->InstallCrx(test_data_dir_.AppendASCII(kTestAppCrxName));
132 ChromeExtensionTestNotificationObserver observer(browser()); 132 extensions::ChromeExtensionTestNotificationObserver observer(browser());
133 observer.WaitForExtensionLoad(); 133 observer.WaitForExtensionLoad();
134 134
135 ASSERT_TRUE(extension_service->GetExtensionById(kTestAppId, false)); 135 ASSERT_TRUE(extension_service->GetExtensionById(kTestAppId, false));
136 } 136 }
137 137
138 void DriveFirstRunTest::EnableOfflineMode() { 138 void DriveFirstRunTest::EnableOfflineMode() {
139 controller_->EnableOfflineMode(); 139 controller_->EnableOfflineMode();
140 } 140 }
141 141
142 void DriveFirstRunTest::SetDelays(int initial_delay_secs, int timeout_secs) { 142 void DriveFirstRunTest::SetDelays(int initial_delay_secs, int timeout_secs) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // Test that the controller times out instead of hanging forever. 184 // Test that the controller times out instead of hanging forever.
185 InstallApp(); 185 InstallApp();
186 InitTestServer(kBadServerDirectory); 186 InitTestServer(kBadServerDirectory);
187 SetDelays(0, 0); 187 SetDelays(0, 0);
188 EnableOfflineMode(); 188 EnableOfflineMode();
189 EXPECT_FALSE(WaitForFirstRunResult()); 189 EXPECT_FALSE(WaitForFirstRunResult());
190 EXPECT_TRUE(timed_out()); 190 EXPECT_TRUE(timed_out());
191 } 191 }
192 192
193 } // namespace chromeos 193 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/signin/oauth2_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698