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

Side by Side Diff: chrome/browser/apps/drive/drive_app_converter_browsertest.cc

Issue 1409163006: Migrating tests to use EmbeddedTestServer (/chrome/browser misc) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 1 month 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 "chrome/browser/apps/drive/drive_app_converter.h" 5 #include "chrome/browser/apps/drive/drive_app_converter.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 30 matching lines...) Expand all
41 DriveAppConverterTest() {} 41 DriveAppConverterTest() {}
42 ~DriveAppConverterTest() override {} 42 ~DriveAppConverterTest() override {}
43 43
44 // ExtensionBrowserTest: 44 // ExtensionBrowserTest:
45 void SetUpOnMainThread() override { 45 void SetUpOnMainThread() override {
46 ExtensionBrowserTest::SetUpOnMainThread(); 46 ExtensionBrowserTest::SetUpOnMainThread();
47 47
48 base::FilePath test_data_dir; 48 base::FilePath test_data_dir;
49 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); 49 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir);
50 embedded_test_server()->ServeFilesFromDirectory(test_data_dir); 50 embedded_test_server()->ServeFilesFromDirectory(test_data_dir);
51 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 51 ASSERT_TRUE(embedded_test_server()->Start());
52 } 52 }
53 53
54 void InstallAndWaitFinish(const drive::DriveAppInfo& drive_app) { 54 void InstallAndWaitFinish(const drive::DriveAppInfo& drive_app) {
55 runner_ = new content::MessageLoopRunner; 55 runner_ = new content::MessageLoopRunner;
56 56
57 converter_.reset(new DriveAppConverter( 57 converter_.reset(new DriveAppConverter(
58 profile(), 58 profile(),
59 drive_app, 59 drive_app,
60 base::Bind(&DriveAppConverterTest::ConverterFinished, 60 base::Bind(&DriveAppConverterTest::ConverterFinished,
61 base::Unretained(this)))); 61 base::Unretained(this))));
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 InstallAndWaitFinish(GetTestDriveApp()); 150 InstallAndWaitFinish(GetTestDriveApp());
151 const Extension* second_install = converter()->extension(); 151 const Extension* second_install = converter()->extension();
152 ASSERT_TRUE(second_install != NULL); 152 ASSERT_TRUE(second_install != NULL);
153 EXPECT_FALSE(converter()->is_new_install()); 153 EXPECT_FALSE(converter()->is_new_install());
154 154
155 // Two different app instances. 155 // Two different app instances.
156 ASSERT_NE(first_install, second_install); 156 ASSERT_NE(first_install, second_install);
157 EXPECT_EQ(first_install_id, second_install->id()); 157 EXPECT_EQ(first_install_id, second_install->id());
158 EXPECT_GE(second_install->version()->CompareTo(first_install_version), 0); 158 EXPECT_GE(second_install->version()->CompareTo(first_install_version), 0);
159 } 159 }
OLDNEW
« no previous file with comments | « chrome/browser/app_controller_mac_browsertest.mm ('k') | chrome/browser/apps/guest_view/web_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698